-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'btran2incnfire_movecall'
CNFire: btran2 fixes and general cleanup (1) Call routine to calculate fire's btran2 from CNFireArea; this has a few advantages: - It makes the logic of CNFireArea more clear (rather than depending on a btran2 variable that is calculated from some other part of the code) - This avoids having the biogeophysics depend on the biogeochemistry - This lets us avoid doing this btran calc if using no-fire – or other, future, fire methods that don't need it Note regarding testing: In the initial step, I kept this calculation dependent on a saved version of h2osoi_vol to avoid changing answers; I changed this in the answer changes in step (2), as noted below. (2) Answer-changing fixes to CNFire's btran2 calculation and use: (a) Calculate fire btran2 using updated h2osoi_vol (this is an answer-changing cleanup step from (1)) (b) TEMPORARY CHANGE (reverted in the cleanup in (3)): Reinitialize fire btran2 to spval for all patches in each time step, so that the fire code isn't trying to use btran2 from earlier time steps for patches that were in the exposed veg filter at one point but no longer are. One implication of this is that, if there is currently no exposed veg on a column, the new code leads to the block of code that forces fire_m = 0 (because wtlf will be 0). Previously, in contrast, it looks like fire_m was allowed to be non-zero even if there is currently no exposed veg, because btran2 and wtlf were accumulated if a patch ever was exposed in the past. (c) Limit fire btran2 to be <= 1, rather than letting it be slightly greater than 1. (Due to a conditional in CNFireArea, these slightly-greater-tan-1 values were being ignored when computing btran_col, rather than averaging in a 1 value.) (3) Non-answer-changing fire code cleanup: (a) Cleanup of the btran2 fixes, including reverting the TEMPORARY CHANGE noted in (2b), instead relying on a better mechanism: just doing the calculations of btran_col and wtlf over the exposedvegp filter. Also, get rid of the checks for shr_infnan_isnan(btran2(p)) and btran2(p) <= 1 (allowed by the other changes in (2) and (3)). (b) Set btran2 to 0 over non-exposed-veg points: this changes answers for the BTRAN2 diagnostic field, but nothing else. (This follows what is done for the standard BTRAN.) (c) Move calc_fire_root_wetness for CNFireLi2021 into the base type to avoid future bugs (assuming that the next fire module will extend the base class but will also want to use this new version of calc_fire_root_wetness). (d) Change fire looping structure to be more standard (4) Remove some very expensive tests from aux_clm, putting some in the new ctsm_sci test list instead (5) A bit of other minor cleanup Issues fixed: - Resolves #1139 (Decrease expense of ne0ARCTICGRISne30x8 test and C96 tests) - Resolves #1153 (Fire btran2 is only computed for exposed veg patches, but is used over all veg patches) - Resolves #1170 (CNFire code: btran2 should not be skipped when it's greater than 1) - Partially addresses #1142 (Add ctsm_sci test list that would be used for releases and making sure important resolutions run well)
- Loading branch information
Showing
18 changed files
with
1,134 additions
and
971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.