From ed442bb341d61c5c9dfb63a9b8d5413b84f6f3a3 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 May 2020 16:08:46 -0700 Subject: [PATCH 01/14] Added changes for Medlyn parameters --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 56 +++++++++------------- main/EDParamsMod.F90 | 44 +++++++---------- main/EDPftvarcon.F90 | 35 +++++++++++--- parameter_files/fates_params_default.cdl | 54 ++++++++++----------- 4 files changed, 96 insertions(+), 93 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 0f2d32a5dd..23e98d62ba 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -46,7 +46,7 @@ module FATESPlantRespPhotosynthMod use PRTGenericMod, only : store_organ use PRTGenericMod, only : repro_organ use PRTGenericMod, only : struct_organ - use EDParamsMod, only : ED_val_bbopt_c3, ED_val_bbopt_c4, ED_val_base_mr_20 + use EDParamsMod, only : ED_val_base_mr_20 ! CIME Globals use shr_log_mod , only : errMsg => shr_log_errMsg @@ -161,8 +161,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) real(r8) :: mm_kco2 ! Michaelis-Menten constant for CO2 (Pa) real(r8) :: mm_ko2 ! Michaelis-Menten constant for O2 (Pa) real(r8) :: co2_cpoint ! CO2 compensation point (Pa) - real(r8) :: btran_eff ! effective transpiration wetness factor (0 to 1) - real(r8) :: bbb ! Ball-Berry minimum leaf conductance (umol H2O/m**2/s) + real(r8) :: btran_eff ! effective transpiration wetness factor (0 to 1) + real(r8) :: stomatal_intercept_btran ! water-stressed minimum stomatal conductance (umol H2O/m**2/s) real(r8) :: kn ! leaf nitrogen decay coefficient real(r8) :: cf ! s m**2/umol -> s/m (ideal gas conversion) [umol/m3] real(r8) :: gb_mol ! leaf boundary layer conductance (molar form: [umol /m**2/s]) @@ -243,18 +243,14 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! Ball-Berry minimum leaf conductance, unstressed (umol H2O/m**2/s) ! For C3 and C4 plants ! ----------------------------------------------------------------------------------- - real(r8), dimension(0:1) :: bbbopt associate( & + stomatal_intercept => EDPftvarcon_inst%stomatal_intercept, & c3psn => EDPftvarcon_inst%c3psn , & slatop => EDPftvarcon_inst%slatop , & ! specific leaf area at top of canopy, ! projected area basis [m^2/gC] woody => EDPftvarcon_inst%woody) ! Is vegetation woody or not? - - bbbopt(0) = ED_val_bbopt_c4 - bbbopt(1) = ED_val_bbopt_c3 - do s = 1,nsites ! Multi-layer parameters scaled by leaf nitrogen profile. @@ -393,10 +389,10 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) (hlm_use_planthydro.eq.itrue) .or. & (nleafage > 1) .or. & (hlm_parteh_mode .ne. prt_carbon_allom_hyp ) ) then - - if (hlm_use_planthydro.eq.itrue ) then - - bbb = max( cf/rsmax0, bbbopt(nint(c3psn(ft)))*currentCohort%co_hydr%btran ) + + if (hlm_use_planthydro.eq.itrue ) then + + stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentCohort%co_hydr%btran ) btran_eff = currentCohort%co_hydr%btran ! dinc_ed is the total vegetation area index of each "leaf" layer @@ -412,8 +408,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) cumulative_lai = lai_canopy_above + lai_layers_above + 0.5*lai_current else - - bbb = max( cf/rsmax0, bbbopt(nint(c3psn(ft)))*currentPatch%btran_ft(ft) ) + + stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentPatch%btran_ft(ft)) btran_eff = currentPatch%btran_ft(ft) ! For consistency sake, we use total LAI here, and not exposed ! if the plant is under-snow, it will be effectively dormant for @@ -518,7 +514,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) bc_in(s)%cair_pa(ifp), & ! in bc_in(s)%oair_pa(ifp), & ! in btran_eff, & ! in - bbb, & ! in + stomatal_intercept_btran, & ! in cf, & ! in gb_mol, & ! in ceair, & ! in @@ -822,7 +818,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in can_co2_ppress, & ! in can_o2_ppress, & ! in btran, & ! in - bbb, & ! in + stomatal_intercept_btran, & ! in cf, & ! in gb_mol, & ! in ceair, & ! in @@ -877,7 +873,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in real(r8), intent(in) :: can_co2_ppress ! Partial pressure of CO2 NEAR the leaf surface (Pa) real(r8), intent(in) :: can_o2_ppress ! Partial pressure of O2 NEAR the leaf surface (Pa) real(r8), intent(in) :: btran ! transpiration wetness factor (0 to 1) - real(r8), intent(in) :: bbb ! Ball-Berry minimum leaf conductance (umol H2O/m**2/s) + real(r8), intent(in) :: stomatal_intercept_btran !water-stressed minimum stomatal conductance (umol H2O/m**2/s) real(r8), intent(in) :: cf ! s m**2/umol -> s/m (ideal gas conversion) [umol/m3] real(r8), intent(in) :: gb_mol ! leaf boundary layer conductance (umol /m**2/s) real(r8), intent(in) :: ceair ! vapor pressure of air, constrained (Pa) @@ -920,9 +916,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in real(r8) :: leaf_co2_ppress ! CO2 partial pressure at leaf surface (Pa) real(r8) :: init_co2_inter_c ! First guess intercellular co2 specific to C path - real(r8), dimension(0:1) :: bbbopt ! Cuticular conductance at full water potential (umol H2O /m2/s) - - ! Parameters ! ------------------------------------------------------------------------ @@ -952,15 +945,12 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.999_r8 - associate( bb_slope => EDPftvarcon_inst%BB_slope) ! slope of BB relationship - + associate( bb_slope => EDPftvarcon_inst%bb_slope, & ! slope of BB relationship + stomatal_intercept=> EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance, the unit is umol/m**2/s ! photosynthetic pathway: 0. = c4, 1. = c3 c3c4_path_index = nint(EDPftvarcon_inst%c3psn(ft)) - bbbopt(0) = ED_val_bbopt_c4 - bbbopt(1) = ED_val_bbopt_c3 - if (c3c4_path_index == 1) then init_co2_inter_c = init_a2l_co2_c3 * can_co2_ppress else @@ -978,7 +968,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! The cuticular conductance already factored in maximum resistance as a bound ! no need to re-bound it - rstoma_out = cf/bbb + rstoma_out = cf/stomatal_intercept_btran c13disc_z = 0.0_r8 !carbon 13 discrimination in night time carbon flux, note value of 1.0 is used in CLM @@ -1094,13 +1084,13 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in end if ! Quadratic gs_mol calculation with an known. Valid for an >= 0. - ! With an <= 0, then gs_mol = bbb + ! With an <= 0, then gs_mol = stomatal_intercept_btran leaf_co2_ppress = can_co2_ppress- 1.4_r8/gb_mol * anet * can_press leaf_co2_ppress = max(leaf_co2_ppress,1.e-06_r8) aquad = leaf_co2_ppress - bquad = leaf_co2_ppress*(gb_mol - bbb) - bb_slope(ft) * anet * can_press - cquad = -gb_mol*(leaf_co2_ppress*bbb + & + bquad = leaf_co2_ppress*(gb_mol - stomatal_intercept_btran) - bb_slope(ft) * anet * can_press + cquad = -gb_mol*(leaf_co2_ppress*stomatal_intercept_btran + & bb_slope(ft)*anet*can_press * ceair/ veg_esat ) call quadratic_f (aquad, bquad, cquad, r1, r2) @@ -1121,9 +1111,9 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in end if end do !iteration loop - ! End of co2_inter_c iteration. Check for an < 0, in which case gs_mol = bbb + ! End of co2_inter_c iteration. Check for an < 0, in which case gs_mol = stomatal_intercept_btran if (anet < 0._r8) then - gs_mol = bbb + gs_mol = stomatal_intercept_btran end if ! Final estimates for leaf_co2_ppress and co2_inter_c @@ -1169,7 +1159,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! Compare with Ball-Berry model: gs_mol = m * an * hs/leaf_co2_ppress p + b hs = (gb_mol*ceair + gs_mol* veg_esat ) / ((gb_mol+gs_mol)*veg_esat ) - gs_mol_err = bb_slope(ft)*max(anet, 0._r8)*hs/leaf_co2_ppress*can_press + bbb + gs_mol_err = bb_slope(ft)*max(anet, 0._r8)*hs/leaf_co2_ppress*can_press + stomatal_intercept_btran if (abs(gs_mol-gs_mol_err) > 1.e-01_r8) then write (fates_log(),*) 'CF: Ball-Berry error check - stomatal conductance error:' @@ -1190,7 +1180,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in psn_out = 0._r8 anet_av_out = 0._r8 - rstoma_out = min(rsmax0, cf/(stem_cuticle_loss_frac*bbbopt(c3c4_path_index))) + rstoma_out = min(rsmax0, cf/(stem_cuticle_loss_frac*stomatal_intercept(ft) )) c13disc_z = 0.0_r8 end if !is there leaf area? diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index d9c7a4e050..4db16f8f15 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -28,8 +28,6 @@ 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_bbopt_c3 - real(r8),protected, public :: ED_val_bbopt_c4 real(r8),protected, public :: ED_val_base_mr_20 real(r8),protected, public :: ED_val_phen_drought_threshold real(r8),protected, public :: ED_val_phen_doff_time @@ -44,6 +42,7 @@ module EDParamsMod real(r8),protected, public :: ED_val_cohort_age_fusion_tol real(r8),protected, public :: ED_val_patch_fusion_tol real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometry + integer,protected, public :: stomatal_model !switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire @@ -68,8 +67,6 @@ 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_cwd_fcel" character(len=param_string_length),parameter,public :: ED_name_cwd_flig= "fates_cwd_flig" - character(len=param_string_length),parameter,public :: ED_name_bbopt_c3= "fates_bbopt_c3" - character(len=param_string_length),parameter,public :: ED_name_bbopt_c4= "fates_bbopt_c4" character(len=param_string_length),parameter,public :: ED_name_base_mr_20= "fates_base_mr_20" 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_doff_time" @@ -84,6 +81,7 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_cohort_age_fusion_tol = "fates_cohort_age_fusion_tol" character(len=param_string_length),parameter,public :: ED_name_patch_fusion_tol= "fates_patch_fusion_tol" character(len=param_string_length),parameter,public :: ED_name_canopy_closure_thresh= "fates_canopy_closure_thresh" + character(len=param_string_length),parameter,public :: ED_name_stomatal_model= "fates_leaf_stomatal_model" ! Resistance to active crown fire @@ -171,8 +169,6 @@ subroutine FatesParamsInit() ED_val_understorey_death = nan ED_val_cwd_fcel = nan ED_val_cwd_flig = nan - ED_val_bbopt_c3 = nan - ED_val_bbopt_c4 = nan ED_val_base_mr_20 = nan ED_val_phen_drought_threshold = nan ED_val_phen_doff_time = nan @@ -186,7 +182,8 @@ subroutine FatesParamsInit() ED_val_cohort_size_fusion_tol = nan ED_val_cohort_age_fusion_tol = nan ED_val_patch_fusion_tol = nan - ED_val_canopy_closure_thresh = nan + ED_val_canopy_closure_thresh = nan + stomatal_model = -9 hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan @@ -230,6 +227,7 @@ subroutine FatesRegisterParams(fates_params) character(len=param_string_length), parameter :: dim_names_height(1) = (/dimension_name_history_height_bins/) character(len=param_string_length), parameter :: dim_names_coageclass(1) = (/dimension_name_history_coage_bins/) + call FatesParamsInit() call fates_params%RegisterParameter(name=ED_name_mort_disturb_frac, dimension_shape=dimension_shape_scalar, & @@ -253,12 +251,6 @@ 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_bbopt_c3, dimension_shape=dimension_shape_scalar, & - dimension_names=dim_names_scalar) - - call fates_params%RegisterParameter(name=ED_name_bbopt_c4, 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, & dimension_names=dim_names_scalar) @@ -300,6 +292,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_canopy_closure_thresh, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + + call fates_params%RegisterParameter(name=ED_name_stomatal_model, 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) @@ -378,8 +373,8 @@ subroutine FatesReceiveParams(fates_params) class(fates_parameters_type), intent(inout) :: fates_params - real(r8) :: active_crown_fire_real !Local temp to transfer real data in file - + real(r8) :: tmpreal ! local real variable for changing type on read + call fates_params%RetreiveParameter(name=ED_name_mort_disturb_frac, & data=fates_mortality_disturbance_fraction) @@ -401,12 +396,6 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=ED_name_cwd_flig, & data=ED_val_cwd_flig) - call fates_params%RetreiveParameter(name=ED_name_bbopt_c3, & - data=ED_val_bbopt_c3) - - call fates_params%RetreiveParameter(name=ED_name_bbopt_c4, & - data=ED_val_bbopt_c4) - call fates_params%RetreiveParameter(name=ED_name_base_mr_20, & data=ED_val_base_mr_20) @@ -449,6 +438,10 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=ED_name_canopy_closure_thresh, & data=ED_val_canopy_closure_thresh) + call fates_params%RetreiveParameter(name=ED_name_stomatal_model, & + data=tmpreal) + stomatal_model = nint(tmpreal) + call fates_params%RetreiveParameter(name=hydr_name_kmax_rsurf1, & data=hydr_kmax_rsurf1) @@ -495,8 +488,8 @@ subroutine FatesReceiveParams(fates_params) data=q10_froz) call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & - data=active_crown_fire_real) - active_crown_fire = (abs(active_crown_fire_real-1.0_r8) Date: Thu, 28 May 2020 09:55:42 -0700 Subject: [PATCH 02/14] updated fine root profile parameter interface --- main/EDPftvarcon.F90 | 46 ++++++++++++++---------- parameter_files/fates_params_default.cdl | 31 ++++++++-------- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 4b12740845..5326b61e33 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -70,8 +70,12 @@ module EDPftvarcon real(r8), allocatable :: slamax(:) ! Maximum specific leaf area of plant (at bottom) [m2/gC] real(r8), allocatable :: slatop(:) ! Specific leaf area at canopy top [m2/gC] - real(r8), allocatable :: roota_par(:) ! Normalized Root profile scaling parameter A - real(r8), allocatable :: rootb_par(:) ! Normalized root profile scaling parameter B + integer, allocatable :: fates_fnrt_prof_mode(:) ! Index to select fine root profile function: + ! 1) Jackson Beta, 2) 1-param exponential + ! 3) 2-param exponential + real(r8),allocatable :: fates_fnrt_prof_a(:) ! a parameter for fine-root profile (1st parameter) + real(r8),allocatable :: fates_fnrt_prof_b(:) ! b parameter for fine-root profile (2nd parameter) + real(r8), allocatable :: lf_flab(:) ! Leaf litter labile fraction [-] real(r8), allocatable :: lf_fcel(:) ! Leaf litter cellulose fraction [-] real(r8), allocatable :: lf_flig(:) ! Leaf litter lignan fraction [-] @@ -124,7 +128,9 @@ module EDPftvarcon real(r8), allocatable :: rhos(:, :) real(r8), allocatable :: taul(:, :) real(r8), allocatable :: taus(:, :) - real(r8), allocatable :: rootprof_beta(:, :) + + + ! Fire Parameters (No PFT vector capabilities in their own routines) ! See fire/SFParamsMod.F90 for bulk of fire parameters @@ -502,11 +508,15 @@ 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_roota_par' + name = 'fates_fnrt_prof_mode' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_fnrt_prof_a' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_rootb_par' + name = 'fates_fnrt_prof_b' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -1023,14 +1033,19 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%slatop) - name = 'fates_roota_par' + name = 'fates_fnrt_prof_mode' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%roota_par) + data=this%fnrt_prof_mode) - name = 'fates_rootb_par' + name = 'fates_fnrt_prof_a' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%rootb_par) + data=this%fnrt_prof_a) + name = 'fates_fnrt_prof_b' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%fnrt_prof_b) + + name = 'fates_lf_flab' call fates_params%RetreiveParameterAllocate(name=name, & data=this%lf_flab) @@ -1628,10 +1643,6 @@ subroutine Register_PFT_nvariants(this, fates_params) !X! call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & !X! dimension_names=dim_names) - name = 'fates_rootprof_beta' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) - end subroutine Register_PFT_nvariants !----------------------------------------------------------------------- @@ -1651,9 +1662,6 @@ subroutine Receive_PFT_nvariants(this, fates_params) !X! call fates_params%RetreiveParameter(name=name, & !X! data=this%) - name = 'fates_rootprof_beta' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%rootprof_beta) end subroutine Receive_PFT_nvariants @@ -1986,8 +1994,9 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'slamax = ',EDPftvarcon_inst%slamax write(fates_log(),fmt0) 'slatop = ',EDPftvarcon_inst%slatop write(fates_log(),fmt0) 'leaf_long = ',EDPftvarcon_inst%leaf_long - write(fates_log(),fmt0) 'roota_par = ',EDPftvarcon_inst%roota_par - write(fates_log(),fmt0) 'rootb_par = ',EDPftvarcon_inst%rootb_par + write(fates_log(),fmt0) 'fnrt_prof_mode = ',EDPftvarcon_inst%fnrt_prof_mode + write(fates_log(),fmt0) 'fnrt_prof_a = ',EDPftvarcon_inst%fnrt_prof_a + write(fates_log(),fmt0) 'fnrt_prof_b = ',EDPftvarcon_inst%fnrt_prof_b write(fates_log(),fmt0) 'lf_flab = ',EDPftvarcon_inst%lf_flab write(fates_log(),fmt0) 'lf_fcel = ',EDPftvarcon_inst%lf_fcel write(fates_log(),fmt0) 'lf_flig = ',EDPftvarcon_inst%lf_flig @@ -2033,7 +2042,6 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'phenflush_fraction',EDpftvarcon_inst%phenflush_fraction write(fates_log(),fmt0) 'phen_cold_size_threshold = ',EDPftvarcon_inst%phen_cold_size_threshold write(fates_log(),fmt0) 'phen_stem_drop_fraction',EDpftvarcon_inst%phen_stem_drop_fraction - write(fates_log(),fmt0) 'rootprof_beta = ',EDPftvarcon_inst%rootprof_beta write(fates_log(),fmt0) 'fire_alpha_SH = ',EDPftvarcon_inst%fire_alpha_SH write(fates_log(),fmt0) 'allom_hmode = ',EDPftvarcon_inst%allom_hmode write(fates_log(),fmt0) 'allom_lmode = ',EDPftvarcon_inst%allom_lmode diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 668d69d49d..ce25541cb0 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -281,9 +281,13 @@ variables: double fates_leaf_tpuse(fates_pft) ; fates_leaf_tpuse:units = "J/mol/K" ; fates_leaf_tpuse:long_name = "entropy term for tpu" ; + double fates_leaf_vcmax25top(fates_leafage_class, fates_pft) ; fates_leaf_vcmax25top:units = "umol CO2/m^2/s" ; fates_leaf_vcmax25top:long_name = "maximum carboxylation rate of Rub. at 25C, canopy top" ; + + + double fates_leaf_vcmaxha(fates_pft) ; fates_leaf_vcmaxha:units = "J/mol" ; fates_leaf_vcmaxha:long_name = "activation energy for vcmax" ; @@ -425,15 +429,15 @@ variables: double fates_root_long(fates_pft) ; fates_root_long:units = "yr" ; fates_root_long:long_name = "root longevity (alternatively, turnover time)" ; - double fates_roota_par(fates_pft) ; - fates_roota_par:units = "1/m" ; - fates_roota_par:long_name = "CLM rooting distribution parameter" ; - double fates_rootb_par(fates_pft) ; - fates_rootb_par:units = "1/m" ; - fates_rootb_par:long_name = "CLM rooting distribution parameter" ; - double fates_rootprof_beta(fates_variants, fates_pft) ; - fates_rootprof_beta:units = "unitless" ; - fates_rootprof_beta:long_name = "Rooting beta parameter, for C and N vertical discretization (NOT USED BY DEFAULT)" ; + double fates_fnrt_prof_mode(fates_pft) ; + fates_fnrt_prof_mode:units = "index" ; + fates_fnrt_prof_mode:long_name = "Index to select fine root profile function: 1) Jackson Beta, 2) 1-param exponential 3) 2-param exponential" ; + double fates_fnrt_prof_a(fates_pft) ; + fates_fnrt_prof_a:units = "unitless" + fates_fnrt_prof_a:long_name = "Fine root profile function, parameter a" ; + double fates_fnrt_prof_b(fates_pft) ; + fates_fnrt_prof_b:units = "unitless" + fates_fnrt_prof_b:long_name = "Fine root profile function, parameter b" ; double fates_seed_alloc(fates_pft) ; fates_seed_alloc:units = "fraction" ; fates_seed_alloc:long_name = "fraction of available carbon balance allocated to seeds" ; @@ -1124,14 +1128,11 @@ data: fates_root_long = 1, 2, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1, 1 ; - fates_roota_par = 7, 7, 7, 7, 6, 6, 7, 7, 7, 11, 11, 11 ; + fates_fnrt_prof_mode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ; - fates_rootb_par = 1, 2, 2, 1, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; + fates_fnrt_prof_a = 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976 ; - fates_rootprof_beta = - 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, - 0.976, 0.976, - _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_fnrt_prof_b = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 ; From 8389ab287d6b399e99f179bf107706ef488e15bf Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Thu, 28 May 2020 15:29:29 -0700 Subject: [PATCH 03/14] Removed code that switches contexts for root fractions --- biogeochem/EDCohortDynamicsMod.F90 | 4 +- biogeochem/EDLoggingMortalityMod.F90 | 5 +- biogeochem/EDPatchDynamicsMod.F90 | 8 +- biogeochem/EDPhysiologyMod.F90 | 4 +- biogeochem/FatesAllometryMod.F90 | 118 +++++++++------------ biogeophys/EDBtranMod.F90 | 4 +- biogeophys/FatesBstressMod.F90 | 4 +- biogeophys/FatesPlantHydraulicsMod.F90 | 24 +---- biogeophys/FatesPlantRespPhotosynthMod.F90 | 3 +- main/EDPftvarcon.F90 | 34 ++++-- parameter_files/fates_params_default.cdl | 10 +- 11 files changed, 98 insertions(+), 120 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index c88e83c1c6..3e3e25334b 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -64,7 +64,6 @@ module EDCohortDynamicsMod use FatesAllometryMod , only : carea_allom use FatesAllometryMod , only : ForceDBH use FatesAllometryMod , only : tree_lai, tree_sai - use FatesAllometryMod , only : i_biomass_rootprof_context use FatesAllometryMod , only : set_root_fraction use PRTGenericMod, only : prt_carbon_allom_hyp use PRTGenericMod, only : prt_cnp_flex_allom_hyp @@ -847,8 +846,7 @@ subroutine SendCohortToLitter(csite,cpatch,ccohort,nplant) plant_dens = nplant/cpatch%area - call set_root_fraction(csite%rootfrac_scr, pft, csite%zi_soil, & - icontext = i_biomass_rootprof_context) + call set_root_fraction(csite%rootfrac_scr, pft, csite%zi_soil) do el=1,num_elements diff --git a/biogeochem/EDLoggingMortalityMod.F90 b/biogeochem/EDLoggingMortalityMod.F90 index 060a156f39..83294dfb28 100644 --- a/biogeochem/EDLoggingMortalityMod.F90 +++ b/biogeochem/EDLoggingMortalityMod.F90 @@ -55,7 +55,6 @@ module EDLoggingMortalityMod use PRTGenericMod , only : sapw_organ, struct_organ, leaf_organ use PRTGenericMod , only : fnrt_organ, store_organ, repro_organ use FatesAllometryMod , only : set_root_fraction - use FatesAllometryMod , only : i_biomass_rootprof_context implicit none private @@ -409,9 +408,7 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site ! derived from the current patch, so we need to multiply by patch_areadis/np%area ! ---------------------------------------------------------------------------------------- - call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & - icontext = i_biomass_rootprof_context) - + call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil) ag_wood = (direct_dead+indirect_dead) * (struct_m + sapw_m ) * & EDPftvarcon_inst%allom_agb_frac(currentCohort%pft) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 2998fd85d8..fa2ac315af 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -53,7 +53,6 @@ module EDPatchDynamicsMod use EDParamsMod , only : fates_mortality_disturbance_fraction use FatesAllometryMod , only : carea_allom use FatesAllometryMod , only : set_root_fraction - use FatesAllometryMod , only : i_biomass_rootprof_context use FatesConstantsMod , only : g_per_kg use FatesConstantsMod , only : ha_per_m2 use FatesConstantsMod , only : days_per_sec @@ -1531,8 +1530,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, newPatch, patch_site_ar site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass - call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & - icontext = i_biomass_rootprof_context) + call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil) ! Contribution of dead trees to root litter (no root burn flux to atm) do dcmpy=1,ndcmpy @@ -1741,8 +1739,8 @@ subroutine mortality_litter_fluxes(currentSite, currentPatch, newPatch, patch_si ag_wood = num_dead * (struct_m + sapw_m) * EDPftvarcon_inst%allom_agb_frac(pft) bg_wood = num_dead * (struct_m + sapw_m) * (1.0_r8-EDPftvarcon_inst%allom_agb_frac(pft)) - call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & - icontext = i_biomass_rootprof_context) + call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil) + do c=1,ncwd diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 57e5837a0a..b51d7e269f 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -81,7 +81,6 @@ module EDPhysiologyMod use FatesAllometryMod , only : carea_allom use FatesAllometryMod , only : CheckIntegratedAllometries use FatesAllometryMod, only : set_root_fraction - use FatesAllometryMod, only : i_biomass_rootprof_context use PRTGenericMod, only : prt_carbon_allom_hyp use PRTGenericMod, only : prt_cnp_flex_allom_hyp @@ -1797,8 +1796,7 @@ subroutine CWDInput( currentSite, currentPatch, litt) do while(associated(currentCohort)) pft = currentCohort%pft - call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & - icontext = i_biomass_rootprof_context) + call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil) leaf_m_turnover = currentCohort%prt%GetTurnover(leaf_organ,element_id) store_m_turnover = currentCohort%prt%GetTurnover(store_organ,element_id) diff --git a/biogeochem/FatesAllometryMod.F90 b/biogeochem/FatesAllometryMod.F90 index d43b1e7769..21bcbcd7c5 100644 --- a/biogeochem/FatesAllometryMod.F90 +++ b/biogeochem/FatesAllometryMod.F90 @@ -128,22 +128,6 @@ module FatesAllometryMod character(len=*), parameter :: sourcefile = __FILE__ - ! The code will call the wrapper routine "set_root_fraction" - ! in at least two different context. In one context it will query - ! set_root_fraction to describe the depth profile of hydraulicly - ! active roots. In the other context, it will ask the wrapper - ! to define the profile of roots as litter. We allow these - ! two contexts to differ. While not fully implemented, the use - ! will have control parameters to choose from different relationships - ! in these two contexts. The calling function, therefore - ! has to tell the wrapper function which context (water or biomass) - ! is being querried. So that we don't have to do messy string - ! parsing, we have two pre-defined flags. - - integer, parameter, public :: i_hydro_rootprof_context = 1 - integer, parameter, public :: i_biomass_rootprof_context = 2 - - ! If testing b4b with older versions, do not remove sapwood ! Our old methods with saldarriaga did not remove sapwood from the ! bdead pool. But newer allometries are providing total agb @@ -1977,7 +1961,8 @@ end subroutine carea_2pwr ! ========================================================================= - subroutine set_root_fraction(root_fraction, ft, zi, icontext ) + subroutine set_root_fraction(root_fraction, ft, zi) + ! ! !DESCRIPTION: ! Calculates the fractions of the root biomass in each layer for each pft. @@ -1992,7 +1977,6 @@ subroutine set_root_fraction(root_fraction, ft, zi, icontext ) real(r8),intent(inout) :: root_fraction(:) ! Normalized profile integer, intent(in) :: ft ! functional typpe real(r8),intent(in) :: zi(0:) ! Center of depth [m] - integer,intent(in) :: icontext ! Parameters ! @@ -2009,8 +1993,8 @@ subroutine set_root_fraction(root_fraction, ft, zi, icontext ) ! exponential. ! All methods return a normalized profile. - integer, parameter :: exponential_1p_profile_type = 1 - integer, parameter :: jackson_beta_profile_type = 2 + integer, parameter :: jackson_beta_profile_type = 1 + integer, parameter :: exponential_1p_profile_type = 2 integer, parameter :: exponential_2p_profile_type = 3 integer :: root_profile_type @@ -2027,40 +2011,21 @@ subroutine set_root_fraction(root_fraction, ft, zi, icontext ) call endrun(msg=errMsg(sourcefile, __LINE__)) end if - if(icontext == i_hydro_rootprof_context) then - - root_profile_type = exponential_2p_profile_type - - else if(icontext == i_biomass_rootprof_context) then - - root_profile_type = jackson_beta_profile_type - - else - write(fates_log(),*) 'An undefined context for calculating root profiles was provided' - write(fates_log(),*) 'There are only two contexts, hydraulic and biomass, pick one.' - write(fates_log(),*) 'Aborting' - call endrun(msg=errMsg(sourcefile, __LINE__)) - end if - - select case(root_profile_type) + select case(nint(EDPftvarcon_inst%fnrt_prof_mode(ft))) case ( exponential_1p_profile_type ) - call exponential_1p_root_profile(root_fraction, ft, zi) + call exponential_1p_root_profile(root_fraction, ft, zi, EDPftvarcon_inst%fnrt_prof_a(ft)) case ( jackson_beta_profile_type ) - call jackson_beta_root_profile(root_fraction, ft, zi) + call jackson_beta_root_profile(root_fraction, ft, zi, EDPftvarcon_inst%fnrt_prof_a(ft)) case ( exponential_2p_profile_type ) - call exponential_2p_root_profile(root_fraction, ft, zi) + call exponential_2p_root_profile(root_fraction, ft, zi, & + EDPftvarcon_inst%fnrt_prof_a(ft),EDPftvarcon_inst%fnrt_prof_b(ft)) case default write(fates_log(),*) 'An undefined root profile type was specified' write(fates_log(),*) 'Aborting' call endrun(msg=errMsg(sourcefile, __LINE__)) end select -! if( abs(sum(root_fraction)-1.0_r8) > 1.e-9_r8 ) then -! write(fates_log(),*) 'Root fractions should add up to 1' -! write(fates_log(),*) root_fraction -! call endrun(msg=errMsg(sourcefile, __LINE__)) -! end if correction = 1._r8 - sum(root_fraction) corr_id = maxloc(root_fraction) @@ -2073,27 +2038,49 @@ end subroutine set_root_fraction ! ===================================================================================== - subroutine exponential_2p_root_profile(root_fraction, ft, zi ) + subroutine exponential_2p_root_profile(root_fraction, ft, zi, a, b) ! ! !ARGUMENTS real(r8),intent(out) :: root_fraction(:) integer,intent(in) :: ft real(r8),intent(in) :: zi(0:) + real(r8),intent(in) :: a ! Exponential shape parameter a + real(r8),intent(in) :: b ! Exponential shape parameter b ! Locals integer :: nlevsoil ! Number of soil layers integer :: lev ! soil layer index real(r8) :: sum_rootfr ! sum of root fraction for normalization - + + + ! Original default parameters: + ! + ! broadleaf_evergreen_tropical_tree + ! needleleaf_evergreen_extratrop_tree + ! needleleaf_colddecid_extratrop_tree + ! broadleaf_evergreen_extratrop_tree + ! broadleaf_hydrodecid_tropical_tree + ! broadleaf_colddecid_extratrop_tree + ! broadleaf_evergreen_extratrop_shrub + ! broadleaf_hydrodecid_extratrop_shrub + ! broadleaf_colddecid_extratrop_shrub + ! arctic_c3_grass + ! cool_c3_grass + ! c4_grass + ! + ! a = 7, 7, 7, 7, 6, 6, 7, 7, 7, 11, 11, 11 ; + ! b = 1, 2, 2, 1, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; + + nlevsoil = ubound(zi,1) sum_rootfr = 0.0_r8 do lev = 1, nlevsoil root_fraction(lev) = .5_r8*( & - exp(-EDPftvarcon_inst%roota_par(ft) * zi(lev-1)) & - + exp(-EDPftvarcon_inst%rootb_par(ft) * zi(lev-1)) & - - exp(-EDPftvarcon_inst%roota_par(ft) * zi(lev)) & - - exp(-EDPftvarcon_inst%rootb_par(ft) * zi(lev))) + exp(-a * zi(lev-1)) & + + exp(-b * zi(lev-1)) & + - exp(-a * zi(lev)) & + - exp(-b * zi(lev))) sum_rootfr = sum_rootfr + root_fraction(lev) end do @@ -2106,14 +2093,15 @@ end subroutine exponential_2p_root_profile ! ===================================================================================== - subroutine exponential_1p_root_profile(root_fraction, ft, zi) + subroutine exponential_1p_root_profile(root_fraction, ft, zi, a) ! ! !ARGUMENTS real(r8),intent(out) :: root_fraction(:) integer,intent(in) :: ft real(r8),intent(in) :: zi(0:) - + real(r8),intent(in) :: a ! Exponential shape parameter a + ! ! LOCAL VARIABLES: integer :: lev ! soil depth layer index @@ -2121,7 +2109,8 @@ subroutine exponential_1p_root_profile(root_fraction, ft, zi) real(r8) :: depth ! Depth to middle of layer [m] real(r8) :: sum_rootfr ! sum of rooting profile for normalization - real(r8), parameter :: rootprof_exp = 3. ! how steep profile is + ! Typical default parameter is a = 3. + ! how steep profile is ! for root C inputs (1/ e-folding depth) (1/m) nlevsoil = ubound(zi,1) @@ -2129,7 +2118,7 @@ subroutine exponential_1p_root_profile(root_fraction, ft, zi) ! define rooting profile from exponential parameters sum_rootfr = 0.0_r8 do lev = 1, nlevsoil - root_fraction(lev) = exp(-rootprof_exp * 0.5*(zi(lev)+zi(lev-1)) ) + root_fraction(lev) = exp(-a * 0.5*(zi(lev)+zi(lev-1)) ) sum_rootfr = sum_rootfr + root_fraction(lev) end do @@ -2142,33 +2131,32 @@ end subroutine exponential_1p_root_profile ! ===================================================================================== - subroutine jackson_beta_root_profile(root_fraction, ft, zi) + subroutine jackson_beta_root_profile(root_fraction, ft, zi, a) + + ! ----------------------------------------------------------------------------------- + ! use beta distribution parameter from Jackson et al., 1996 + ! ----------------------------------------------------------------------------------- - ! !ARGUMENTS real(r8),intent(out) :: root_fraction(:) ! fraction of root mass in each soil layer integer,intent(in) :: ft ! functional type real(r8),intent(in) :: zi(0:) ! depth of layer interfaces 0-nlevsoil - + real(r8),intent(in) :: a ! Exponential shape parameter a + ! ! LOCAL VARIABLES: integer :: lev ! soil depth layer index integer :: nlevsoil ! number of soil layers real(r8) :: sum_rootfr ! sum of rooting profile, for normalization - ! Note cdk 2016/08 we actually want to use the carbon index here rather than the water index. - ! Doing so will be answer changing though so perhaps easiest to do this in steps. - integer, parameter :: rooting_profile_varindex_water = 1 + ! Original defaults in fates, a = 0.976 (all Pfts) nlevsoil = ubound(zi,1) - ! use beta distribution parameter from Jackson et al., 1996 + sum_rootfr = 0.0_r8 do lev = 1, nlevsoil root_fraction(lev) = & - ( EDPftvarcon_inst%rootprof_beta(ft, rooting_profile_varindex_water) ** & - ( zi(lev-1)*100._r8) - & - EDPftvarcon_inst%rootprof_beta(ft, rooting_profile_varindex_water) ** & - ( zi(lev)*100._r8) ) + ( a ** ( zi(lev-1)*100._r8) - a ** ( zi(lev)*100._r8) ) sum_rootfr = sum_rootfr + root_fraction(lev) end do diff --git a/biogeophys/EDBtranMod.F90 b/biogeophys/EDBtranMod.F90 index 76bd1425c1..e7faac9cc3 100644 --- a/biogeophys/EDBtranMod.F90 +++ b/biogeophys/EDBtranMod.F90 @@ -19,7 +19,6 @@ module EDBtranMod use FatesInterfaceTypesMod , only : hlm_use_planthydro use FatesGlobals , only : fates_log use FatesAllometryMod , only : set_root_fraction - use FatesAllometryMod , only : i_hydro_rootprof_context ! implicit none @@ -140,8 +139,7 @@ subroutine btran_ed( nsites, sites, bc_in, bc_out) do ft = 1,numpft - call set_root_fraction(sites(s)%rootfrac_scr, ft, sites(s)%zi_soil, & - icontext = i_hydro_rootprof_context) + call set_root_fraction(sites(s)%rootfrac_scr, ft, sites(s)%zi_soil ) cpatch%btran_ft(ft) = 0.0_r8 do j = 1,bc_in(s)%nlevsoil diff --git a/biogeophys/FatesBstressMod.F90 b/biogeophys/FatesBstressMod.F90 index b4e81adcdc..46f30f434b 100644 --- a/biogeophys/FatesBstressMod.F90 +++ b/biogeophys/FatesBstressMod.F90 @@ -19,7 +19,6 @@ module FatesBstressMod use FatesGlobals , only : fates_log use EDBtranMod , only : check_layer_water use FatesAllometryMod , only : set_root_fraction - use FatesAllometryMod , only : i_hydro_rootprof_context implicit none private @@ -69,8 +68,7 @@ subroutine btran_sal_stress_fates( nsites, sites, bc_in) do ft = 1,numpft cpatch%bstress_sal_ft(ft) = 0.0_r8 - call set_root_fraction(sites(s)%rootfrac_scr, ft, sites(s)%zi_soil, & - icontext = i_hydro_rootprof_context) + call set_root_fraction(sites(s)%rootfrac_scr, ft, sites(s)%zi_soil ) do j = 1,bc_in(s)%nlevsoil diff --git a/biogeophys/FatesPlantHydraulicsMod.F90 b/biogeophys/FatesPlantHydraulicsMod.F90 index ca984d16da..d67d346f89 100644 --- a/biogeophys/FatesPlantHydraulicsMod.F90 +++ b/biogeophys/FatesPlantHydraulicsMod.F90 @@ -66,7 +66,6 @@ module FatesPlantHydraulicsMod use FatesAllometryMod, only : bsap_allom use FatesAllometryMod, only : CrownDepth use FatesAllometryMod , only : set_root_fraction - use FatesAllometryMod , only : i_hydro_rootprof_context use FatesHydraulicsMemMod, only: use_2d_hydrosolve use FatesHydraulicsMemMod, only: ed_site_hydr_type use FatesHydraulicsMemMod, only: ed_cohort_hydr_type @@ -656,9 +655,8 @@ subroutine UpdatePlantHydrNodes(ccohort_hydr,ft,plant_height,csite_hydr) ! Crown Nodes ! in special case where n_hypool_leaf = 1, the node height of the canopy ! water pool is 1/2 the distance from the bottom of the canopy to the top of the tree - - roota = EDPftvarcon_inst%roota_par(ft) - rootb = EDPftvarcon_inst%rootb_par(ft) + roota = EDPftvarcon_inst%fnrt_prof_a(ft) + rootb = EDPftvarcon_inst%fnrt_prof_b(ft) nlevrhiz = csite_hydr%nlevrhiz call CrownDepth(plant_height,crown_depth) @@ -820,8 +818,8 @@ subroutine UpdatePlantHydrLenVol(ccohort,site_hydr) fnrt_c = ccohort%prt%GetState(fnrt_organ, all_carbon_elements) struct_c = ccohort%prt%GetState(struct_organ, all_carbon_elements) - roota = EDPftvarcon_inst%roota_par(ft) - rootb = EDPftvarcon_inst%rootb_par(ft) + roota = EDPftvarcon_inst%fnrt_prof_a(ft) + rootb = EDPftvarcon_inst%fnrt_prof_b(ft) ! Leaf Volumes ! ----------------------------------------------------------------------------------- @@ -1523,8 +1521,6 @@ subroutine RecruitWUptake(nsites,sites,bc_in,dtime,recruitflag) type(ed_site_hydr_type), pointer :: csite_hydr integer :: s, j, ft integer :: nstep !number of time steps - real(r8) :: roota !root distriubiton parameter a - real(r8) :: rootb !root distriubiton parameter b real(r8) :: rootfr !fraction of root in different soil layer real(r8) :: recruitw !water for newly recruited cohorts (kg water/m2/s) real(r8) :: recruitw_total ! total water for newly recruited cohorts (kg water/m2/s) @@ -1546,8 +1542,6 @@ subroutine RecruitWUptake(nsites,sites,bc_in,dtime,recruitflag) ! recruitment water uptake if(ccohort_hydr%is_newly_recruited) then recruitflag = .true. - roota = EDPftvarcon_inst%roota_par(ft) - rootb = EDPftvarcon_inst%rootb_par(ft) recruitw = (sum(ccohort_hydr%th_ag(:)*ccohort_hydr%v_ag(:)) + & ccohort_hydr%th_troot*ccohort_hydr%v_troot + & sum(ccohort_hydr%th_aroot(:)*ccohort_hydr%v_aroot_layer(:)))* & @@ -1604,17 +1598,12 @@ subroutine ConstrainRecruitNumber(csite,ccohort, bc_in) real(r8) :: watres_local !minum water content [m3/m3] real(r8) :: total_water !total water in rhizosphere at a specific layer (m^3 ha-1) real(r8) :: total_water_min !total minimum water in rhizosphere at a specific layer (m^3) - real(r8) :: roota !root distriubiton parameter a - real(r8) :: rootb !root distriubiton parameter b real(r8) :: rootfr !fraction of root in different soil layer real(r8) :: recruitw !water for newly recruited cohorts (kg water/m2/individual) real(r8) :: n, nmin !number of individuals in cohorts real(r8) :: sum_l_aroot integer :: s, j, ft - roota = EDPftvarcon_inst%roota_par(ccohort%pft) - rootb = EDPftvarcon_inst%rootb_par(ccohort%pft) - csite_hydr => csite%si_hydr ccohort_hydr =>ccohort%co_hydr recruitw = (sum(ccohort_hydr%th_ag(:)*ccohort_hydr%v_ag(:)) + & @@ -2696,8 +2685,6 @@ subroutine UpdatePlantKmax(ccohort_hydr,ccohort,csite_hydr) ! and absorbing root node in each layer [kg s-1 MPa-1] real(r8) :: surfarea_aroot_layer ! Surface area of absorbing roots in each ! soil layer [m2] - real(r8) :: roota ! root profile parameter a zeng2001_crootfr - real(r8) :: rootb ! root profile parameter b zeng2001_crootfr real(r8) :: sum_l_aroot ! sum of plant's total root length real(r8),parameter :: taper_exponent = 1._r8/3._r8 ! Savage et al. (2010) xylem taper exponent [-] real(r8),parameter :: min_pet_stem_dz = 0.00001_r8 ! Force at least a small difference @@ -2705,8 +2692,6 @@ subroutine UpdatePlantKmax(ccohort_hydr,ccohort,csite_hydr) pft = ccohort%pft - roota = EDPftvarcon_inst%roota_par(pft) - rootb = EDPftvarcon_inst%rootb_par(pft) ! Get the cross-section of the plant's sapwood area [m2] call bsap_allom(ccohort%dbh,pft,ccohort%canopy_trim,a_sapwood,c_sap_dummy) @@ -3091,7 +3076,6 @@ subroutine ImTaylorSolve1D(site_hydr,cohort,cohort_hydr,dtime,q_top, & integer :: error_code ! flag that specifies which check tripped a failed solution integer :: ft ! plant functional type real(r8) :: q_flow ! flow diagnostic [kg] - real(r8) :: roota, rootb ! rooting depth parameters (used for diagnostics) real(r8) :: rootfr ! rooting fraction of this layer (used for diagnostics) ! out of the total absorbing roots from the whole community of plants integer :: iter ! iteration count for sub-step loops diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 23e98d62ba..4d2e88c6f8 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -102,7 +102,6 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) use FatesAllometryMod, only : bleaf use FatesAllometryMod, only : storage_fraction_of_target use FatesAllometryMod, only : set_root_fraction - use FatesAllometryMod, only : i_hydro_rootprof_context use FatesAllometryMod, only : decay_coeff_kn ! ARGUMENTS: @@ -267,7 +266,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) do ft = 1,numpft call set_root_fraction(rootfr_ft(ft,:), ft, & - bc_in(s)%zi_sisl,icontext = i_hydro_rootprof_context) + bc_in(s)%zi_sisl) end do diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 5326b61e33..c116375468 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -70,11 +70,11 @@ module EDPftvarcon real(r8), allocatable :: slamax(:) ! Maximum specific leaf area of plant (at bottom) [m2/gC] real(r8), allocatable :: slatop(:) ! Specific leaf area at canopy top [m2/gC] - integer, allocatable :: fates_fnrt_prof_mode(:) ! Index to select fine root profile function: + real(r8), allocatable :: fnrt_prof_mode(:) ! Index to select fine root profile function: ! 1) Jackson Beta, 2) 1-param exponential - ! 3) 2-param exponential - real(r8),allocatable :: fates_fnrt_prof_a(:) ! a parameter for fine-root profile (1st parameter) - real(r8),allocatable :: fates_fnrt_prof_b(:) ! b parameter for fine-root profile (2nd parameter) + ! 3) 2-param exponential 4) Zeng (not yet unified) + real(r8),allocatable :: fnrt_prof_a(:) ! a parameter for fine-root profile (1st parameter) + real(r8),allocatable :: fnrt_prof_b(:) ! b parameter for fine-root profile (2nd parameter) real(r8), allocatable :: lf_flab(:) ! Leaf litter labile fraction [-] real(r8), allocatable :: lf_fcel(:) ! Leaf litter cellulose fraction [-] @@ -1450,8 +1450,7 @@ subroutine Receive_PFT(this, fates_params) name = 'fates_prescribed_puptake' call fates_params%RetreiveParameterAllocate(name=name, & data=this%prescribed_puptake) - - + end subroutine Receive_PFT !----------------------------------------------------------------------- @@ -1508,6 +1507,7 @@ subroutine Register_PFT_numrad(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names) + end subroutine Register_PFT_numrad @@ -2193,7 +2193,27 @@ subroutine FatesCheckParams(is_master, parteh_mode) end if - + ! Check fine-root profile parameters + + if(EDPftvarcon_inst%fnrt_prof_a(ipft) < nearzero .or. & + EDPftvarcon_inst%fnrt_prof_a(ipft) > fates_check_param_set) then + write(fates_log(),*) 'Rooting profile parameter a must have a meaningful value' + write(fates_log(),*) 'pft: ',ipft,' fnrt_prof_a(ipft): ',EDPftvarcon_inst%fnrt_prof_a(ipft) + write(fates_log(),*) 'Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + + if( EDPftvarcon_inst%fnrt_prof_mode(ipft) == 2 ) then + if (EDPftvarcon_inst%fnrt_prof_b(ipft) < nearzero .or. & + EDPftvarcon_inst%fnrt_prof_b(ipft) > fates_check_param_set) then + write(fates_log(),*) 'Rooting profile parameter b must have a meaningful value' + write(fates_log(),*) 'when using the 2 parameter exponential mode:' + write(fates_log(),*) 'pft: ',ipft,' fnrt_prof_b(ipft): ',EDPftvarcon_inst%fnrt_prof_b(ipft) + write(fates_log(),*) 'Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + end if + ! Check that parameter ranges for age-dependent mortality make sense !----------------------------------------------------------------------------------- diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index ce25541cb0..298d57be53 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -433,10 +433,10 @@ variables: fates_fnrt_prof_mode:units = "index" ; fates_fnrt_prof_mode:long_name = "Index to select fine root profile function: 1) Jackson Beta, 2) 1-param exponential 3) 2-param exponential" ; double fates_fnrt_prof_a(fates_pft) ; - fates_fnrt_prof_a:units = "unitless" + fates_fnrt_prof_a:units = "unitless" ; fates_fnrt_prof_a:long_name = "Fine root profile function, parameter a" ; double fates_fnrt_prof_b(fates_pft) ; - fates_fnrt_prof_b:units = "unitless" + fates_fnrt_prof_b:units = "unitless" ; fates_fnrt_prof_b:long_name = "Fine root profile function, parameter b" ; double fates_seed_alloc(fates_pft) ; fates_seed_alloc:units = "fraction" ; @@ -1128,11 +1128,11 @@ data: fates_root_long = 1, 2, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1, 1 ; - fates_fnrt_prof_mode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ; + fates_fnrt_prof_mode = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ; - fates_fnrt_prof_a = 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976, 0.976 ; + fates_fnrt_prof_a = 7, 7, 7, 7, 6, 6, 7, 7, 7, 11, 11, 11 ; - fates_fnrt_prof_b = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_fnrt_prof_b = 1, 2, 2, 1, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; fates_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 ; From 8a1317a945211304bf088a0b8edffcdce3308de6 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 29 May 2020 11:51:31 -0700 Subject: [PATCH 04/14] Added fire threshold and dbhmin parameters --- fire/SFMainMod.F90 | 4 +- fire/SFParamsMod.F90 | 12 ++++-- main/EDParamsMod.F90 | 17 ++++++++- main/EDTypesMod.F90 | 2 - parameter_files/fates_params_default.cdl | 48 +++++++++++++----------- 5 files changed, 54 insertions(+), 29 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index ac4f672608..50c4b8b4d5 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -21,7 +21,6 @@ module SFMainMod use EDtypesMod , only : ed_cohort_type use EDtypesMod , only : AREA use EDtypesMod , only : DL_SF - use EDtypesMod , only : FIRE_THRESHOLD use EDTypesMod , only : TW_SF use EDtypesMod , only : LB_SF use EDtypesMod , only : LG_SF @@ -668,6 +667,7 @@ subroutine area_burnt_intensity ( currentSite ) use FatesConstantsMod, only : years_per_day use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & SF_val_max_durat, SF_val_durat_slope + use SFParamsMod, only : SF_val_fire_threshold type(ed_site_type), intent(inout), target :: currentSite type(ed_patch_type), pointer :: currentPatch @@ -774,7 +774,7 @@ subroutine area_burnt_intensity ( currentSite ) endif !'decide_fire' subroutine - if (currentPatch%FI > fire_threshold) then !track fires greater than kW/m2 energy threshold + if (currentPatch%FI > SF_val_fire_threshold) then !track fires greater than kW/m2 energy threshold currentPatch%fire = 1 ! Fire... :D else diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index 1c9f278c1e..ce4a9738b1 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -28,6 +28,7 @@ module SFParamsMod real(r8),protected, public :: SF_val_max_durat real(r8),protected, public :: SF_val_durat_slope real(r8),protected, public :: SF_val_drying_ratio + real(r8),protected, public :: SF_val_fire_threshold ! threshold for fires that spread or go out. KWm-2 (Pyne 1986) real(r8),protected, public :: SF_val_CWD_frac(ncwd) real(r8),protected, public :: SF_val_max_decomp(NFSC) real(r8),protected, public :: SF_val_SAV(NFSC) @@ -49,6 +50,7 @@ module SFParamsMod character(len=param_string_length),parameter :: SF_name_max_durat = "fates_fire_max_durat" character(len=param_string_length),parameter :: SF_name_durat_slope = "fates_fire_durat_slope" character(len=param_string_length),parameter :: SF_name_drying_ratio = "fates_fire_drying_ratio" + character(len=param_string_length),parameter :: SF_name_fire_threshold = "fates_fire_threshold" character(len=param_string_length),parameter :: SF_name_CWD_frac = "fates_CWD_frac" character(len=param_string_length),parameter :: SF_name_max_decomp = "fates_max_decomp" character(len=param_string_length),parameter :: SF_name_SAV = "fates_fire_SAV" @@ -142,11 +144,9 @@ subroutine SpitFireParamsInit() SF_val_max_durat = nan SF_val_durat_slope = nan SF_val_drying_ratio = nan - + SF_val_fire_threshold = nan SF_val_CWD_frac(:) = nan - SF_val_max_decomp(:) = nan - SF_val_SAV(:) = nan SF_val_FBD(:) = nan SF_val_min_moisture(:) = nan @@ -230,6 +230,9 @@ subroutine SpitFireRegisterScalars(fates_params) call fates_params%RegisterParameter(name=SF_name_drying_ratio, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=SF_name_fire_threshold, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + end subroutine SpitFireRegisterScalars !----------------------------------------------------------------------- @@ -271,6 +274,9 @@ subroutine SpitFireReceiveScalars(fates_params) call fates_params%RetreiveParameter(name=SF_name_drying_ratio, & data=SF_val_drying_ratio) + call fates_params%RetreiveParameter(name=SF_name_fire_threshold, & + data=SF_val_fire_threshold) + end subroutine SpitFireReceiveScalars !----------------------------------------------------------------------- diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 4db16f8f15..883f23a605 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -121,8 +121,15 @@ module EDParamsMod ! ---------------------------------------------------------------------------------------------- real(r8),protected,public :: logging_dbhmin ! Minimum dbh at which logging is applied (cm) + ! Typically associated with harvesting character(len=param_string_length),parameter,public :: logging_name_dbhmin = "fates_logging_dbhmin" + real(r8),protected,public :: logging_dbhmax ! Maximum dbh at which logging is applied (cm) + ! Typically associated with fire suppression + ! (THIS PARAMETER IS NOT USED YET) + character(len=param_string_length),parameter,public :: logging_name_dbhmax = "fates_logging_dbhmax" + + real(r8),protected,public :: logging_collateral_frac ! Ratio of collateral mortality to direct logging mortality character(len=param_string_length),parameter,public :: logging_name_collateral_frac = "fates_logging_collateral_frac" @@ -193,6 +200,7 @@ subroutine FatesParamsInit() bgc_soil_salinity = nan logging_dbhmin = nan + logging_dbhmax = nan logging_collateral_frac = nan logging_direct_frac = nan logging_mechanical_frac = nan @@ -314,6 +322,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=logging_name_dbhmin, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=logging_name_dbhmax, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=logging_name_collateral_frac, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -459,7 +470,10 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=logging_name_dbhmin, & data=logging_dbhmin) - + + call fates_params%RetreiveParameter(name=logging_name_dbhmax, & + data=logging_dbhmax) + call fates_params%RetreiveParameter(name=logging_name_collateral_frac, & data=logging_collateral_frac) @@ -550,6 +564,7 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'hydr_psicap = ',hydr_psicap write(fates_log(),fmt0) 'bgc_soil_salinity = ', bgc_soil_salinity write(fates_log(),fmt0) 'logging_dbhmin = ',logging_dbhmin + write(fates_log(),fmt0) 'logging_dbhmax = ',logging_dbhmax write(fates_log(),fmt0) 'logging_collateral_frac = ',logging_collateral_frac write(fates_log(),fmt0) 'logging_coll_under_frac = ',logging_coll_under_frac write(fates_log(),fmt0) 'logging_direct_frac = ',logging_direct_frac diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 5cb4480e4f..b0cd68ca3b 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -147,8 +147,6 @@ module EDTypesMod integer, parameter, public :: dl_sf = 5 ! array index of dead leaf pool for spitfire (dead grass and dead leaves) integer, parameter, public :: lg_sf = 6 ! array index of live grass pool for spitfire - real(r8), parameter, public :: fire_threshold = 50.0_r8 ! threshold for fires that spread or go out. KWm-2 (Pyne 1986) - ! PATCH FUSION real(r8), parameter, public :: force_patchfuse_min_biomass = 0.005_r8 ! min biomass (kg / m2 patch area) below which to force-fuse patches integer , parameter, public :: N_DBH_BINS = 6 ! no. of dbh bins used when comparing patches diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 298d57be53..266c65626e 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -176,6 +176,15 @@ variables: double fates_fire_crown_kill(fates_pft) ; fates_fire_crown_kill:units = "NA" ; fates_fire_crown_kill:long_name = "fire parameter, see equation 22 in Thonicke et al 2010" ; + double fates_fnrt_prof_a(fates_pft) ; + fates_fnrt_prof_a:units = "unitless" ; + fates_fnrt_prof_a:long_name = "Fine root profile function, parameter a" ; + double fates_fnrt_prof_b(fates_pft) ; + fates_fnrt_prof_b:units = "unitless" ; + fates_fnrt_prof_b:long_name = "Fine root profile function, parameter b" ; + double fates_fnrt_prof_mode(fates_pft) ; + fates_fnrt_prof_mode:units = "index" ; + fates_fnrt_prof_mode:long_name = "Index to select fine root profile function: 1) Jackson Beta, 2) 1-param exponential 3) 2-param exponential" ; double fates_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -281,13 +290,9 @@ variables: double fates_leaf_tpuse(fates_pft) ; fates_leaf_tpuse:units = "J/mol/K" ; fates_leaf_tpuse:long_name = "entropy term for tpu" ; - double fates_leaf_vcmax25top(fates_leafage_class, fates_pft) ; fates_leaf_vcmax25top:units = "umol CO2/m^2/s" ; fates_leaf_vcmax25top:long_name = "maximum carboxylation rate of Rub. at 25C, canopy top" ; - - - double fates_leaf_vcmaxha(fates_pft) ; fates_leaf_vcmaxha:units = "J/mol" ; fates_leaf_vcmaxha:long_name = "activation energy for vcmax" ; @@ -429,15 +434,6 @@ variables: double fates_root_long(fates_pft) ; fates_root_long:units = "yr" ; fates_root_long:long_name = "root longevity (alternatively, turnover time)" ; - double fates_fnrt_prof_mode(fates_pft) ; - fates_fnrt_prof_mode:units = "index" ; - fates_fnrt_prof_mode:long_name = "Index to select fine root profile function: 1) Jackson Beta, 2) 1-param exponential 3) 2-param exponential" ; - double fates_fnrt_prof_a(fates_pft) ; - fates_fnrt_prof_a:units = "unitless" ; - fates_fnrt_prof_a:long_name = "Fine root profile function, parameter a" ; - double fates_fnrt_prof_b(fates_pft) ; - fates_fnrt_prof_b:units = "unitless" ; - fates_fnrt_prof_b:long_name = "Fine root profile function, parameter b" ; double fates_seed_alloc(fates_pft) ; fates_seed_alloc:units = "fraction" ; fates_seed_alloc:long_name = "fraction of available carbon balance allocated to seeds" ; @@ -595,6 +591,9 @@ variables: double fates_fire_part_dens ; fates_fire_part_dens:units = "kg/m2" ; fates_fire_part_dens:long_name = "spitfire parameter, oven dry particle density, Table A1 Thonicke et al 2010" ; + double fates_fire_threshold ; + fates_fire_threshold:units = "kW/m2" ; + fates_fire_threshold:long_name = "spitfire parameter, fire intensity threshold for tracking fires that spread" ; double fates_hydr_kmax_rsurf1 ; fates_hydr_kmax_rsurf1:units = "kg water/m2 root area/Mpa/s" ; fates_hydr_kmax_rsurf1:long_name = "maximum conducitivity for unit root surface (into root)" ; @@ -619,6 +618,9 @@ variables: double fates_logging_collateral_frac ; fates_logging_collateral_frac:units = "fraction" ; fates_logging_collateral_frac:long_name = "Fraction of large stems in upperstory that die from logging collateral damage" ; + double fates_logging_dbhmax ; + fates_logging_dbhmax:units = "cm" ; + fates_logging_dbhmax:long_name = "Maximum dbh below which logging is applied (unset values flag this to be unused)" ; double fates_logging_dbhmax_infra ; fates_logging_dbhmax_infra:units = "cm" ; fates_logging_dbhmax_infra:long_name = "Tree diameter, above which infrastructure from logging does not impact damage or mortality." ; @@ -833,6 +835,12 @@ data: fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; + fates_fnrt_prof_a = 7, 7, 7, 7, 6, 6, 7, 7, 7, 11, 11, 11 ; + + fates_fnrt_prof_b = 1, 2, 2, 1, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; + + fates_fnrt_prof_mode = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ; + fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; fates_fr_flab = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, @@ -950,8 +958,8 @@ data: fates_leaf_slatop = 0.012, 0.01, 0.024, 0.012, 0.03, 0.03, 0.012, 0.03, 0.03, 0.03, 0.03, 0.03 ; - fates_leaf_stomatal_intercept = 10000, 10000, 10000, 10000, 10000, 10000, 10000, - 10000, 10000, 10000, 10000, 40000 ; + fates_leaf_stomatal_intercept = 10000, 10000, 10000, 10000, 10000, 10000, + 10000, 10000, 10000, 10000, 10000, 40000 ; fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; @@ -1128,12 +1136,6 @@ data: fates_root_long = 1, 2, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1, 1 ; - fates_fnrt_prof_mode = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ; - - fates_fnrt_prof_a = 7, 7, 7, 7, 6, 6, 7, 7, 7, 11, 11, 11 ; - - fates_fnrt_prof_b = 1, 2, 2, 1, 2, 2, 1.5, 1.5, 1.5, 2, 2, 2 ; - fates_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 ; fates_seed_alloc_mature = 0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9 ; @@ -1269,6 +1271,8 @@ data: fates_fire_part_dens = 513 ; + fates_fire_threshold = 50 ; + fates_hydr_kmax_rsurf1 = 20 ; fates_hydr_kmax_rsurf2 = 0.0001 ; @@ -1285,6 +1289,8 @@ data: fates_logging_collateral_frac = 0.05 ; + fates_logging_dbhmax = _ ; + fates_logging_dbhmax_infra = 35 ; fates_logging_dbhmin = 50 ; From 704557ebf7decb600b000d6dab16020e76538660 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 29 May 2020 13:18:35 -0700 Subject: [PATCH 05/14] Fixed unit error on fire threshold. --- fire/SFParamsMod.F90 | 2 +- parameter_files/fates_params_default.cdl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index ce4a9738b1..31b4dffeea 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -28,7 +28,7 @@ module SFParamsMod real(r8),protected, public :: SF_val_max_durat real(r8),protected, public :: SF_val_durat_slope real(r8),protected, public :: SF_val_drying_ratio - real(r8),protected, public :: SF_val_fire_threshold ! threshold for fires that spread or go out. KWm-2 (Pyne 1986) + real(r8),protected, public :: SF_val_fire_threshold ! threshold for fires that spread or go out. KW/m (Pyne 1986) real(r8),protected, public :: SF_val_CWD_frac(ncwd) real(r8),protected, public :: SF_val_max_decomp(NFSC) real(r8),protected, public :: SF_val_SAV(NFSC) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 266c65626e..4b934022ff 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -592,7 +592,7 @@ variables: fates_fire_part_dens:units = "kg/m2" ; fates_fire_part_dens:long_name = "spitfire parameter, oven dry particle density, Table A1 Thonicke et al 2010" ; double fates_fire_threshold ; - fates_fire_threshold:units = "kW/m2" ; + fates_fire_threshold:units = "kW/m" ; fates_fire_threshold:long_name = "spitfire parameter, fire intensity threshold for tracking fires that spread" ; double fates_hydr_kmax_rsurf1 ; fates_hydr_kmax_rsurf1:units = "kg water/m2 root area/Mpa/s" ; From e21c31a3c584166c32e92c61f04966a7bbfd956f Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 29 May 2020 16:46:59 -0700 Subject: [PATCH 06/14] Update fire/SFMainMod.F90 Co-authored-by: jkshuman --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 50c4b8b4d5..6d900cee26 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -774,7 +774,7 @@ subroutine area_burnt_intensity ( currentSite ) endif !'decide_fire' subroutine - if (currentPatch%FI > SF_val_fire_threshold) then !track fires greater than kW/m2 energy threshold + if (currentPatch%FI > SF_val_fire_threshold) then !track fires greater than kW/m energy threshold currentPatch%fire = 1 ! Fire... :D else From 0724f3a62137a2adc79ec3710b2e855ef3d9fbbf Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 29 May 2020 16:47:47 -0700 Subject: [PATCH 07/14] Update fire/SFParamsMod.F90 Co-authored-by: jkshuman --- fire/SFParamsMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index 31b4dffeea..e4a47e1db9 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -28,7 +28,7 @@ module SFParamsMod real(r8),protected, public :: SF_val_max_durat real(r8),protected, public :: SF_val_durat_slope real(r8),protected, public :: SF_val_drying_ratio - real(r8),protected, public :: SF_val_fire_threshold ! threshold for fires that spread or go out. KW/m (Pyne 1986) + real(r8),protected, public :: SF_val_fire_threshold ! threshold for fires that spread or go out. kW/m (Pyne 1996) real(r8),protected, public :: SF_val_CWD_frac(ncwd) real(r8),protected, public :: SF_val_max_decomp(NFSC) real(r8),protected, public :: SF_val_SAV(NFSC) From a0cbdf047a7434bec69b7262b839feeba253a3ee Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 3 Jun 2020 10:30:48 -0700 Subject: [PATCH 08/14] Update fire/SFMainMod.F90 Co-authored-by: jkshuman --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6d900cee26..9ee9e15bff 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -666,7 +666,7 @@ subroutine area_burnt_intensity ( currentSite ) use EDParamsMod, only : cg_strikes ! fraction of cloud-to-ground ligtning strikes use FatesConstantsMod, only : years_per_day use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & - SF_val_max_durat, SF_val_durat_slope + SF_val_max_durat, SF_val_durat_slope, SF_val_fire_threshold use SFParamsMod, only : SF_val_fire_threshold type(ed_site_type), intent(inout), target :: currentSite From 11db7b7a57953b345b5d5487cf2e850140b202bc Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 3 Jun 2020 10:47:36 -0700 Subject: [PATCH 09/14] minor syntax updates to parameter file update PR --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 4 ---- fire/SFMainMod.F90 | 1 - fire/SFParamsMod.F90 | 18 ++++++++++++++++++ parameter_files/fates_params_default.cdl | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 4d2e88c6f8..9c58cc555b 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -239,10 +239,6 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! Bonan et al (2011) JGR, 116, doi:10.1029/2010JG001593 ! ----------------------------------------------------------------------------------- - ! Ball-Berry minimum leaf conductance, unstressed (umol H2O/m**2/s) - ! For C3 and C4 plants - ! ----------------------------------------------------------------------------------- - associate( & stomatal_intercept => EDPftvarcon_inst%stomatal_intercept, & c3psn => EDPftvarcon_inst%c3psn , & diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 9ee9e15bff..df5f999426 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -667,7 +667,6 @@ subroutine area_burnt_intensity ( currentSite ) use FatesConstantsMod, only : years_per_day use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & SF_val_max_durat, SF_val_durat_slope, SF_val_fire_threshold - use SFParamsMod, only : SF_val_fire_threshold type(ed_site_type), intent(inout), target :: currentSite type(ed_patch_type), pointer :: currentPatch diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index e4a47e1db9..865a3f106b 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -65,6 +65,10 @@ module SFParamsMod character(len=*), parameter, private :: sourcefile = & __FILE__ + + real(r8), parameter,private :: min_fire_threshold = 0.0001 ! The minimum reasonable fire intensity threshold [kW/m] + + public :: SpitFireRegisterParams public :: SpitFireReceiveParams public :: SpitFireCheckParams @@ -121,6 +125,15 @@ subroutine SpitFireCheckParams(is_master) SF_val_CWD_frac(corr_id(1)) = SF_val_CWD_frac(corr_id(1)) + correction end if + ! Check to see if the fire threshold is above the minimum and set at all + if(SF_val_fire_threshold < min_fire_threshold .or. & + SF_val_fire_threshold > fates_check_param_set ) then + write(fates_log(),*) 'The fates_fire_threshold parameter must be set, and > ',min_fire_threshold + write(fates_log(),*) 'The value is set at :',SF_val_fire_threshold + write(fates_log(),*) 'Please provide a reasonable value, aborting.' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if + return end subroutine SpitFireCheckParams @@ -243,6 +256,8 @@ subroutine SpitFireReceiveScalars(fates_params) implicit none class(fates_parameters_type), intent(inout) :: fates_params + real(r8) :: tmp_real + call fates_params%RetreiveParameter(name=SF_name_fdi_a, & data=SF_val_fdi_a) @@ -277,6 +292,9 @@ subroutine SpitFireReceiveScalars(fates_params) call fates_params%RetreiveParameter(name=SF_name_fire_threshold, & data=SF_val_fire_threshold) + + + end subroutine SpitFireReceiveScalars !----------------------------------------------------------------------- diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 4b934022ff..d17d4f6030 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -97,7 +97,7 @@ variables: double fates_allom_hmode(fates_pft) ; fates_allom_hmode:units = "index" ; fates_allom_hmode:long_name = "height allometry function index." ; - fates_allom_hmode:possible_values = "1: O\'Brien 1995; 2: Poorter 2006; 3: 2 parameter power law; 4: Chave 2014; 5: Martinez-Cano 2019." ; + fates_allom_hmode:possible_values = "1: OBrien 1995; 2: Poorter 2006; 3: 2 parameter power law; 4: Chave 2014; 5: Martinez-Cano 2019." ; double fates_allom_l2fr(fates_pft) ; fates_allom_l2fr:units = "gC/gC" ; fates_allom_l2fr:long_name = "Allocation parameter: fine root C per leaf C" ; From eaa02cf4cc8012a5e2f833d7835b134764920951 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 3 Jun 2020 10:49:45 -0700 Subject: [PATCH 10/14] fixed definition of 8byte real constant --- fire/SFParamsMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index 865a3f106b..4a76f1fb90 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -66,7 +66,7 @@ module SFParamsMod __FILE__ - real(r8), parameter,private :: min_fire_threshold = 0.0001 ! The minimum reasonable fire intensity threshold [kW/m] + real(r8), parameter,private :: min_fire_threshold = 0.0001_r8 ! The minimum reasonable fire intensity threshold [kW/m] public :: SpitFireRegisterParams From 2cfb5117ec4bdf6ba07b511e7ba3a24303d58dd2 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 3 Jun 2020 12:26:52 -0600 Subject: [PATCH 11/14] defined the check parameter set used in sf params --- fire/SFParamsMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index 4a76f1fb90..02c0ce7756 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -3,6 +3,7 @@ module SFParamsMod ! module that deals with reading the SF parameter file ! use FatesConstantsMod , only: r8 => fates_r8 + use FatesConstantsMod , only: fates_check_param_set use EDtypesMod , only: NFSC use FatesLitterMod , only: ncwd use FatesParametersInterface, only : param_string_length From a57c17b9726e4df29911b50a3333bd03c31616c9 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Thu, 4 Jun 2020 18:14:59 -0700 Subject: [PATCH 12/14] Resolved conflicts with photosynthesis code --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 86 +--------------------- 1 file changed, 3 insertions(+), 83 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 69f74a3dc0..273dda1593 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -46,11 +46,7 @@ module FATESPlantRespPhotosynthMod use PRTGenericMod, only : store_organ use PRTGenericMod, only : repro_organ use PRTGenericMod, only : struct_organ -<<<<<<< HEAD use EDParamsMod, only : ED_val_base_mr_20, stomatal_model -======= - use EDParamsMod, only : ED_val_base_mr_20 ->>>>>>> master ! CIME Globals use shr_log_mod , only : errMsg => shr_log_errMsg @@ -171,11 +167,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) real(r8) :: mm_kco2 ! Michaelis-Menten constant for CO2 (Pa) real(r8) :: mm_ko2 ! Michaelis-Menten constant for O2 (Pa) real(r8) :: co2_cpoint ! CO2 compensation point (Pa) -<<<<<<< HEAD - real(r8) :: btran_eff ! effective transpiration wetness factor (0 to 1) -======= real(r8) :: btran_eff ! effective transpiration wetness factor (0 to 1) ->>>>>>> master real(r8) :: stomatal_intercept_btran ! water-stressed minimum stomatal conductance (umol H2O/m**2/s) real(r8) :: kn ! leaf nitrogen decay coefficient real(r8) :: cf ! s m**2/umol -> s/m (ideal gas conversion) [umol/m3] @@ -254,14 +246,6 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! Bonan et al (2011) JGR, 116, doi:10.1029/2010JG001593 ! ----------------------------------------------------------------------------------- -<<<<<<< HEAD - ! Ball-Berry minimum leaf conductance, unstressed (umol H2O/m**2/s) - ! For C3 and C4 plants - ! ----------------------------------------------------------------------------------- - - -======= ->>>>>>> master associate( & stomatal_intercept => EDPftvarcon_inst%stomatal_intercept, & c3psn => EDPftvarcon_inst%c3psn , & @@ -270,12 +254,6 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) woody => EDPftvarcon_inst%woody , & ! Is vegetation woody or not? stomatal_intercept => EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance - -<<<<<<< HEAD - - -======= ->>>>>>> master do s = 1,nsites ! Multi-layer parameters scaled by leaf nitrogen profile. @@ -414,19 +392,11 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) (hlm_use_planthydro.eq.itrue) .or. & (nleafage > 1) .or. & (hlm_parteh_mode .ne. prt_carbon_allom_hyp ) ) then -<<<<<<< HEAD if (hlm_use_planthydro.eq.itrue ) then stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentCohort%co_hydr%btran ) btran_eff = currentCohort%co_hydr%btran -======= - - if (hlm_use_planthydro.eq.itrue ) then - - stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentCohort%co_hydr%btran ) - btran_eff = currentCohort%co_hydr%btran ->>>>>>> master ! dinc_ed is the total vegetation area index of each "leaf" layer ! we convert to the leaf only portion of the increment @@ -441,13 +411,9 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) cumulative_lai = lai_canopy_above + lai_layers_above + 0.5*lai_current else -<<<<<<< HEAD stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentPatch%btran_ft(ft) ) -======= - stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentPatch%btran_ft(ft)) ->>>>>>> master btran_eff = currentPatch%btran_ft(ft) ! For consistency sake, we use total LAI here, and not exposed ! if the plant is under-snow, it will be effectively dormant for @@ -856,11 +822,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in can_co2_ppress, & ! in can_o2_ppress, & ! in btran, & ! in -<<<<<<< HEAD stomatal_intercept_btran, & ! in -======= - stomatal_intercept_btran, & ! in ->>>>>>> master cf, & ! in gb_mol, & ! in ceair, & ! in @@ -957,12 +919,9 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in real(r8) :: ai ! intermediate co-limited photosynthesis (umol CO2/m**2/s) real(r8) :: leaf_co2_ppress ! CO2 partial pressure at leaf surface (Pa) real(r8) :: init_co2_inter_c ! First guess intercellular co2 specific to C path - -<<<<<<< HEAD real(r8) :: term ! intermediate variable in Medlyn stomatal conductance model real(r8) :: vpd ! water vapor deficit in Medlyn stomatal model (KPa) -======= ->>>>>>> master + ! Parameters ! ------------------------------------------------------------------------ @@ -992,25 +951,13 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.999_r8 - -<<<<<<< HEAD - associate( bb_slope => EDPftvarcon_inst%BB_slope ,& ! slope of BB relationship, unitless + associate( bb_slope => EDPftvarcon_inst%bb_slope ,& ! slope of BB relationship, unitless medlyn_slope=> EDPftvarcon_inst%medlyn_slope , & ! Slope for Medlyn stomatal conductance model method, the unit is KPa^0.5 stomatal_intercept=> EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance, the unit is umol/m**2/s - - -======= - associate( bb_slope => EDPftvarcon_inst%bb_slope, & ! slope of BB relationship - stomatal_intercept=> EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance, the unit is umol/m**2/s ->>>>>>> master ! photosynthetic pathway: 0. = c4, 1. = c3 c3c4_path_index = nint(EDPftvarcon_inst%c3psn(ft)) -<<<<<<< HEAD - -======= ->>>>>>> master if (c3c4_path_index == 1) then init_co2_inter_c = init_a2l_co2_c3 * can_co2_ppress else @@ -1144,7 +1091,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in end if ! Quadratic gs_mol calculation with an known. Valid for an >= 0. -<<<<<<< HEAD ! With an <= 0, then gs_mol = stomatal_intercept_btran leaf_co2_ppress = can_co2_ppress- h2o_co2_bl_diffuse_ratio/gb_mol * anet * can_press leaf_co2_ppress = max(leaf_co2_ppress,1.e-06_r8) @@ -1168,15 +1114,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in aquad = leaf_co2_ppress bquad = leaf_co2_ppress*(gb_mol - stomatal_intercept_btran) - bb_slope(ft) * anet * can_press cquad = -gb_mol*(leaf_co2_ppress*stomatal_intercept_btran + & -======= - ! With an <= 0, then gs_mol = stomatal_intercept_btran - - leaf_co2_ppress = can_co2_ppress- 1.4_r8/gb_mol * anet * can_press - leaf_co2_ppress = max(leaf_co2_ppress,1.e-06_r8) - aquad = leaf_co2_ppress - bquad = leaf_co2_ppress*(gb_mol - stomatal_intercept_btran) - bb_slope(ft) * anet * can_press - cquad = -gb_mol*(leaf_co2_ppress*stomatal_intercept_btran + & ->>>>>>> master bb_slope(ft)*anet*can_press * ceair/ veg_esat ) call quadratic_f (aquad, bquad, cquad, r1, r2) @@ -1197,16 +1134,10 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in end if end do !iteration loop -<<<<<<< HEAD ! End of co2_inter_c iteration. Check for an < 0, in which case ! gs_mol =stomatal_intercept_btran if (anet < 0._r8) then gs_mol = stomatal_intercept_btran -======= - ! End of co2_inter_c iteration. Check for an < 0, in which case gs_mol = stomatal_intercept_btran - if (anet < 0._r8) then - gs_mol = stomatal_intercept_btran ->>>>>>> master end if ! Final estimates for leaf_co2_ppress and co2_inter_c @@ -1249,7 +1180,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in write (fates_log(),*)'gs_mol= ',gs_mol call endrun(msg=errMsg(sourcefile, __LINE__)) end if -<<<<<<< HEAD ! Compare with Medlyn model: gs_mol = 1.6*(1+m/sqrt(vpd)) * an/leaf_co2_ppress*p + b if ( stomatal_model == 2 ) then @@ -1260,13 +1190,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in gs_mol_err = bb_slope(ft)*max(anet, 0._r8)*hs/leaf_co2_ppress*can_press + stomatal_intercept_btran end if -======= - - ! Compare with Ball-Berry model: gs_mol = m * an * hs/leaf_co2_ppress p + b - hs = (gb_mol*ceair + gs_mol* veg_esat ) / ((gb_mol+gs_mol)*veg_esat ) - gs_mol_err = bb_slope(ft)*max(anet, 0._r8)*hs/leaf_co2_ppress*can_press + stomatal_intercept_btran - ->>>>>>> master if (abs(gs_mol-gs_mol_err) > 1.e-01_r8) then write (fates_log(),*) 'Stomatal model error check - stomatal conductance error:' write (fates_log(),*) gs_mol, gs_mol_err @@ -1286,11 +1209,8 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in psn_out = 0._r8 anet_av_out = 0._r8 -<<<<<<< HEAD + rstoma_out = min(rsmax0,cf/(stem_cuticle_loss_frac*stomatal_intercept(ft))) -======= - rstoma_out = min(rsmax0, cf/(stem_cuticle_loss_frac*stomatal_intercept(ft) )) ->>>>>>> master c13disc_z = 0.0_r8 end if !is there leaf area? From 15d8efdfb1e2397abdf5b0c6c66209385599c654 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Thu, 4 Jun 2020 18:18:12 -0700 Subject: [PATCH 13/14] removed redundant declaration of stomatal_intercept --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 273dda1593..5ca03537be 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -247,7 +247,6 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! ----------------------------------------------------------------------------------- associate( & - stomatal_intercept => EDPftvarcon_inst%stomatal_intercept, & c3psn => EDPftvarcon_inst%c3psn , & slatop => EDPftvarcon_inst%slatop , & ! specific leaf area at top of canopy, ! projected area basis [m^2/gC] From 5e9e1ee619a9613c6036ff8b3382e0e7738e44aa Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Thu, 4 Jun 2020 20:27:19 -0600 Subject: [PATCH 14/14] bug fix on setting stomatal model as uninitialized --- main/EDParamsMod.F90 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 08c8049e4e..8b3bb97d8b 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -192,13 +192,9 @@ subroutine FatesParamsInit() stomatal_model = -9 hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan - stomatal_model = nan - hydr_psi0 = nan hydr_psicap = nan - bgc_soil_salinity = nan - logging_dbhmin = nan logging_dbhmax = nan logging_collateral_frac = nan