From ae787d47c385a72a9b6a4abb80ce794914afe082 Mon Sep 17 00:00:00 2001 From: Lo-hatch <1046386278@qq.com> Date: Thu, 28 Apr 2022 08:45:56 +0800 Subject: [PATCH] Update rk4_misc.f90 Reverse the leaf_excess and wood_excess calculation when: if (initp%leaf_water_im2(ico) > rk4max_leaf_water_im2 --- ED/src/dynamics/rk4_misc.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ED/src/dynamics/rk4_misc.f90 b/ED/src/dynamics/rk4_misc.f90 index d91197a44..f847831ca 100644 --- a/ED/src/dynamics/rk4_misc.f90 +++ b/ED/src/dynamics/rk4_misc.f90 @@ -2910,7 +2910,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa,ibuff) ! Leaves have too much water. If possible, send water back to wood. ! ! If wood is also saturated, leaves expel the excess water as shedding. ! !---------------------------------------------------------------------------! - leaf_excess = rk4max_leaf_water_im2 - initp%leaf_water_im2(ico) + leaf_excess = initp%leaf_water_im2(ico) - rk4max_leaf_water_im2 wood_demand = min(leaf_excess,max(0.d0 & ,rk4max_wood_water_im2-initp%wood_water_im2(ico))) leaf_wshed = leaf_excess - wood_demand @@ -3104,7 +3104,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa,ibuff) ! the excess water goes to shedding. ! !---------------------------------------------------------------------------! !----- First guess. --------------------------------------------------------! - wood_excess = rk4max_wood_water_im2 - initp%wood_water_im2(ico) + wood_excess = initp%wood_water_im2(ico) - rk4max_wood_water_im2 leaf_demand = rk4max_leaf_water_im2 - initp%leaf_water_im2(ico) soil_demand = (soil8(nstop)%slmsts-initp%soil_water(kt)) * dslz8(kt) * wdns8 !----- Bounded guess. ------------------------------------------------------! @@ -3151,7 +3151,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa,ibuff) if (fast_diagnostics) then initp%avg_wflux_wl (ico) = initp%avg_wflux_wl (ico) & + leaf_demand - initp%avg_wflux_gw (ico) = initp%avg_wflux_wl (ico) & + initp%avg_wflux_gw (ico) = initp%avg_wflux_gw (ico) & - soil_demand initp%avg_wshed_lg (ico) = initp%avg_wshed_lg (ico) & + leaf_wshed