Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kumarathunge et al 2019 photosynthetic temperature acclimation #984

Merged
merged 15 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module EDPatchDynamicsMod
use EDParamsMod, only : maxpatch_primary
use EDParamsMod, only : maxpatch_secondary
use EDParamsMod, only : maxpatch_total
use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa
use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa, ema_longterm

! CIME globals
use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=)
Expand Down Expand Up @@ -655,6 +655,7 @@ subroutine spawn_patches( currentSite, bc_in)
! --------------------------------------------------------------------------
call new_patch%tveg24%CopyFromDonor(currentPatch%tveg24)
call new_patch%tveg_lpa%CopyFromDonor(currentPatch%tveg_lpa)
call new_patch%tveg_longterm%CopyFromDonor(currentPatch%tveg_longterm)


! --------------------------------------------------------------------------
Expand Down Expand Up @@ -2103,6 +2104,8 @@ subroutine create_patch(currentSite, new_patch, age, areap, label,nocomp_pft)
call new_patch%tveg24%InitRMean(fixed_24hr,init_value=temp_init_veg,init_offset=real(hlm_current_tod,r8) )
allocate(new_patch%tveg_lpa)
call new_patch%tveg_lpa%InitRmean(ema_lpa,init_value=temp_init_veg)
allocate(new_patch%tveg_longterm)
call new_patch%tveg_longterm%InitRmean(ema_longterm,init_value=temp_init_veg)

! Litter
! Allocate, Zero Fluxes, and Initialize to "unset" values
Expand Down Expand Up @@ -2674,6 +2677,7 @@ subroutine fuse_2_patches(csite, dp, rp)
! Weighted mean of the running means
call rp%tveg24%FuseRMean(dp%tveg24,rp%area*inv_sum_area)
call rp%tveg_lpa%FuseRMean(dp%tveg_lpa,rp%area*inv_sum_area)
call rp%tveg_longterm%FuseRMean(dp%tveg_longterm,rp%area*inv_sum_area)

rp%fuel_eff_moist = (dp%fuel_eff_moist*dp%area + rp%fuel_eff_moist*rp%area) * inv_sum_area
rp%livegrass = (dp%livegrass*dp%area + rp%livegrass*rp%area) * inv_sum_area
Expand Down Expand Up @@ -3045,6 +3049,7 @@ subroutine dealloc_patch(cpatch)
! Deallocate any running means
deallocate(cpatch%tveg24)
deallocate(cpatch%tveg_lpa)
deallocate(cpatch%tveg_longterm)

return
end subroutine dealloc_patch
Expand Down
57 changes: 47 additions & 10 deletions biogeophys/FatesPlantRespPhotosynthMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module FATESPlantRespPhotosynthMod
use FatesConstantsMod, only : fates_unset_r8
use FatesConstantsMod, only : tfrz => t_water_freeze_k_1atm
use FatesConstantsMod, only : nocomp_bareground
use FatesConstantsMod, only : photosynth_acclim_model_none
use FatesConstantsMod, only : photosynth_acclim_model_kumarathunge_etal_2019
use FatesInterfaceTypesMod, only : hlm_use_planthydro
use FatesInterfaceTypesMod, only : hlm_parteh_mode
use FatesInterfaceTypesMod, only : numpft
Expand All @@ -52,10 +54,12 @@ 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 : ED_val_base_mr_20, stomatal_model, stomatal_assim_model, photo_tempsens_model
use PRTParametersMod, only : prt_params
use EDPftvarcon , only : EDPftvarcon_inst

use TemperatureType, only : temperature_type

! CIME Globals
use shr_log_mod , only : errMsg => shr_log_errMsg

Expand Down Expand Up @@ -558,6 +562,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
currentCohort%kp25top, & ! in
nscaler, & ! in
bc_in(s)%t_veg_pa(ifp), & ! in
currentPatch%tveg_lpa%GetMean(), & ! in
currentPatch%tveg_longterm%GetMean(),& ! in
btran_eff, & ! in
vcmax_z, & ! out
jmax_z, & ! out
Expand Down Expand Up @@ -2100,6 +2106,8 @@ subroutine LeafLayerBiophysicalRates( parsun_lsl, &
co2_rcurve_islope25top_ft, &
nscaler, &
veg_tempk, &
t_growth, &
t_home, &
btran, &
vcmax, &
jmax, &
Expand Down Expand Up @@ -2133,6 +2141,8 @@ subroutine LeafLayerBiophysicalRates( parsun_lsl, &
real(r8), intent(in) :: co2_rcurve_islope25top_ft ! initial slope of CO2 response curve
! (C4 plants) at 25C, canopy top, this pft
real(r8), intent(in) :: veg_tempk ! vegetation temperature
real(r8), intent(in) :: t_growth ! T_growth (short-term running mean temperature) (K)
real(r8), intent(in) :: t_home ! T_home (long-term running mean temperature) (K)
real(r8), intent(in) :: btran ! transpiration wetness factor (0 to 1)

real(r8), intent(out) :: vcmax ! maximum rate of carboxylation (umol co2/m**2/s)
Expand All @@ -2158,17 +2168,34 @@ subroutine LeafLayerBiophysicalRates( parsun_lsl, &
real(r8) :: jmaxhd ! deactivation energy for jmax (J/mol)
real(r8) :: vcmaxse ! entropy term for vcmax (J/mol/K)
real(r8) :: jmaxse ! entropy term for jmax (J/mol/K)
real(r8) :: t_growth_celsius ! average growing temperature
real(r8) :: t_home_celsius ! average home temperature
real(r8) :: jvr ! ratio of Jmax25 / Vcmax25
real(r8) :: vcmaxc ! scaling factor for high temperature inhibition (25 C = 1.0)
real(r8) :: jmaxc ! scaling factor for high temperature inhibition (25 C = 1.0)

vcmaxha = EDPftvarcon_inst%vcmaxha(FT)
jmaxha = EDPftvarcon_inst%jmaxha(FT)

vcmaxhd = EDPftvarcon_inst%vcmaxhd(FT)
jmaxhd = EDPftvarcon_inst%jmaxhd(FT)

vcmaxse = EDPftvarcon_inst%vcmaxse(FT)
jmaxse = EDPftvarcon_inst%jmaxse(FT)
select case(photo_tempsens_model)
case (photosynth_acclim_model_none) !No temperature acclimation
vcmaxha = EDPftvarcon_inst%vcmaxha(FT)
jmaxha = EDPftvarcon_inst%jmaxha(FT)
vcmaxhd = EDPftvarcon_inst%vcmaxhd(FT)
jmaxhd = EDPftvarcon_inst%jmaxhd(FT)
vcmaxse = EDPftvarcon_inst%vcmaxse(FT)
jmaxse = EDPftvarcon_inst%jmaxse(FT)
case (photosynth_acclim_model_kumarathunge_etal_2019) !Kumarathunge et al. temperature acclimation, Thome=30-year running mean
t_growth_celsius = t_growth-tfrz
t_home_celsius = t_home-tfrz
vcmaxha = (42.6_r8 + (1.14_r8*t_growth_celsius))*1e3_r8 !J/mol
jmaxha = 40.71_r8*1e3_r8 !J/mol
vcmaxhd = 200._r8*1e3_r8 !J/mol
jmaxhd = 200._r8*1e3_r8 !J/mol
vcmaxse = (645.13_r8 - (0.38_r8*t_growth_celsius))
jmaxse = 658.77_r8 - (0.84_r8*t_home_celsius) - 0.52_r8*(t_growth_celsius-t_home_celsius)
jvr = 2.56_r8 - (0.0375_r8*t_home_celsius)-(0.0202_r8*(t_growth_celsius-t_home_celsius))
case default
write (fates_log(),*)'error, incorrect leaf photosynthesis temperature acclimation model specified'
call endrun(msg=errMsg(sourcefile, __LINE__))
end select

vcmaxc = fth25_f(vcmaxhd, vcmaxse)
jmaxc = fth25_f(jmaxhd, jmaxse)
Expand All @@ -2181,7 +2208,16 @@ subroutine LeafLayerBiophysicalRates( parsun_lsl, &

! Vcmax25top was already calculated to derive the nscaler function
vcmax25 = vcmax25top_ft * nscaler
jmax25 = jmax25top_ft * nscaler
select case(photo_tempsens_model)
case (photosynth_acclim_model_none)
jmax25 = jmax25top_ft * nscaler
case (photosynth_acclim_model_kumarathunge_etal_2019)
jmax25 = vcmax25*jvr
case default
write (fates_log(),*)'error, incorrect leaf photosynthesis temperature acclimation model specified'
call endrun(msg=errMsg(sourcefile, __LINE__))
end select

co2_rcurve_islope25 = co2_rcurve_islope25top_ft * nscaler

! Adjust for temperature
Expand All @@ -2201,6 +2237,7 @@ subroutine LeafLayerBiophysicalRates( parsun_lsl, &
vcmax = vcmax * btran

return

end subroutine LeafLayerBiophysicalRates

subroutine lowstorage_maintresp_reduction(frac, pft, maintresp_reduction_factor)
Expand Down
4 changes: 2 additions & 2 deletions main/EDParamsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module EDParamsMod
! respiration model. 1=Ryan (1991) (NOT YET IMPLEMENTED)
integer,protected, public :: photo_tempsens_model ! switch for choosing the model that defines the temperature
! sensitivity of photosynthetic parameters (vcmax, jmax).
! 1=non-acclimating (NOT YET IMPLEMENTED)
! 1=non-acclimating, 2=Kumarathunge et al., 2019

real(r8),protected, public :: fates_mortality_disturbance_fraction ! the fraction of canopy mortality that results in disturbance
real(r8),protected, public :: ED_val_comp_excln
Expand Down Expand Up @@ -443,7 +443,7 @@ subroutine FatesRegisterParams(fates_params)

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

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

Expand Down
2 changes: 2 additions & 0 deletions main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ module EDTypesMod
class(rmean_type), pointer :: tveg24 ! 24-hour mean vegetation temperature (K)
class(rmean_type), pointer :: tveg_lpa ! Running mean of vegetation temperature at the
! leaf photosynthesis acclimation timescale [K]
class(rmean_type), pointer :: tveg_longterm ! Long-Term Running mean of vegetation temperature at the
! leaf photosynthesis acclimation timescale [K] (i.e T_home)

integer :: nocomp_pft_label ! Where nocomp is active, use this label for patch ID.
! Each patch ID corresponds to a pft number since each
Expand Down
4 changes: 4 additions & 0 deletions main/FatesConstantsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ module FatesConstantsMod
! based on average age of global
! secondary 1900s land in hurtt-2011

! integer labels for specifying harvest units
integer, parameter, public :: photosynth_acclim_model_none = 1
integer, parameter, public :: photosynth_acclim_model_kumarathunge_etal_2019 = 2

! integer labels for specifying harvest units
integer, parameter, public :: hlm_harvest_area_fraction = 1 ! Code for harvesting by area
integer, parameter, public :: hlm_harvest_carbon = 2 ! Code for harvesting based on carbon extracted.
Expand Down
21 changes: 19 additions & 2 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4510,6 +4510,7 @@ subroutine update_history_hifrq(this,nc,nsites,sites,bc_in,dt_tstep)

hio_gpp_si(io_si) = hio_gpp_si(io_si) + &
ccohort%gpp_tstep * n_perm2 * per_dt_tstep

hio_aresp_si(io_si) = hio_aresp_si(io_si) + &
aresp * n_perm2 * per_dt_tstep
hio_growth_resp_si(io_si) = hio_growth_resp_si(io_si) + &
Expand Down Expand Up @@ -4588,6 +4589,7 @@ subroutine update_history_hifrq(this,nc,nsites,sites,bc_in,dt_tstep)
! bulk fluxes are in gC / m2 / s
hio_gpp_canopy_si(io_si) = hio_gpp_canopy_si(io_si) + &
ccohort%gpp_tstep * n_perm2 * per_dt_tstep

hio_ar_canopy_si(io_si) = hio_ar_canopy_si(io_si) + &
aresp * n_perm2 * per_dt_tstep

Expand All @@ -4611,6 +4613,8 @@ subroutine update_history_hifrq(this,nc,nsites,sites,bc_in,dt_tstep)
! bulk fluxes are in gC / m2 / s
hio_gpp_understory_si(io_si) = hio_gpp_understory_si(io_si) + &
ccohort%gpp_tstep * n_perm2 * per_dt_tstep


hio_ar_understory_si(io_si) = hio_ar_understory_si(io_si) + &
aresp * n_perm2 * per_dt_tstep

Expand Down Expand Up @@ -6293,12 +6297,16 @@ subroutine define_history_vars(this, initialize_variables)
ivar=ivar, initialize=initialize_variables, index = ih_tveg_si )

! radiation error

call this%set_history_var(vname='FATES_RAD_ERROR', units='W m-2 ', &
long='radiation error in FATES RTM', use_default='active', &
avgflag='A', vtype=site_r8, hlms='CLM:ALM', upfreq=2, &
ivar=ivar, initialize=initialize_variables, index = ih_rad_error_si)

call this%set_history_var(vname='FATES_AR', units='gC/m^2/s', &
long='autotrophic respiration', use_default='active', &
avgflag='A', vtype=site_r8, hlms='CLM:ALM', upfreq=2, &
ivar=ivar, initialize=initialize_variables, index = ih_aresp_si )

call this%set_history_var(vname='FATES_HARVEST_DEBT', units='kg C', &
long='Accumulated carbon failed to be harvested', use_default='active', &
avgflag='A', vtype=site_r8, hlms='CLM:ALM', upfreq=1, &
Expand Down Expand Up @@ -6374,13 +6382,17 @@ subroutine define_history_vars(this, initialize_variables)
index = ih_excess_resp_si)

! Canopy resistance

call this%set_history_var(vname='FATES_STOMATAL_COND_AP', &
units='mol m-2 s-1', long='mean stomatal conductance - by patch age', &
use_default='inactive', avgflag='A', vtype=site_age_r8, &
hlms='CLM:ALM', upfreq=2, ivar=ivar, initialize=initialize_variables, &
index = ih_c_stomata_si_age)

call this%set_history_var(vname='FATES_AR_CANOPY', units='gC/m^2/s', &
long='autotrophic respiration of canopy plants', use_default='active', &
avgflag='A', vtype=site_r8, hlms='CLM:ALM', upfreq=2, &
ivar=ivar, initialize=initialize_variables, index = ih_ar_canopy_si )

call this%set_history_var(vname='FATES_LBLAYER_COND_AP', &
units='mol m-2 s-1', &
long='mean leaf boundary layer conductance - by patch age', &
Expand All @@ -6401,6 +6413,11 @@ subroutine define_history_vars(this, initialize_variables)
hlms='CLM:ALM', upfreq=2, ivar=ivar, initialize=initialize_variables, &
index = ih_gpp_si_age)

call this%set_history_var(vname='FATES_AR_UNDERSTORY', units='gC/m^2/s', &
long='autotrophic respiration of understory plants', use_default='active', &
avgflag='A', vtype=site_r8, hlms='CLM:ALM', upfreq=2, &
ivar=ivar, initialize=initialize_variables, index = ih_ar_understory_si )

! fast fluxes separated canopy/understory
call this%set_history_var(vname='FATES_GPP_CANOPY', units='kg m-2 s-1', &
long='gross primary production of canopy plants in kg carbon per m2 per second', &
Expand Down
5 changes: 5 additions & 0 deletions main/FatesInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module FatesInterfaceMod
use FatesRunningMeanMod , only : ema_24hr
use FatesRunningMeanMod , only : fixed_24hr
use FatesRunningMeanMod , only : ema_lpa
use FatesRunningMeanMod , only : ema_longterm
use FatesRunningMeanMod , only : ema_60day
use FatesRunningMeanMod , only : moving_ema_window
use FatesRunningMeanMod , only : fixed_window
Expand Down Expand Up @@ -989,6 +990,9 @@ subroutine InitTimeAveragingGlobals()
allocate(ema_lpa)
call ema_lpa%define(photo_temp_acclim_timescale*sec_per_day, &
hlm_stepsize,moving_ema_window)
allocate(ema_longterm) ! for now just fix this as a 30-year exponential moving average
call ema_longterm%define(30._r8*365._r8*sec_per_day, &
hlm_stepsize,moving_ema_window)

!allocate(ema_60day)
!call ema_60day%define(prt_params%fnrt_adapt_tscl*sec_per_day,sec_per_day,moving_ema_window)
Expand Down Expand Up @@ -1949,6 +1953,7 @@ subroutine UpdateFatesRMeansTStep(sites,bc_in)
ifp=ifp+1
call cpatch%tveg24%UpdateRMean(bc_in(s)%t_veg_pa(ifp))
call cpatch%tveg_lpa%UpdateRMean(bc_in(s)%t_veg_pa(ifp))
call cpatch%tveg_longterm%UpdateRMean(bc_in(s)%t_veg_pa(ifp))


!ccohort => cpatch%tallest
Expand Down
7 changes: 7 additions & 0 deletions main/FatesRestartInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ module FatesRestartInterfaceMod
! Running Means
integer :: ir_tveg24_pa
integer :: ir_tveglpa_pa
integer :: ir_tveglongterm_pa

! (Keeping as an example)
!!integer :: ir_tveglpa_co
Expand Down Expand Up @@ -1407,6 +1408,10 @@ subroutine define_restart_vars(this, initialize_variables)
long_name='running average (EMA) of patch veg temp for photo acclim', &
units='K', initialize=initialize_variables,ivar=ivar, index = ir_tveglpa_pa)

call this%DefineRMeanRestartVar(vname='fates_tveglongtermpatch',vtype=cohort_r8, &
long_name='long-term (T_home) running average (EMA) of patch veg temp for photo acclim', &
units='K', initialize=initialize_variables,ivar=ivar, index = ir_tveglongterm_pa)

! (Keeping as an example)
!call this%DefineRMeanRestartVar(vname='fates_tveglpacohort',vtype=cohort_r8, &
! long_name='running average (EMA) of cohort veg temp for photo acclim', &
Expand Down Expand Up @@ -2227,6 +2232,7 @@ subroutine set_restart_vectors(this,nc,nsites,sites)
! Patch level running means
call this%SetRMeanRestartVar(cpatch%tveg24, ir_tveg24_pa, io_idx_co_1st)
call this%SetRMeanRestartVar(cpatch%tveg_lpa, ir_tveglpa_pa, io_idx_co_1st)
call this%SetRMeanRestartVar(cpatch%tveg_longterm, ir_tveglongterm_pa, io_idx_co_1st)

! set cohorts per patch for IO
rio_ncohort_pa( io_idx_co_1st ) = cohortsperpatch
Expand Down Expand Up @@ -3120,6 +3126,7 @@ subroutine get_restart_vectors(this, nc, nsites, sites)

call this%GetRMeanRestartVar(cpatch%tveg24, ir_tveg24_pa, io_idx_co_1st)
call this%GetRMeanRestartVar(cpatch%tveg_lpa, ir_tveglpa_pa, io_idx_co_1st)
call this%GetRMeanRestartVar(cpatch%tveg_longterm, ir_tveglongterm_pa, io_idx_co_1st)

! set cohorts per patch for IO

Expand Down
1 change: 1 addition & 0 deletions main/FatesRunningMeanMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ module FatesRunningMeanMod
class(rmean_def_type), public, pointer :: ema_24hr ! Exponential moving average - 24hr window
class(rmean_def_type), public, pointer :: fixed_24hr ! Fixed, 24-hour window
class(rmean_def_type), public, pointer :: ema_lpa ! Exponential moving average - leaf photo acclimation
class(rmean_def_type), public, pointer :: ema_longterm ! Exponential moving average - long-term leaf photo acclimation
class(rmean_def_type), public, pointer :: ema_60day ! Exponential moving average, 60 day
! Updated daily
class(rmean_def_type), public, pointer :: ema_storemem ! EMA used for smoothing N/C and P/C storage
Expand Down
Loading