SIPNET workflow for restarting with events#3919
SIPNET workflow for restarting with events#3919ashiklom wants to merge 79 commits intoPecanProject:developfrom
Conversation
...but we reset to initial conditions every time.
Based on the actual JSON contents.
c40f98a to
f061e09
Compare
start jan 1 of first planting year end dec 31 of last harvest year
|
OK, I think I've resolved all of @divine7022 and @infotroph comments. I also resolved a significant bug with Note that this PR sits on top of #3836 and #3828 --- if we merge this, we can probably just close those.
All of this already works in this PR. The new settings <- PEcAn.workflow::runModule.run.write.configs(
settings_raw,
input_design = sens_design$X
)
source("workflows/sipnet-restart-workflow/utils.R")
jobfiles <- write_segmented_configs.SIPNET(settings, sens_design$X, force_rerun = TRUE)
PEcAn.workflow::runModule_start_model_runs(settings)Whatever method the user has specified for running |
infotroph
left a comment
There was a problem hiding this comment.
This looks great! I was able to run through 3 ensembled sites in a lightly modified MAGiC ensemble workflow using just utils.R with the changes noted below. I think this is ready to merge. Next iteration can be to decide which package(s) to drop the functions into.
| settings | ||
| } | ||
|
|
||
| # TODO: We need a better, consistent implementation of this. However, this is |
There was a problem hiding this comment.
I thought this table was with the landiq code. If not, I think @infotroph , @sarahkanee , and I have each implemented one or more versions of this mapping. And there is one in https://github.com/ccmmf/cadwr-landuse/blob/eacec3ba471b80ed3fc9404d300767f5b12a3654/data/CARB_PFTs_table.csv#L66 ... that doesn't meet the need here, but we can add columns (probably can have multiple pft cols representing different levels of splits, or could have a many-many table)
@infotroph Co-authored-by: Chris Black <chris@ckblack.org>
…sipnet-restart-workflow
Prototype of running SIPNET with event files that include changes in crops. A few implementation notes:
This supports PEcAn ensemble inputs (including for events)
event.jsonfiles for multiple ensemble members are stored inrun$inputs$events$source. SIPNET-specificevent.infiles are stored inrun$inputs$events$path(like other inputs). This is because the current functionality for finding segments to split the runs uses the JSON files. @infotroph 'ssubset_pathsfunction from an earlier draft has been adapted and modified to subset bothpathandsourcepaths (as long as they have the same lengths).This circumvents
runModule.start.model.runsand uses a direct execution loop instead. However, the output is PEcAn standard and follows PEcAn configuration conventions, so downstream analyses/workflows should work out of the box.It's a bit hacky, but I think it does what it's supposed to and should be enough to unblock other CCMMF modeling tasks (@dlebauer).