Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biomass_core spin-up replaces Biomass_borealDataPrep's init event entry in completed #63

Open
CeresBarros opened this issue Mar 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@CeresBarros
Copy link
Member

after running the spin-up, Biomass_borealDataPrep's init event no longer appears in the completed events list:

> completed(preSimListbaseCase)
   eventTime                moduleName          eventType eventPriority           clockTime
1:      2001                checkpoint               init             0 2022-03-22 17:20:39
2:      2001                      save               init             0 2022-03-22 17:20:39
3:      2001                  progress               init             0 2022-03-22 17:20:39
4:      2001                      load               init             0 2022-03-22 17:20:39
5:        38              Biomass_core mortalityAndGrowth             6 2022-03-22 17:25:27
6:      2001 Biomass_speciesParameters               init             1 2022-03-22 17:25:52
7:      2001              Biomass_core               init             1 2022-03-22 17:25:52

> modules(preSimListbaseCase)
$`D:/GitHub/LandRBiomass_publication/R/SpaDES/m/Biomass_borealDataPrep`
[1] "Biomass_borealDataPrep"

$`D:/GitHub/LandRBiomass_publication/R/SpaDES/m/Biomass_speciesParameters`
[1] "Biomass_speciesParameters"

$`D:/GitHub/LandRBiomass_publication/R/SpaDES/m/Biomass_core`
[1] "Biomass_core"

> ls(preSimListbaseCase)
 [1] "activePixelIndex"                 "activePixelIndexReporting"        "biomassMap"                       "cloudFolderID"
 [5] "cohortData"                       "columnsForPixelGroups"            "ecoregion"                        "ecoregionLayer"
 [9] "ecoregionMap"                     "factorialSpeciesTable"            "imputedPixID"                     "inactivePixelIndex"
[13] "inactivePixelIndexReporting"      "lastFireYear"                     "lastReg"                          "minRelativeB"
[17] "modelBiomass"                     "modelCover"                       "nonZeroCover"                     "numTreed"
[21] "pixelFateDT"                      "pixelGroupMap"                    "PSPgis"                           "PSPmeasure"
[25] "PSPplot"                          "rasterToMatch"                    "rasterToMatchLarge"               "rawBiomassMap"
[29] "reducedFactorialCohortData"       "rstLCC"                           "simulationOutput"                 "species"
[33] "speciesEcoregion"                 "speciesGAMMs"                     "speciesLayers"                    "speciesParams"
[37] "speciesTable"                     "sppColorVect"                     "sppEquiv"                         "standAgeMap"
[41] "studyArea"                        "studyAreaLarge"                   "studyAreaReporting"               "sufficientLight"
[45] "treed"                            "treedFirePixelTableSinceLastDisp" "vegTypeMap"

I am sure Biomass_borealDataPrep finished running because all it's outputs are there and the whole simulation worked fine

Maybe related, is the fact that I also now get a warning after running elapsedTime on the output simList of a spades call on the previously initialised simulation:

> elapsedTime(simListbaseCase$sim1_rep01)
                   moduleName                 eventType       elapsedTime
 1:                checkpoint                      init 1.994133e-03 secs
 2:                      save                      init 2.991915e-03 secs
 3:                  progress                      init 9.980202e-04 secs
 4:                      load                      init 2.887025e+02 secs
 5:              Biomass_core        mortalityAndGrowth 2.692351e+01 secs
 6: Biomass_speciesParameters                      init 2.055149e-01 secs
 7:              Biomass_core                      init 1.442785e+03 secs
 8:                      save                    spades 1.795001e+00 secs
 9:    Biomass_borealDataPrep                      plot 8.577969e-01 secs
10:              Biomass_core                summaryBGM 3.525127e+00 secs
11:              Biomass_core      plotSummaryBySpecies 2.430483e+00 secs
12:              Biomass_core                  plotAvgs 1.400293e+00 secs
13:                      save                     later 2.052871e+00 secs
14:              Biomass_core           summaryBGMstart 1.140946e+00 secs
15:              Biomass_core                 Dispersal 2.204230e-01 secs
16:              Biomass_core cohortAgeReclassification 1.316502e-01 secs
17:              Biomass_core              summaryRegen 4.298489e-01 secs
Warning message:
In as.data.table.list(jval, .named = NULL) :
  Item 3 has 147 rows but longest item has 148; recycled with remainder.

I tracked the warning down to the line that calculates the elapsed time for each event using diff, so that the last event is getting the elapsed time of the first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant