uaf-arctic-eco-modeling / dvm-dos-tem

A process based Dynamic Vegetation, Dynamic Organic Soil, Terrestrial Ecosystem Model.
MIT License
22 stars 24 forks source link

Soil Structure after Disturbance #624

Open valeriabriones opened 1 year ago

valeriabriones commented 1 year ago

It seems there is an issue with how soil is restructured or recovers post disturbance run. In particular, at Murphy Dome using CMT01 under multiple fire return intervals at severity=3, PFT Moss is able to complete the first FRI successfully, however when starting the second disturbance cycle, something fails and Moss completely disappears. Similarly DEEPC fails at the start of the second burn producing NaNs, while there appear to be no issues with SHLWC and other pfts within VEGC. MD1_Moss_FRI_baseline_comparison DEEPC

However, this issue does not appear when running under severity 5, but can be seen with severity 3 and 4. The entire run completes, with no fail_log produced. @hgenet and I have been trying to dig through the code, but nothing seems to jump out which may explain why these two are failing to complete multiple fire return intervals at severity 3?

rarutter commented 1 year ago

I did find, and have a rough fix for, a piece of code that was producing NaNs. Post-fire the fine root redistribution did not check for PFT existence (vegcov) or for the sum of roots to be redistributed being zero, and was blindly dividing by that sum. Those NaNs were eventually hitting some somcr and vegc values.

Here is what I'm currently producing for Murphy Dome, forced CMT 1, FRI 70, severity 3. PR 100, EQ 300. The increase in DEEPC at the fourth fire is a bit odd, but neither it nor VEGC for moss crash with this fix. rootfix_cmt1_BURNSOIC rootfix_cmt1_BURNVEG2AIRC rootfix_cmt1_VEGC rootfix_cmt1_DEEPC

rarutter commented 1 year ago

WildFire.cpp, starred lines are the changes I added.

287   for (int ip = 0; ip < NUM_PFT; ip++) {
***     if(cd->m_veg.vegcov[ip] > 0.){ //PFT exists
289       double rootfracsum = 0.0;
290 
291       for (int il = 0; il < cd->m_soil.numsl; il++) {
292         rootfracsum += cd->m_soil.frootfrac[il][ip];
293       }
294 
295       for (int il =0; il <cd->m_soil.numsl; il++) {
***         if(rootfracsum > 0.){
297           cd->m_soil.frootfrac[il][ip] /= rootfracsum;
298         }
299       }
300     } else{
301       //PFT does not exist. Do we need to specify frootfrac as 0?
302     }
valeriabriones commented 1 year ago

@rarutter @hgenet Implementing Ruth's fix into the WildFire.cpp code runs successfully for Murphy Dome CMT01, severity 3 burn for FRI=250. Will compare to FRI of 50 and 150 as well, but results seem reasonable especially for organic soil VEGC SOIL MD1_MINEC_FRI_baseline_fix_comparison MD1_burnveg2airc_FRI_baseline_fix_comparison DEEPSHLWC