From eb4af1ae17c84b688e14095f780675e7d59d517d Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 6 Dec 2023 21:15:03 -0800 Subject: [PATCH 1/3] Allow stocks to be written in the output when running ST3 mode --- main/FatesHistoryInterfaceMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index c530656bda..c79ae0fd99 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -2508,7 +2508,7 @@ subroutine update_history_dyn(this,nc,nsites,sites,bc_in) hio_lai_si => this%hvars(ih_lai_si)%r81d ) ! If we don't have dynamics turned on, we just abort these diagnostics - if (hlm_use_ed_st3.eq.itrue) return + ! if (hlm_use_ed_st3.eq.itrue) return model_day_int = nint(hlm_model_day) From c7bc6624bf0713d790e512df71b5d9fc2d4e85e4 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 6 Dec 2023 21:40:43 -0800 Subject: [PATCH 2/3] First attempt to incorporate phenology to ST3 mode. 1. Very simplistic approach, in which we impose retranslocation factor for all elements to be 1. This ensures carbon is available for regrowth and the carbon budget is closed. 2. This is not an ideal solution because leaf abscission would increase litter stocks and consequently modulate the seasonal cycle of heterotrophic respiration. That said, this is not necessarily worse than assuming leaf biomass is aseasonal in deciduous- dominated ecosystems, and that litter stocks would need to change based on environmentally driven seasonality of heterotrophic respiration. --- main/EDMainMod.F90 | 17 +++++++---------- parteh/PRTLossFluxesMod.F90 | 8 ++++++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index 2b29157512..fea464c08d 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -195,16 +195,13 @@ subroutine ed_ecosystem_dynamics(currentSite, bc_in, bc_out) ! Zero mass balance call TotalBalanceCheck(currentSite, 0) - ! We do not allow phenology while in ST3 mode either, it is hypothetically - ! possible to allow this, but we have not plugged in the litter fluxes - ! of flushing or turning over leaves for non-dynamics runs - if (hlm_use_ed_st3.eq.ifalse)then - if(hlm_use_sp.eq.ifalse) then - call phenology(currentSite, bc_in ) - else - call satellite_phenology(currentSite, bc_in ) - end if ! SP phenology - end if + ! Phenology. For now ST3 mode also represents phenology, though it is + ! an incomplete representation as it lacks transfers to the litter layer + if (hlm_use_sp == ifalse) then + call phenology(currentSite, bc_in ) + else + call satellite_phenology(currentSite, bc_in ) + end if ! SP phenology if (hlm_use_ed_st3.eq.ifalse.and.hlm_use_sp.eq.ifalse) then ! Bypass if ST3 diff --git a/parteh/PRTLossFluxesMod.F90 b/parteh/PRTLossFluxesMod.F90 index 833bbc7a40..8d71011498 100644 --- a/parteh/PRTLossFluxesMod.F90 +++ b/parteh/PRTLossFluxesMod.F90 @@ -24,6 +24,7 @@ module PRTLossFluxesMod use FatesConstantsMod, only : nearzero use FatesConstantsMod, only : calloc_abs_error use FatesConstantsMod, only : itrue + use FatesInterfaceTypesMod, only : hlm_use_ed_st3 use FatesGlobals , only : endrun => fates_endrun use FatesGlobals , only : fates_log use shr_log_mod , only : errMsg => shr_log_errMsg @@ -567,6 +568,13 @@ subroutine DeciduousTurnoverSimpleRetranslocation(prt,ipft,organ_id,mass_fractio if( prt_params%organ_param_id(organ_id) < 1 ) then retrans = 0._r8 + else if (hlm_use_ed_st3 == itrue) then + ! For now we retranslocate all biomass to storage to prevent carbon balance errors. + ! This is not an ideal solution because tissue abscission may contribute to a + ! seasonal sign in litter and consequently heterotrophic respiration (though the + ! lack of phenology is also problematic for seasonal cycles of GPP, ET, sensible + ! heat, etc.). + retrans = 1._r8 else if ( element_id == carbon12_element ) then retrans = 0._r8 From a0526bd8149d4d3b058d242844d31f7e4e67e9fe Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Mon, 15 Jan 2024 11:31:37 -0800 Subject: [PATCH 3/3] Uncommenting the return that bypasses output of structure variables when using ST3 mode. --- main/FatesHistoryInterfaceMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index c79ae0fd99..c530656bda 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -2508,7 +2508,7 @@ subroutine update_history_dyn(this,nc,nsites,sites,bc_in) hio_lai_si => this%hvars(ih_lai_si)%r81d ) ! If we don't have dynamics turned on, we just abort these diagnostics - ! if (hlm_use_ed_st3.eq.itrue) return + if (hlm_use_ed_st3.eq.itrue) return model_day_int = nint(hlm_model_day)