diff --git a/Biomass_borealDataPrep.R b/Biomass_borealDataPrep.R index 2d024ed..bb5af6b 100644 --- a/Biomass_borealDataPrep.R +++ b/Biomass_borealDataPrep.R @@ -1676,11 +1676,9 @@ Save <- function(sim) { } } - if (is.na(P(sim)$.studyAreaName)) { - params(sim)[[currentModule(sim)]][[".studyAreaName"]] <- reproducible::studyAreaName(sim$studyArea_biomassParam) - message("The .studyAreaName is not supplied; derived name from sim$studyArea_biomassParam: ", - params(sim)[[currentModule(sim)]][[".studyAreaName"]]) - } + if (is.null(P(sim)$.studyAreaName) || is.na(P(sim)$.studyAreaName)) + P(sim)$.studyAreaName <- reproducible::studyAreaName(sim$studyArea_biomassParam, + notSupplied = ".studyAreaName") studyArea <- sf::st_as_sf(sim$studyArea) studyArea_biomassParam <- sf::st_as_sf(sim$studyArea_biomassParam) diff --git a/NEWS.md b/NEWS.md index 2416c5a..9141c94 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ Known issues: `: ". With an older reproducible the name is the same and there is no message. + * **`imputeBadAgeModel` now defaults to `LandR::imputeBadAgeModelDefault()`** instead of duplicating the formula here. The old default fit age directly, so `predict()` could return a negative value for a young, high-cover, low-biomass stand; that got clamped to age 0 while