Skip to content

Commit

Permalink
Merge pull request #14 from glemieux/respiration-agnostic_vars
Browse files Browse the repository at this point in the history
Update maintenance respiration variable names
  • Loading branch information
ckoven authored Mar 1, 2023
2 parents 7e56708 + 59a865f commit fd9f5f6
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 94 deletions.
31 changes: 16 additions & 15 deletions biogeophys/FatesPlantRespPhotosynthMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module FATESPlantRespPhotosynthMod
use PRTGenericMod, only : max_nleafage
use EDTypesMod, only : do_fates_salinity
use EDParamsMod, only : q10_mr
use EDParamsMod, only : maintresp_model
use EDParamsMod, only : maintresp_leaf_model
use FatesConstantsMod, only : lmrmodel_ryan_1991
use FatesConstantsMod, only : lmrmodel_atkin_etal_2017
use PRTGenericMod, only : prt_carbon_allom_hyp
Expand All @@ -55,7 +55,7 @@ module FATESPlantRespPhotosynthMod
use PRTGenericMod, only : store_organ
use PRTGenericMod, only : repro_organ
use PRTGenericMod, only : struct_organ
use EDParamsMod, only : ED_val_base_mr_20, stomatal_model, stomatal_assim_model
use EDParamsMod, only : maintresp_nonleaf_baserate, stomatal_model, stomatal_assim_model
use PRTParametersMod, only : prt_params
use EDPftvarcon , only : EDPftvarcon_inst

Expand Down Expand Up @@ -527,12 +527,13 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)

! C3 plants
if_c3: if ( nint(EDPftvarcon_inst%c3psn(ft)) == 1 ) then
select case (maintresp_model)
select case (maintresp_leaf_model)

case (lmrmodel_ryan_1991)

call LeafLayerMaintenanceRespiration_Ryan_1991( lnc_top, & ! in
nscaler, & ! in
ft, & ! in
bc_in(s)%t_veg_pa(ifp), & ! in
lmr_z(iv,ft,cl)) ! out

Expand Down Expand Up @@ -777,7 +778,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
if ( int(woody(ft)) == itrue) then
tcwood = q10_mr**((bc_in(s)%t_veg_pa(ifp)-tfrz - 20.0_r8)/10.0_r8)
! kgC/s = kgN * kgC/kgN/s
currentCohort%livestem_mr = live_stem_n * ED_val_base_mr_20 * tcwood * maintresp_reduction_factor
currentCohort%livestem_mr = live_stem_n * maintresp_nonleaf_baserate * tcwood * maintresp_reduction_factor
else
currentCohort%livestem_mr = 0._r8
end if
Expand All @@ -796,7 +797,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
do j = 1,bc_in(s)%nlevsoil
tcsoi = q10_mr**((bc_in(s)%t_soisno_sl(j)-tfrz - 20.0_r8)/10.0_r8)

fnrt_mr_layer = fnrt_n * ED_val_base_mr_20 * tcsoi * rootfr_ft(ft,j) * maintresp_reduction_factor
fnrt_mr_layer = fnrt_n * maintresp_nonleaf_baserate * tcsoi * rootfr_ft(ft,j) * maintresp_reduction_factor

! calculate the cost of carbon for N fixation in each soil layer and calculate N fixation rate based on that [kgC / kgN]

Expand All @@ -817,7 +818,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
! Soil temperature used to adjust base rate of MR
tcsoi = q10_mr**((bc_in(s)%t_soisno_sl(j)-tfrz - 20.0_r8)/10.0_r8)
currentCohort%livecroot_mr = currentCohort%livecroot_mr + &
live_croot_n * ED_val_base_mr_20 * tcsoi * &
live_croot_n * maintresp_nonleaf_baserate * tcsoi * &
rootfr_ft(ft,j) * maintresp_reduction_factor
enddo
else
Expand Down Expand Up @@ -2073,6 +2074,7 @@ end subroutine GetCanopyGasParameters

subroutine LeafLayerMaintenanceRespiration_Ryan_1991(lnc_top, &
nscaler, &
ft, &
veg_tempk, &
lmr)

Expand All @@ -2082,17 +2084,17 @@ subroutine LeafLayerMaintenanceRespiration_Ryan_1991(lnc_top, &
use EDPftvarcon , only : EDPftvarcon_inst

! -----------------------------------------------------------------------
! Base maintenance respiration rate for plant tissues base_mr_20
! Base maintenance respiration rate for plant tissues maintresp_leaf_ryan1991_baserate
! M. Ryan, 1991. Effects of climate change on plant respiration.
! Ecological Applications, 1(2), 157-167.
! Original expression is br = 0.0106 molC/(molN h)
! Conversion by molecular weights of C and N gives 2.525e-6 gC/(gN s)
! Which is the default value of ED_val_base_mr_20
! Which is the default value of maintresp_nonleaf_baserate

! Arguments
real(r8), intent(in) :: lnc_top ! Leaf nitrogen content per unit area at canopy top [gN/m2]

real(r8), intent(in) :: nscaler ! Scale for leaf nitrogen profile
integer, intent(in) :: ft ! (plant) Functional Type Index
real(r8), intent(in) :: veg_tempk ! vegetation temperature
real(r8), intent(out) :: lmr ! Leaf Maintenance Respiration (umol CO2/m**2/s)

Expand All @@ -2107,7 +2109,7 @@ subroutine LeafLayerMaintenanceRespiration_Ryan_1991(lnc_top, &
real(r8), parameter :: lmrc = 1.15912391_r8 ! scaling factor for high
! temperature inhibition (25 C = 1.0)

lmr25top = ED_val_base_mr_20 * (1.5_r8 ** ((25._r8 - 20._r8)/10._r8))
lmr25top = EDPftvarcon_inst%maintresp_leaf_ryan1991_baserate(ft) * (1.5_r8 ** ((25._r8 - 20._r8)/10._r8))
lmr25top = lmr25top * lnc_top / (umolC_to_kgC * g_per_kg)


Expand Down Expand Up @@ -2149,7 +2151,6 @@ subroutine LeafLayerMaintenanceRespiration_Atkin_etal_2017(lnc_top, &
real(r8) :: lmr25 ! leaf layer: leaf maintenance respiration rate at 25C (umol CO2/m**2/s)
real(r8) :: r_0 ! base respiration rate, PFT-dependent (umol CO2/m**2/s)
real(r8) :: r_t_ref ! acclimated ref respiration rate (umol CO2/m**2/s)
real(r8) :: lnc ! Leaf nitrogen content per unit area at this level [gN/m2]
real(r8) :: lmr25top ! canopy top leaf maint resp rate at 25C for this pft (umol CO2/m**2/s)

! Parameters
Expand All @@ -2172,7 +2173,7 @@ subroutine LeafLayerMaintenanceRespiration_Atkin_etal_2017(lnc_top, &

! r_0 currently put into the EDPftvarcon_inst%dev_arbitrary_pft
! all figs in Atkin et al 2017 stop at zero Celsius so we will assume acclimation is fixed below that
r_0 = EDPftvarcon_inst%maintresp_atkinetal2017model_baserate(ft)
r_0 = EDPftvarcon_inst%maintresp_leaf_atkin2017_baserate(ft)
r_t_ref = nscaler * (r_0 + r_1 * lnc_top + r_2 * max(0._r8, (tgrowth - tfrz) ))

lmr = r_t_ref * exp(b * (veg_tempk - tfrz - TrefC) + c * ((veg_tempk-tfrz)**2 - TrefC**2))
Expand All @@ -2192,12 +2193,12 @@ subroutine LeafLayerMaintenanceRespiration_C4(lnc_top, &
use EDPftvarcon , only : EDPftvarcon_inst

! -----------------------------------------------------------------------
! Base maintenance respiration rate for plant tissues base_mr_20
! Base maintenance respiration rate for plant tissues maintresp_nonleaf_baserate
! M. Ryan, 1991. Effects of climate change on plant respiration.
! Ecological Applications, 1(2), 157-167.
! Original expression is br = 0.0106 molC/(molN h)
! Conversion by molecular weights of C and N gives 2.525e-6 gC/(gN s)
! Which is the default value of ED_val_base_mr_20
! Which is the default value of maintresp_nonleaf_baserate

! This contains the original C4 dark respiraiton logic from CLM, which uses a different
! temperature scaling than for C3 plants
Expand All @@ -2214,7 +2215,7 @@ subroutine LeafLayerMaintenanceRespiration_C4(lnc_top, &
real(r8) :: lmr25top ! canopy top leaf maint resp rate at 25C for this pft (umol CO2/m**2/s)


lmr25top = ED_val_base_mr_20 * (1.5_r8 ** ((25._r8 - 20._r8)/10._r8))
lmr25top = maintresp_nonleaf_baserate * (1.5_r8 ** ((25._r8 - 20._r8)/10._r8))
lmr25top = lmr25top * lnc_top / (umolC_to_kgC * g_per_kg)


Expand Down
22 changes: 11 additions & 11 deletions main/EDParamsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module EDParamsMod
! of vegetation temperature used in photosynthesis
! temperature acclimation (NOT YET IMPLEMENTED)

integer,protected, public :: maintresp_model ! switch for choosing between leaf maintenance
integer,protected, public :: maintresp_leaf_model ! switch for choosing between leaf maintenance
! respiration model. 1=Ryan (1991), 2=Atkin et al (2017)
integer,protected, public :: photo_tempsens_model ! switch for choosing the model that defines the temperature
! sensitivity of photosynthetic parameters (vcmax, jmax).
Expand All @@ -45,7 +45,7 @@ module EDParamsMod
real(r8),protected, public :: ED_val_understorey_death
real(r8),protected, public :: ED_val_cwd_fcel
real(r8),protected, public :: ED_val_cwd_flig
real(r8),protected, public :: ED_val_base_mr_20
real(r8),protected, public :: maintresp_nonleaf_baserate
real(r8),protected, public :: ED_val_phen_drought_threshold
real(r8),protected, public :: ED_val_phen_doff_time
real(r8),protected, public :: ED_val_phen_a
Expand Down Expand Up @@ -95,7 +95,7 @@ module EDParamsMod

character(len=param_string_length),parameter,public :: ED_name_photo_temp_acclim_timescale = "fates_leaf_photo_temp_acclim_timescale"
character(len=param_string_length),parameter,public :: name_photo_tempsens_model = "fates_leaf_photo_tempsens_model"
character(len=param_string_length),parameter,public :: name_maintresp_model = "fates_maintresp_model"
character(len=param_string_length),parameter,public :: name_maintresp_model = "fates_maintresp_leaf_model"
character(len=param_string_length),parameter,public :: ED_name_hydr_htftype_node = "fates_hydro_htftype_node"
character(len=param_string_length),parameter,public :: ED_name_mort_disturb_frac = "fates_mort_disturb_frac"
character(len=param_string_length),parameter,public :: ED_name_comp_excln = "fates_comp_excln"
Expand All @@ -105,7 +105,7 @@ module EDParamsMod
character(len=param_string_length),parameter,public :: ED_name_understorey_death = "fates_mort_understorey_death"
character(len=param_string_length),parameter,public :: ED_name_cwd_fcel= "fates_frag_cwd_fcel"
character(len=param_string_length),parameter,public :: ED_name_cwd_flig= "fates_frag_cwd_flig"
character(len=param_string_length),parameter,public :: ED_name_base_mr_20= "fates_base_mr_20"
character(len=param_string_length),parameter,public :: fates_name_maintresp_nonleaf_baserate= "fates_maintresp_nonleaf_baserate"
character(len=param_string_length),parameter,public :: ED_name_phen_drought_threshold= "fates_phen_drought_threshold"
character(len=param_string_length),parameter,public :: ED_name_phen_doff_time= "fates_phen_mindaysoff"
character(len=param_string_length),parameter,public :: ED_name_phen_a= "fates_phen_gddthresh_a"
Expand Down Expand Up @@ -265,7 +265,7 @@ subroutine FatesParamsInit()
vai_width_increase_factor = nan
photo_temp_acclim_timescale = nan
photo_tempsens_model = -9
maintresp_model = -9
maintresp_leaf_model = -9
fates_mortality_disturbance_fraction = nan
ED_val_comp_excln = nan
ED_val_vai_top_bin_width = nan
Expand All @@ -274,7 +274,7 @@ subroutine FatesParamsInit()
ED_val_understorey_death = nan
ED_val_cwd_fcel = nan
ED_val_cwd_flig = nan
ED_val_base_mr_20 = nan
maintresp_nonleaf_baserate = nan
ED_val_phen_drought_threshold = nan
ED_val_phen_doff_time = nan
ED_val_phen_a = nan
Expand Down Expand Up @@ -384,7 +384,7 @@ subroutine FatesRegisterParams(fates_params)
call fates_params%RegisterParameter(name=ED_name_cwd_flig, dimension_shape=dimension_shape_scalar, &
dimension_names=dim_names_scalar)

call fates_params%RegisterParameter(name=ED_name_base_mr_20, dimension_shape=dimension_shape_scalar, &
call fates_params%RegisterParameter(name=fates_name_maintresp_nonleaf_baserate, dimension_shape=dimension_shape_scalar, &
dimension_names=dim_names_scalar)

call fates_params%RegisterParameter(name=ED_name_phen_drought_threshold, dimension_shape=dimension_shape_scalar, &
Expand Down Expand Up @@ -557,7 +557,7 @@ subroutine FatesReceiveParams(fates_params)

call fates_params%RetrieveParameter(name=name_maintresp_model, &
data=tmpreal)
maintresp_model = nint(tmpreal)
maintresp_leaf_model = nint(tmpreal)

call fates_params%RetrieveParameter(name=ED_name_mort_disturb_frac, &
data=fates_mortality_disturbance_fraction)
Expand All @@ -583,8 +583,8 @@ subroutine FatesReceiveParams(fates_params)
call fates_params%RetrieveParameter(name=ED_name_cwd_flig, &
data=ED_val_cwd_flig)

call fates_params%RetrieveParameter(name=ED_name_base_mr_20, &
data=ED_val_base_mr_20)
call fates_params%RetrieveParameter(name=fates_name_maintresp_nonleaf_baserate, &
data=maintresp_nonleaf_baserate)

call fates_params%RetrieveParameter(name=ED_name_phen_drought_threshold, &
data=ED_val_phen_drought_threshold)
Expand Down Expand Up @@ -778,7 +778,7 @@ subroutine FatesReportParams(is_master)
write(fates_log(),fmt0) 'ED_val_understorey_death = ',ED_val_understorey_death
write(fates_log(),fmt0) 'ED_val_cwd_fcel = ',ED_val_cwd_fcel
write(fates_log(),fmt0) 'ED_val_cwd_flig = ',ED_val_cwd_flig
write(fates_log(),fmt0) 'ED_val_base_mr_20 = ', ED_val_base_mr_20
write(fates_log(),fmt0) 'fates_maintresp_nonleaf_baserate = ', maintresp_nonleaf_baserate
write(fates_log(),fmt0) 'ED_val_phen_drought_threshold = ',ED_val_phen_drought_threshold
write(fates_log(),fmt0) 'ED_val_phen_doff_time = ',ED_val_phen_doff_time
write(fates_log(),fmt0) 'ED_val_phen_a = ',ED_val_phen_a
Expand Down
20 changes: 15 additions & 5 deletions main/EDPftvarcon.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ module EDPftvarcon
real(r8), allocatable :: maintresp_reduction_intercept(:) ! intercept of MR reduction as f(carbon storage),
! 0=no throttling, 1=max throttling

real(r8), allocatable :: maintresp_atkinetal2017model_baserate(:) ! leaf maintenance respiration base rate (r0)
! per Atkin et al 2017
real(r8), allocatable :: maintresp_leaf_atkin2017_baserate(:) ! leaf maintenance respiration base rate (r0)
! per Atkin et al 2017

real(r8), allocatable :: maintresp_leaf_ryan1991_baserate(:) ! leaf maintenance respiration per Ryan et al 1991

real(r8), allocatable :: bmort(:)
real(r8), allocatable :: mort_ip_size_senescence(:) ! inflection point of dbh dependent senescence
Expand Down Expand Up @@ -430,7 +432,11 @@ subroutine Register_PFT(this, fates_params)
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

name = 'fates_maintresp_atkinetal2017model_baserate'
name = 'fates_maintresp_leaf_atkin2017_baserate'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

name = 'fates_maintresp_leaf_ryan1991_baserate'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

Expand Down Expand Up @@ -782,9 +788,13 @@ subroutine Receive_PFT(this, fates_params)
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%maintresp_reduction_intercept)

name = 'fates_maintresp_atkinetal2017model_baserate'
name = 'fates_maintresp_leaf_atkin2017_baserate'
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%maintresp_leaf_atkin2017_baserate)

name = 'fates_maintresp_leaf_ryan1991_baserate'
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%maintresp_atkinetal2017model_baserate)
data=this%maintresp_leaf_ryan1991_baserate)

name = 'fates_prescribed_npp_canopy'
call fates_params%RetrieveParameterAllocate(name=name, &
Expand Down
36 changes: 0 additions & 36 deletions parameter_files/archive/api25.1.1_021623_pr931-1.xml

This file was deleted.

12 changes: 0 additions & 12 deletions parameter_files/archive/api25.1.1_021623_pr931-2.xml

This file was deleted.

Loading

0 comments on commit fd9f5f6

Please sign in to comment.