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

Frost mortality fix #804

Closed
wants to merge 27 commits into from
Closed

Frost mortality fix #804

wants to merge 27 commits into from

Conversation

mpaiao
Copy link
Contributor

@mpaiao mpaiao commented Nov 4, 2021

Bug fix for non-zero mortality at the beginning of every FATES simulation.

Description:

Simple bug fix for the non-zero frost mortality during the first day of the simulation. The problem is that patch variable bc_in%t_veg24_pa is set to zero at the beginning of the simulation, and this is interpreted as zero Kelvin. My solution was to simply bypass frost mortality during the first simulation day. This fix addresses issue #781 and should have minimal impact on long-term simulations.

Collaborators:

Expectation of Answer Changes:

Checklist:

  • My change requires a change to the documentation.
  • I have updated the in-code documentation .AND. (the technical note .OR. the wiki) accordingly.
  • I have read the CONTRIBUTING document.
  • FATES PASS/FAIL regression tests were run
  • If answers were expected to change, evaluation was performed and provided

Test Results:

CTSM (or) E3SM (specify which) test hash-tag:

CTSM (or) E3SM (specify which) baseline hash-tag:

FATES baseline hash-tag:

Test Output:

1. Bug fix in DailyPRTAllometricCarbon (parteh/PRTAllometricCarbonMod.F90). When
   allocating to different tissues, the code was subtracting allocation of tissues before
   calculating the amount for the next tissue, potentially under-allocating carbon to fine
   roots.
2. Renamed variable laimemory with leafmemory. We were never tracking the LAI, but leaf
   carbon, and thus the name is dangerously misleading.
3. Implemented an option carbon allocation routine (DailyPRTAllometricCarbonSimpler in
   parteh/PRTAllometricCarbonMod.F90).  In this routine, I applied much simpler rules for
   maintenance allocation: it simply checks how much each pool is in deficit, and allocates
   carbon (storage + carbon_balance) to the pools according to the debt. If there is any
   carbon left, then the plant finishes filling the storage pool and then allocates to
   growth.
…s predictability.

1. Implemented option to drive leaves on / leaves off using soil matric potential instead
   of soil water content, which is more intuitive for setting up thresholds.  The choice
   is controlled by fates_phen_drought_threshold: when it is positive, it continues to use
   the soil volumetric water content (m3/m3), and when it is negative, it uses soil matric
   potential (in mm).
2. When drought-deciduous leaves are off, the plant now stops allocating carbon to any
   living tissue, to reduce carbon losses when carbon balance is necessarily non-positive.
3. The drought-deciduous status is still done at the site level but now it is
   PFT-dependent because the root distribution is PFT dependent. This required turning
   5 site-level variables into site x PFT.
4. Sub-routine phenology_leafonoff (EDPhysiologyMod.F90) was rewritten to reduce duplicated
   code. Most of the steps for cold deciduous and drought deciduous were the same.  The
   revised routine first checks whether or not it is time o flush or shed leaves, then it
   uses a common set of commands.
…efinitions of

sapwood and structural memory.
…f with end select).

And now all tests for hlm_parteh_mode use select case, which is safer for options in any
case.
The frost mortality needs the previous-day temperature, but the variable holding this
quantity is set initially to zero.  This is interpreted as 0 Kelvin by the mortality
routine, triggering the mortality rate.
@glemieux glemieux linked an issue Nov 5, 2021 that may be closed by this pull request
@rgknox
Copy link
Contributor

rgknox commented Nov 8, 2021

@mpaiao , this fix might help elucidate differences I'm seeing when migrating to tracking running means on the fates side, ie #724

@mpaiao
Copy link
Contributor Author

mpaiao commented Nov 8, 2021

@rgknox I think the initial assignment for many of these "memory" variables may be worth thinking more. I see that relative humidity also starts at 0, which could exaggerate dryness for SPITFIRE too (though short-lived, just the first day).

@mpaiao
Copy link
Contributor Author

mpaiao commented Nov 8, 2021

By the way, I noticed that my 3 pull requests may need to be implemented sequentially, because I am seeing many more changes in this PR than the actual fix for mortality. I will try to organize my branches a bit better next time.

@jkshuman
Copy link
Contributor

jkshuman commented Nov 8, 2021

@mpaiao there is sometimes a high amount of fire in the first year. It would be great if this cleared that up. Thanks for finding and fixing this, but yes we should rethink initialization of these "memory" variables. Perhaps open a separate issue with a few examples, like the fire dependance on RH?

@glemieux glemieux self-assigned this Nov 29, 2021
@glemieux glemieux mentioned this pull request Dec 3, 2021
5 tasks
@glemieux
Copy link
Contributor

glemieux commented Dec 3, 2021

Closing per #816

@glemieux glemieux closed this Dec 3, 2021
@mpaiao mpaiao deleted the mpaiao-frostmort-fix branch May 4, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-zero frost mortality at the beginning of the simulation
4 participants