PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
203 stars 235 forks source link

write.configs.ED2 compatibility with latest version of the model #1628

Open istfer opened 7 years ago

istfer commented 7 years ago

Some parameters that we are currently writing to config.xml for ED are not being read by the model, and we are not writing some of the parameters that can be read by ED and might be important for contributing the overall model uncertainty

Description

After discussion on gitter, it looks like pecan wrappers were not up-to-date with the latest model code. Here is what I compiled so far (I checked ed_params, write.config, config.xml/history.xml and bety):

Current parameters written by write.configs:

Photosynthesis params         -  read by ED

*cuticular_cond                     Y
*leaf_respiration_rate_m2           N
quantum_efficiency                  Y
*Vcmax                              N
leaf_width                          Y
water_conductance                   Y 
stomatal_slope                      Y

*cuticular_cond: why only temperate.Late_Hardwood has an associated cuticular conductance prior in Bety but not others? @mdietze any ideas?

*leaf_respiration_rate_m2: this is a special case. ED doesn't read it, but also we're not writing it to the config.xml. Currently we use leaf_respiration_rate_m2 to calculate dark_respiration_factor together with Vcmax

*Vcmax : it's used in dark_respiration_factor calculation which we do write to config.xml and ED does read

Respiration params         -  read by ED

root_turnover_rate               Y
leaf_turnover_rate               Y
growth_resp_factor               Y
*root_respiration_rate           N
f_labile                         Y

*root_respiration_rate : currently there is no root_respiration_rate read by ED but a root_respiration_factor which I think is the same thing

Mortality params         -  read by ED

mort2                            Y
seedling_mortality               Y
Allocation params         -  read by ED

SLA                             Y
*fineroot2leaf                  N

*fineroot2leaf : currently there is no fineroot2leaf read by ED but a q (ratio of fine root to leaf biomass) which I think is the same thing

Nitrogen params         -  read by ED

c2n_leaf                       Y
*c2n_fineroot                  N

*c2n_fineroot : there is no such param read by ED. The only PFT-specific c2n params are c2n_leaf and c2n_recruit. There are also other constants c2n_slow, c2n_structural, c2n_storage, c2n_stem

Reproductivity params         -  read by ED

r_fract                             Y
nonlocal_dispersal                  Y

Some important(?) parameters not written by write.configs but read by ED:

Photosynthesis params 
Vm0 : maximum photosynthesis capacity in µmol/m2/s
Vm_low_temp : Photosynthesis begins to rapidly decline below this temperature. 

Respiration params
storage_turnover_rate : rate of storage pool loss (not temperature dependent) 
root_respiration_factor :  same as root_respiration_rate

Mortality params:
mort1 : Time scale at which low-carbon balance plants die 
mort3 : Density independent (background) mortality 

*Allocation params:
q : same as fineroot2leaf

Possible Implementation

To get the current code working with current parameters: 1) these params can simply be renamed in convert.samples.ED:

fineroot2leaf -> q
root_respiration_rate -> root_respiration_factor

2) Scaled Vcmax can be written as Vm0 in convert.samples.ED. The question for (1) and (2) is that, do we want to replace them (version flags in write.configs - also what should the ED versions be called then, we have lots of personal revisions) or simply add them to the config.xml (@serbinsh's way) ? 3) Remove the prior for c2n_fineroot from ED PFTs? (not that important, it has no effect but just increases the number of sensitivity runs for no reason, maybe just put a note somewhere?) 4) I think we can continue using leaf_respiration_rate_m2 as parameter, it's being used for dark_respiration_coefficient and that's what ED reads. Also the calculation seems correct. Alternatively, dark_respiration_coefficient can have its own prior. I guess there isn't much sensitivity to this parameter anyway 5) Should I add cuticular_cond as a prior to all ED PFTs? 6) While I'm at it I can add Vm_low_temp prior, relatively straightforward, and outputs could be sensitive to this parameter 7) I think in the near future I'm going to need to add allometry and mortality priors for the demography calibration

mdietze commented 7 years ago

(1, 2) Yes, a bunch of variables can simply be renamed within write.configs (or, more specifically, the trait processing function called by write configs). I'm sure this code used to do that, but am unsure why/when it was undone (Vm0, q). Double check in the ED2 code that root respiration factor has the same meaning & units are root_respiration_rate (3) Yeah, stash that for later -- there was an ED branch that had explicit root C:N and it would be good to resurrect that, but it's not on anyone's priority list (4) yes, retain the current leaf_respiration prior (biologically meaningful and measurable) rather than the dark respiration factor (artificial model construct, not directly measured) (5) yeah, probably want to add cuticular cond and the whole other list of parameters mentioned. You're choice whether you do this for your PDA paper, but we definitely need it for @tonygardella's UA (6) How is VM_low_temp not there already? Analyses using PEcAn with that parameter were in Carl Davidson's thesis (7) Yep, we should add everything ED2 can vary unless we have a good reason not to. For backward compatibility would be good do to clone PFTs for this. This task is non-trivial since it requires a good bit of though and reading and emailing people to construct solid, defensible, expert-elicited priors. Might be time to put a bit more work into the elicitation shiny tool.

istfer commented 7 years ago

(1) For root_respiration_factor this is what ED wiki says:

root_respiration_factor umolCO2 (kg fine roots)-1 s-1 rate of fine root respiration at reference soil temperature (This variable sets the contribution of roots to respiration at the reference temperature of 15C)

and this is what's written on one of the bety priors:

root_respiration_rate umolCO2 kg-1 s-1 converted by the R15=RT C1 exp (C2 * (1/288.15-1/T); C1=1; C2=3000, T: temperature at which R was measured (Kelvin), in this case R15=R25/1.41. Root respiration data was converted to EDs root_respiration_factor (maintenance root respiration) by dividing by 2.

so the units are same, but not quite sure the meaning is the same. This particular prior was associated with ebifarm pfts.

I was thinking of using the generic uninformative prior in bety unif(0,100).

(5) For cuticular_cond default value was 10000, can I use an informative wide prior for this too, unif(1000, 100000)? In Bety there are other priors e.g. N(65000,11500)

(6) there are priors in Bety for Vm_low_temp but they're probably associated with PFTs other than the default ones. Default value for temperate PFTs is 4.7137 (Celcius), I'm gonna use something like N(3,3)?

mdietze commented 7 years ago

(1) Yes, those are the same thing

Let's talk offline about those priors -- I'm not particularly thrilled with any of the one's you've proposed. Also, because the UA is one-at-a-time you probably want uninformative priors centered on the current defaults in case there's no data to update them. If we have informative priors, then they should be what we believe is correct, regardless to defaults. In general, I'm pretty skeptical of uninformative priors.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 365 days with no activity.

dlebauer commented 4 years ago

@istfer and @mdietze was this ever resolved, or will it be necessary to address re: ED2 v2.2.0?

robkooper commented 4 years ago

I think we should address as part of ED 2.2 update for ED2IN. I think when we add a new supported version of the model it is a good time to make sure the write configs are updated as well. @dlebauer are you ok if we ask Ken to look at this?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 365 days with no activity.