Repository navigation
support SIPNET sensitivity analysis across crop changes - #4136
divine7022 wants to merge 23 commits into
Conversation
| # a site's configs only get its own PFTs' parameters (see | ||
| # write.ensemble.configs), so a run moving another PFT's trait would just | ||
| # repeat the median run | ||
| site.pfts <- intersect(as.character(unlist(settings$run$site$site.pft)), pft.names) |
There was a problem hiding this comment.
Does SA support segmented runs? In the segmented case site.pft contains the initial PFT and others are activated in later segments using the PFT parameters passed here.
There was a problem hiding this comment.
I suspect one could make a design argument that from the run.write.configs perspective maybe site.pft should contain every PFT the site will use at any time in the run. But making it work that way would need a change in how write.config.SIPNET handles it and I'm not immediately sure how we'd mark the initially active PFT.
|
@divine7022 gentle nudge about my question above -- seems important to get right before merging. |
|
Thanks Chris!. my recent SA runs were unsegmented, and I haven’t tested segmented SA. The current segmented writer expects ENS run IDs and ensemble.samples files, so I haven’t established working segmented SA path I see your point about site.pft, for a segmented run it can identify the initial vegetation, while another PFT is activated later. my filter and documentation wording assume it is full set of PFTs used by run. Would it make sense to keep this PR scoped to fixed PFT SA rather than redefine site.pft here ? While checking this, I also found two separate bugs in the patch. A combined SA and ensemble call reuses the filtered design, and median only design fails while building the manifest. I’ll fix both and add tests before asking for another review |
103e08b to
5624657
Compare
| expect_error(sipnet_pft_constants(defaults, "cropA"), "unique names") | ||
| }) | ||
|
|
||
| test_that("generic ensemble and SA writers accept the auxiliary environment group", { |
There was a problem hiding this comment.
Heads up that env will go away in #4229, at which point this test will probably need rethinking
Ah right, that would definitely complicate using it in SA 🫤. Yes, OK to keep this PR scoped to fixed PFTs. |
Description
This replaces the initial PFT filter with support for sensitivity analysis across SIPNET crop changes.
site.pftstill identifies the initial vegetation. Crops introduced later use their sampled parameters when active and remainin the sensitivity results.
It also fixes baseline only manifests and selects constants for correct PFT, while preserving NULL defaults for existing callers. Direct
run.write.configscalls accept one analysis at a time; combined SA and ensemble runs userunModule.run.write.configs.Motivation and Context
Review Time Estimate
Types of changes
Checklist: