NGEET / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
105 stars 92 forks source link

Move `leaf_c` calculation after cohort area and number adjustment in SP mode calcuations #1063

Open glemieux opened 1 year ago

glemieux commented 1 year ago

In the course of dealing with some testing for #1024, I noticed that we are currently updating the cohort area and number after we calculate the leaf_c in calculate_SP_properties: https://github.com/NGEET/fates/blob/4f41112365d5488b3b0b9e909a2914082217e3f1/biogeochem/EDPhysiologyMod.F90#L1929-L1953

I believe we should defer the leaf_c calculation until after the area and number adjustments since they are inputs to leafc_from_treelai.

See discussion starting from https://github.com/NGEET/fates/pull/1024#issuecomment-1668694681 for more context.