-
Notifications
You must be signed in to change notification settings - Fork 236
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
PEcAn.ED2 defaults for allometry overwrite ED2 calculations and cause divide-by-zero errors #3124
Comments
Update. Running ED2 without PEcAn.ED2 setting ED2's defaults (i.e. letting ED2 use it's own internal defaults) has fixed all the errors I was getting in ED2 runs. I suspect most of the errors I have been getting have been a result of PEcAn.ED2 breaking allometry equations by overwriting coefficients with inappropriate values. |
I can envision at least 3 possible solutions roughly in order of least to most control from PEcAn (and consequently, least to most difficulty in getting it right)
I do think this is a true bug and one of these changes is needed for PEcAn.ED2 is to continue to be useful. |
Another possibility is to make this work with the current machinery by:
Except I can't figure out how to edit the history.rgit file—it doesn't seem to correspond to internal ED2 defaults for several of the PFTs and only includes a subset of the parameters that could be overridden (e.g. missing |
This issue is stale because it has been open 365 days with no activity. |
Bug Description
It appears that
PEcAn.ED2
sets the ED2 flagNL%IALLOM = 3
in ED2IN by default. It also writesb1Ht
andb2Ht
to config.xml. BUT ED2 seems to want to calculateb1Ht
andb2Ht
fromrho
and some constants defined ined_params.f90
when IALLOM = 3. I believe that config.xml gets the final say though and overwrites the calculations ED2 is doing. This could be a problem becauseb1Ht
andb2Ht
mean different things depending on the value forNL%IALLOM
. The PEcAn.ED2 defaults for these parameters appear to be the ones forNL%IALLOM = 1
, not 3https://github.com/EDmodel/ED2/blob/b9c93f806d6df7a38db306d944a0695d8b40b39a/ED/src/init/ed_params.f90#L3660-L3664
Expected behavior
I'd expect PEcAn.ED2 to just not include
b1Ht
andb2Ht
in config.xml. Anything not in config.xml will just use the ED2 defaults stored in ED. That would eliminate the need to keep an updated copy of those defaults in PEcAn.ED2. Either that, or use the default IALLOM mode (2).Additional context
Getting divide by zero errors from ED2 and trying to eliminate potential sources. Allometry seems like a prime suspect.
The text was updated successfully, but these errors were encountered: