@@ -336,12 +336,12 @@ defineModule(sim, list(
336336 createsOutput(" modelBiomass" , " data.frame" ,
337337 paste(" If `P(sim)$exportModels` is 'all', or 'biomass'," ,
338338 " fitted biomass model, as defined by `P(sim)$biomassModel`" )),
339- createsOutput(" rawBiomassMap" , " SpatRaster" ,
340- paste(" total biomass raster layer in study area. Defaults to the Canadian Forestry" ,
341- " Service, National Forest Inventory, kNN-derived total aboveground biomass map" ,
342- " (in tonnes/ha) from 2001, unless `dataYear != 2001`." ,
343- " See <https://open.canada.ca/data/en/dataset/ec9e2659-1c29-4ddb-87a2-6aced147a990>" ,
344- " for metadata" )),
339+ # createsOutput("rawBiomassMap", "SpatRaster",
340+ # paste("total biomass raster layer in study area. Defaults to the Canadian Forestry",
341+ # "Service, National Forest Inventory, kNN-derived total aboveground biomass map",
342+ # "(in tonnes/ha) from 2001, unless `dataYear != 2001`.",
343+ # "See <https://open.canada.ca/data/en/dataset/ec9e2659-1c29-4ddb-87a2-6aced147a990>",
344+ # "for metadata")),
345345 createsOutput(" rstLCC" , " SpatRaster" ,
346346 paste(" As the input object `rstLCC`, but potentially cropped/projected/masked" ,
347347 " to match `rasterToMatchLarge`" )),
@@ -465,7 +465,6 @@ createBiomass_coreInputs <- function(sim) {
465465 }
466466 }
467467 # options(opt)
468-
469468 if (! .compareRas(sim $ speciesLayers , sim $ rasterToMatchLarge , res = TRUE )) {
470469 sim $ speciesLayers <- Cache(postProcessTerra ,
471470 sim $ speciesLayers ,
@@ -1310,8 +1309,8 @@ createBiomass_coreInputs <- function(sim) {
13101309
13111310 # # do assertions
13121311 message(blue(" Create pixelGroups based on: " , paste(sim $ columnsForPixelGroups , collapse = " , " )),
1313- " \n " , blue(" Resulted in" ), magenta(length(unique(sim $ cohortData $ pixelGroup ))),
1314- " unique pixelGroup values" )
1312+ " \n " , blue(" Resulted in " ), magenta(length(unique(sim $ cohortData $ pixelGroup ))),
1313+ " unique pixelGroup values" )
13151314 assertSpeciesEcoregionCohortDataMatch(sim $ cohortData , sim $ speciesEcoregion , doAssertion = TRUE )
13161315
13171316 # LandR::assertERGs(sim$ecoregionMap, cohortData = sim$cohortData,
@@ -1433,12 +1432,7 @@ Save <- function(sim) {
14331432 if (! suppliedElsewhere(" rasterToMatchLarge" , sim )) { # # Eliot changed this -- case where RTM was supplied, this broke that --> NOT TRUE --> if one is not provided, redo both (safer?)
14341433 needRTML <- TRUE
14351434 message(" There is no rasterToMatchLarge supplied; will use rasterToMatch" )
1436- } # else {
1437- # stop("rasterToMatch/rasterToMatchLarge is going to be supplied, but ", currentModule(sim), " requires it ",
1438- # "as part of its .inputObjects. Please make it accessible to ", currentModule(sim),
1439- # " in the .inputObjects by passing it in as an object in simInit(objects = list(rasterToMatch = aRaster)",
1440- # " or in a module that gets loaded prior to ", currentModule(sim))
1441- # }
1435+ }
14421436 }
14431437
14441438 # # biomass map
@@ -1512,7 +1506,7 @@ Save <- function(sim) {
15121506 disturbedCode = 240 ,
15131507 destinationPath = dPath ,
15141508 overwrite = TRUE ,
1515- writeTo = .suffix(" rstLCC.tif" , paste0(" _" , P(sim )$ .studyAreaName , " _" , P(sim )$ dataYear )),
1509+ # writeTo = .suffix("rstLCC.tif", paste0("_", P(sim)$.studyAreaName, "_", P(sim)$dataYear)),
15161510 userTags = c(" rstLCC" , currentModule(sim ),
15171511 P(sim )$ .studyAreaName , P(sim )$ dataYear ))
15181512 }
@@ -1582,7 +1576,7 @@ Save <- function(sim) {
15821576 ageURL = ageURL ,
15831577 studyArea = sa ,
15841578 rasterToMatch = sim $ rasterToMatchLarge ,
1585- writeTo = .suffix(" standAgeMap.tif" , paste0(" _" , P(sim )$ .studyAreaName )),
1579+ # writeTo = .suffix("standAgeMap.tif", paste0("_", P(sim)$.studyAreaName)),
15861580 overwrite = TRUE ,
15871581 useCache = FALSE , # ## for now due to attributes being lost on retrieval
15881582 firePerimeters = if (P(sim )$ overrideAgeInFires ) sim $ firePerimeters else NULL ,
0 commit comments