From 3fa3292161618f671498a922d5a9363a7ab7b9ac Mon Sep 17 00:00:00 2001 From: Li Date: Wed, 5 Feb 2020 10:54:19 -0500 Subject: [PATCH 01/46] Added Medlyn stomatal model, first pass through. --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 70 ++++++++++++++++------ main/EDPftvarcon.F90 | 20 +++++++ 2 files changed, 71 insertions(+), 19 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 4e003474a3..cca15bb74a 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -64,6 +64,13 @@ module FATESPlantRespPhotosynthMod real(r8),parameter :: rsmax0 = 2.e8_r8 logical :: debug = .false. + !------------------------------------------------------------------------------------- + + ! Ratio of H2O/CO2 gas diffusion in stomatal airspace (approximate) + real(r8),parameter :: h2o_co2_stoma_diffuse_ratio = 1.6_r8 + + ! Ratio of H2O/CO2 gass diffusion in the leaf boundary layer (approximate) + real(r8),parameter :: h2o_co2_bl_diffuse_ratio = 1.4_r8 contains @@ -845,6 +852,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! ------------------------------------------------------------------------------------ use EDPftvarcon , only : EDPftvarcon_inst + use FatesConstantsMod, only: umol_per_mol ! Arguments @@ -921,8 +929,8 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in 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) - - + real(r8) :: term ! intermediate variable in Medlyn stomatal conductance model + real(r8) :: vpd ! water vapor deficit in Medlyn stomatal model (KPa) ! Parameters ! ------------------------------------------------------------------------ @@ -951,8 +959,11 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.999_r8 + integer, parameter :: stomatalcond_mtd = 2 !Flag for stomatal conductance model method, 1 for Ball-Berry, 2 for Medlyn - associate( bb_slope => EDPftvarcon_inst%BB_slope) ! slope of BB relationship + associate( bb_slope => EDPftvarcon_inst%BB_slope ,& ! slope of BB relationship, unitless + medlynslope=> EDPftvarcon_inst%medlynslope , & ! Slope for Medlyn stomatal conductance model method, the unit is KPa^0.5 + medlynintercept=> EDPftvarcon_inst%medlynintercept ) !Intercept for Medlyn stomatal conductance model method, the unit is umol/m**2/s ! photosynthetic pathway: 0. = c4, 1. = c3 @@ -1094,21 +1105,37 @@ 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 - - leaf_co2_ppress = can_co2_ppress- 1.4_r8/gb_mol * anet * can_press + ! With an <= 0, then gs_mol = bbb + 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) - aquad = leaf_co2_ppress - bquad = leaf_co2_ppress*(gb_mol - bbb) - bb_slope(ft) * anet * can_press - cquad = -gb_mol*(leaf_co2_ppress*bbb + & + if ( stomatalcond_mtd == 2 ) then + !stomatal conductance calculated from Belinda Medlyn et al. (2011), the numerical & + !implementation was adapted from the equations in CLM5.0 by Qianyu Li, see the CLM5 Technical Note 2.9.6 + vpd = max((veg_esat - ceair), 50._r8) * 0.001_r8 !addapted from CLM5. Put some constraint on RH in the & + !canopy when Medlyn stomatal conductance is being used, the unit is KPa. Ignoring the constraint will cause errors when model runs. + term = h2o_co2_stoma_diffuse_ratio * anet / (leaf_co2_ppress / can_press * umol_per_mol) + aquad = 1.0_r8 + bquad = -(2.0 * (medlynintercept(ft)/umol_per_mol+ term) + (medlynslope(ft) * term)**2 / & + (gb_mol/umol_per_mol * vpd )) + cquad = medlynintercept(ft)*medlynintercept(ft)/(umol_per_mol*umol_per_mol) + & + (2.0*medlynintercept(ft)/umol_per_mol + term * & + (1.0 - medlynslope(ft)* medlynslope(ft) / vpd)) * term + + call quadratic_f (aquad, bquad, cquad, r1, r2) + gs_mol = max(r1,r2) * umol_per_mol ! change the unit to umol /m**2/s + + else if ( stomatalcond_mtd ==1 ) then !stomatal conductance calculated from Ball et al. (1987) + aquad = leaf_co2_ppress + bquad = leaf_co2_ppress*(gb_mol - bbb) - bb_slope(ft) * anet * can_press + cquad = -gb_mol*(leaf_co2_ppress*bbb + & bb_slope(ft)*anet*can_press * ceair/ veg_esat ) call quadratic_f (aquad, bquad, cquad, r1, r2) gs_mol = max(r1,r2) - + end if ! Derive new estimate for co2_inter_c co2_inter_c = can_co2_ppress - anet * can_press * & - (1.4_r8*gs_mol+1.6_r8*gb_mol) / (gb_mol*gs_mol) + (h2o_co2_bl_diffuse_ratio*gs_mol+h2o_co2_stoma_diffuse_ratio*gb_mol) / (gb_mol*gs_mol) ! Check for co2_inter_c convergence. Delta co2_inter_c/pair = mol/mol. ! Multiply by 10**6 to convert to umol/mol (ppm). Exit iteration if @@ -1121,17 +1148,22 @@ 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 =medlynintercept (for Medlyn's method),& + ! or gs_mol = bbb (for Ball-Berry's method) if (anet < 0._r8) then - gs_mol = bbb + if ( stomatalcond_mtd == 2 ) then + gs_mol = medlynintercept(ft) + else if ( stomatalcond_mtd == 1) then + gs_mol = bbb + end if end if ! Final estimates for leaf_co2_ppress and co2_inter_c ! (needed for early exit of co2_inter_c iteration when an < 0) - leaf_co2_ppress = can_co2_ppress - 1.4_r8/gb_mol * anet * can_press + 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) co2_inter_c = can_co2_ppress - anet * can_press * & - (1.4_r8*gs_mol+1.6_r8*gb_mol) / (gb_mol*gs_mol) + (h2o_co2_bl_diffuse_ratio*gs_mol+h2o_co2_stoma_diffuse_ratio*gb_mol) / (gb_mol*gs_mol) ! Convert gs_mol (umol /m**2/s) to gs (m/s) and then to rs (s/m) gs = gs_mol / cf @@ -1171,10 +1203,10 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in 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 - if (abs(gs_mol-gs_mol_err) > 1.e-01_r8) then - write (fates_log(),*) 'CF: Ball-Berry error check - stomatal conductance error:' - write (fates_log(),*) gs_mol, gs_mol_err - end if + if (abs(gs_mol-gs_mol_err) > 1.e-01_r8 .and. (stomatalcond_mtd == 1)) then + write (fates_log(),*) 'CF: Ball-Berry error check - stomatal conductance error:' + write (fates_log(),*) gs_mol, gs_mol_err + end if enddo !sunsha loop diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index be3eb9de35..62fd1d2878 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -52,6 +52,8 @@ module EDPftvarcon real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter + real(r8), allocatable :: medlynslope(:) ! Medlyn slope parameter KPa^0.5 + real(r8), allocatable :: medlynintercept(:) ! Medlyn intercept parameter umol/m**2/s real(r8), allocatable :: seed_alloc_mature(:) ! fraction of carbon balance allocated to ! clonal reproduction. @@ -439,6 +441,14 @@ 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_leaf_medlynslope' !Medlyn's slpoe + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_leaf_medlynintercept' !Medlyn's intercept + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_senleaf_long_fdrought' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -940,6 +950,14 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%BB_slope) + name = 'fates_leaf_medlynslope' !Medlyn's slope + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%medlynslope) + + name = 'fates_leaf_medlynintercept' !Medlyn's intercept + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%medlynintercept) + name = 'fates_senleaf_long_fdrought' call fates_params%RetreiveParameterAllocate(name=name, & data=this%senleaf_long_fdrought) @@ -1918,6 +1936,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope + write(fates_log(),fmt0) 'medlynslope = ',EDPftvarcon_inst%medlynslope + write(fates_log(),fmt0) 'medlynintercept = ',EDPftvarcon_inst%medlynintercept write(fates_log(),fmt0) 'root_long = ',EDPftvarcon_inst%root_long write(fates_log(),fmt0) 'senleaf_long_fdrought = ',EDPftvarcon_inst%senleaf_long_fdrought write(fates_log(),fmt0) 'seed_alloc_mature = ',EDPftvarcon_inst%seed_alloc_mature From b1ddca478f2efee14d7dae67220c72f2bba29c7b Mon Sep 17 00:00:00 2001 From: Li Date: Wed, 5 Feb 2020 11:32:41 -0500 Subject: [PATCH 02/46] Added Medlyn stomatal model, first pass through. --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index cca15bb74a..ecf8cb301f 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -1111,8 +1111,8 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in if ( stomatalcond_mtd == 2 ) then !stomatal conductance calculated from Belinda Medlyn et al. (2011), the numerical & !implementation was adapted from the equations in CLM5.0 by Qianyu Li, see the CLM5 Technical Note 2.9.6 - vpd = max((veg_esat - ceair), 50._r8) * 0.001_r8 !addapted from CLM5. Put some constraint on RH in the & - !canopy when Medlyn stomatal conductance is being used, the unit is KPa. Ignoring the constraint will cause errors when model runs. + vpd = max((veg_esat - ceair), 50._r8) * 0.001_r8 !addapted from CLM5. Put some constraint on VPD + !when Medlyn stomatal conductance is being used, the unit is KPa. Ignoring the constraint will cause errors when model runs. term = h2o_co2_stoma_diffuse_ratio * anet / (leaf_co2_ppress / can_press * umol_per_mol) aquad = 1.0_r8 bquad = -(2.0 * (medlynintercept(ft)/umol_per_mol+ term) + (medlynslope(ft) * term)**2 / & From 786c764c5dee5bd2f8e0b9f9e731163e5984b965 Mon Sep 17 00:00:00 2001 From: Li Date: Sun, 9 Feb 2020 11:27:06 -0500 Subject: [PATCH 03/46] Added Medlyn stomatal model, first pass through. --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index ecf8cb301f..ee1ea5cb6d 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -852,7 +852,6 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! ------------------------------------------------------------------------------------ use EDPftvarcon , only : EDPftvarcon_inst - use FatesConstantsMod, only: umol_per_mol ! Arguments @@ -959,7 +958,9 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.999_r8 - integer, parameter :: stomatalcond_mtd = 2 !Flag for stomatal conductance model method, 1 for Ball-Berry, 2 for Medlyn + + !Flag for stomatal conductance model method, 1 for Ball-Berry, 2 for Medlyn + integer, parameter :: stomatalcond_mtd = 2 associate( bb_slope => EDPftvarcon_inst%BB_slope ,& ! slope of BB relationship, unitless medlynslope=> EDPftvarcon_inst%medlynslope , & ! Slope for Medlyn stomatal conductance model method, the unit is KPa^0.5 @@ -1109,20 +1110,20 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in 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) if ( stomatalcond_mtd == 2 ) then - !stomatal conductance calculated from Belinda Medlyn et al. (2011), the numerical & - !implementation was adapted from the equations in CLM5.0 by Qianyu Li, see the CLM5 Technical Note 2.9.6 + !stomatal conductance calculated from Medlyn et al. (2011), the numerical & + !implementation was adapted from the equations in CLM5.0 vpd = max((veg_esat - ceair), 50._r8) * 0.001_r8 !addapted from CLM5. Put some constraint on VPD !when Medlyn stomatal conductance is being used, the unit is KPa. Ignoring the constraint will cause errors when model runs. - term = h2o_co2_stoma_diffuse_ratio * anet / (leaf_co2_ppress / can_press * umol_per_mol) + term = h2o_co2_stoma_diffuse_ratio * anet / (leaf_co2_ppress / can_press) aquad = 1.0_r8 - bquad = -(2.0 * (medlynintercept(ft)/umol_per_mol+ term) + (medlynslope(ft) * term)**2 / & - (gb_mol/umol_per_mol * vpd )) - cquad = medlynintercept(ft)*medlynintercept(ft)/(umol_per_mol*umol_per_mol) + & - (2.0*medlynintercept(ft)/umol_per_mol + term * & + bquad = -(2.0 * (medlynintercept(ft)+ term) + (medlynslope(ft) * term)**2 / & + (gb_mol * vpd )) + cquad = medlynintercept(ft)*medlynintercept(ft) + & + (2.0*medlynintercept(ft) + term * & (1.0 - medlynslope(ft)* medlynslope(ft) / vpd)) * term call quadratic_f (aquad, bquad, cquad, r1, r2) - gs_mol = max(r1,r2) * umol_per_mol ! change the unit to umol /m**2/s + gs_mol = max(r1,r2) else if ( stomatalcond_mtd ==1 ) then !stomatal conductance calculated from Ball et al. (1987) aquad = leaf_co2_ppress From 9667f268f04ded7a3cc4a583d2fe2f65310edcbd Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 11:44:00 -0700 Subject: [PATCH 04/46] Adding comments and whitespace --- biogeochem/EDPhysiologyMod.F90 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index e5ba9e1e9f..faad3f4036 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -503,8 +503,11 @@ subroutine trim_canopy( currentSite ) currentCohort%leaf_cost = currentCohort%leaf_cost * & (EDPftvarcon_inst%grperc(ipft) + 1._r8) endif - if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost)then - if (currentCohort%canopy_trim > EDPftvarcon_inst%trim_limit(ipft))then + + ! Check leaf cost against the yearly net uptake for that cohort leaf layer + if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost) then + ! Make sure the cohort trim fraction is great than the pft trim limit + if (currentCohort%canopy_trim > EDPftvarcon_inst%trim_limit(ipft)) then if ( debug ) then write(fates_log(),*) 'trimming leaves', & @@ -512,21 +515,27 @@ subroutine trim_canopy( currentSite ) endif ! keep trimming until none of the canopy is in negative carbon balance. - if (currentCohort%hite > EDPftvarcon_inst%hgt_min(ipft))then + if (currentCohort%hite > EDPftvarcon_inst%hgt_min(ipft)) then currentCohort%canopy_trim = currentCohort%canopy_trim - & EDPftvarcon_inst%trim_inc(ipft) - if (EDPftvarcon_inst%evergreen(ipft) /= 1)then + + if (EDPftvarcon_inst%evergreen(ipft) /= 1) then currentCohort%laimemory = currentCohort%laimemory * & (1.0_r8 - EDPftvarcon_inst%trim_inc(ipft)) endif + trimmed = .true. - endif - endif - endif - endif !leaf activity? - enddo !z + endif ! hite check + endif ! trim limit check + endif ! net uptake check + endif ! leaf activity check + enddo ! z, leaf layer loop + + ! Reset activity for the cohort for the start of the next year currentCohort%year_net_uptake(:) = 999.0_r8 + + ! Add to trim fraction if cohort not trimmed at all if ( (.not.trimmed) .and.currentCohort%canopy_trim < 1.0_r8)then currentCohort%canopy_trim = currentCohort%canopy_trim + EDPftvarcon_inst%trim_inc(ipft) endif From f7265bd681f74517b4342d0233efac714ebc7e48 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 13:39:34 -0700 Subject: [PATCH 05/46] adding in optimum clai calc using lapack solver call --- biogeochem/EDPhysiologyMod.F90 | 60 ++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index faad3f4036..49451796ef 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -393,6 +393,22 @@ subroutine trim_canopy( currentSite ) real(r8) :: lai_current ! the LAI in the current leaf layer real(r8) :: cumulative_lai ! the cumulative LAI, top down, to the leaf layer of interest + ! LAPACK least squares fit variables (A*X = B) + integer :: nll = 4 ! Number of leaf layers to fit a regression to for calculating the optimum lai + character(1) :: trans = 'N' ! Input matrix is not transposed + + integer, parameter :: m = 2, n = 2 ! Number of rows and columns, respectively, in matrix A + integer, parameter :: nrhs = 1 ! Number of columns in matrix B and X + integer, parameter :: workmax = 100 ! Maximum iterations to minimize work + + integer :: lda = m, ldb = n ! Leading dimension of A and B, respectively + integer :: lwork ! Dimension of work array + integer :: info ! Procedure diagnostic ouput + + real(r8) :: nnu_clai_a(m,n) ! LHS of linear least squares fit + real(r8) :: nnu_clai_b(m,nrhs) ! RHS of linear least squares fit + real(r8) :: work(workmax) ! work array + !---------------------------------------------------------------------- currentPatch => currentSite%youngest_patch @@ -439,6 +455,10 @@ subroutine trim_canopy( currentSite ) ! PFT-level maximum SLA value, even if under a thick canopy (same units as slatop) sla_max = EDPftvarcon_inst%slamax(ipft) + ! Initialize nnu_clai_a + nnu_clai_a(:) = 0._r8 + nnu_clai_b(:) = 0._r8 + !Leaf cost vs netuptake for each leaf layer. do z = 1, currentCohort%nv @@ -453,8 +473,8 @@ subroutine trim_canopy( currentSite ) lai_current = min(leaf_inc, currentCohort%treelai - lai_layers_above) cumulative_lai = lai_canopy_above + lai_layers_above + 0.5*lai_current - if (currentCohort%year_net_uptake(z) /= 999._r8)then !there was activity this year in this leaf layer. - + !there was activity this year in this leaf layer. This should only occur for bottom most leaf layer + if (currentCohort%year_net_uptake(z) /= 999._r8)then ! Calculate sla_levleaf following the sla profile with overlying leaf area ! Scale for leaf nitrogen profile @@ -504,6 +524,15 @@ subroutine trim_canopy( currentSite ) (EDPftvarcon_inst%grperc(ipft) + 1._r8) endif + ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai + nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used + nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost + nnu_clai_a(2,1) = nnu_clai_a(1,2) + nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 + nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai + nnu_clai_b(2,1) = nnu_clai_b(1,1) + (cumulative_lai * & + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) + ! Check leaf cost against the yearly net uptake for that cohort leaf layer if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost) then ! Make sure the cohort trim fraction is great than the pft trim limit @@ -532,6 +561,33 @@ subroutine trim_canopy( currentSite ) endif ! leaf activity check enddo ! z, leaf layer loop + ! Compute the optimal cumulative lai based on the cohort net-net uptake profile if at least 2 leaf layers + if (nnu_clai_a(1,1) > 1) then + + ! Compute the optimum size of the work array + lwork = -1 ! Ask sgels to compute optimal number of entries for work + call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) + lwork = int(work(1)) ! Pick the optimum. TBD, can work(1) come back with greater than work size? + + if (debug) then + write(fates_log(),*) 'LLSF lwork output (info, lwork):', info, lwork + endif + + ! Compute the minimum of 2-norm of b-Ax + call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) + + if (info < 0) then + write(fates_log(),*) 'LLSF optimium LAI calculation returned illegal value' + call endrun(msg=errMsg(sourcefile, __LINE__)) + endif + + if (debug) then + write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b + write(fates_log(),*) 'LLSF optimium LAI info:', info + write(fates_log(),*) 'LAI fraction (cumulative lai/nnu_clai_b):', cumulative_lai/nnu_clai_b(1,1) + endif + endif + ! Reset activity for the cohort for the start of the next year currentCohort%year_net_uptake(:) = 999.0_r8 From 36b14ab38c99af8c8e48a8d38989dbb4f7bdf7d7 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 13:54:27 -0700 Subject: [PATCH 06/46] correcting indexing error --- biogeochem/EDPhysiologyMod.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 49451796ef..e33b533526 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -456,8 +456,8 @@ subroutine trim_canopy( currentSite ) sla_max = EDPftvarcon_inst%slamax(ipft) ! Initialize nnu_clai_a - nnu_clai_a(:) = 0._r8 - nnu_clai_b(:) = 0._r8 + nnu_clai_a(:,:) = 0._r8 + nnu_clai_b(:,:) = 0._r8 !Leaf cost vs netuptake for each leaf layer. do z = 1, currentCohort%nv @@ -563,7 +563,7 @@ subroutine trim_canopy( currentSite ) ! Compute the optimal cumulative lai based on the cohort net-net uptake profile if at least 2 leaf layers if (nnu_clai_a(1,1) > 1) then - + ! Compute the optimum size of the work array lwork = -1 ! Ask sgels to compute optimal number of entries for work call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) From 0796e2f62ed4bdedf59c8cc351af62181269e37f Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 15:23:22 -0700 Subject: [PATCH 07/46] fixing indexing error for loop summation --- biogeochem/EDPhysiologyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index e33b533526..f5c46a979b 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -530,7 +530,7 @@ subroutine trim_canopy( currentSite ) nnu_clai_a(2,1) = nnu_clai_a(1,2) nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai - nnu_clai_b(2,1) = nnu_clai_b(1,1) + (cumulative_lai * & + nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai * & (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) ! Check leaf cost against the yearly net uptake for that cohort leaf layer From e6b68b69e2d5226173f8ba8fe2028b15e6c82e9e Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 15:24:49 -0700 Subject: [PATCH 08/46] corrected the fractional output --- biogeochem/EDPhysiologyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index f5c46a979b..772a82486d 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -584,7 +584,7 @@ subroutine trim_canopy( currentSite ) if (debug) then write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b write(fates_log(),*) 'LLSF optimium LAI info:', info - write(fates_log(),*) 'LAI fraction (cumulative lai/nnu_clai_b):', cumulative_lai/nnu_clai_b(1,1) + write(fates_log(),*) 'LAI fraction (cumulative lai/nnu_clai_b):', nnu_clai_b(1,1) / cumulative_lai endif endif From 321bdb6bc9dfe97d8e05bed756b9504322283b28 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 15:25:42 -0700 Subject: [PATCH 09/46] forget to fix concurrent output desc --- biogeochem/EDPhysiologyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 772a82486d..ea347268ba 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -584,7 +584,7 @@ subroutine trim_canopy( currentSite ) if (debug) then write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b write(fates_log(),*) 'LLSF optimium LAI info:', info - write(fates_log(),*) 'LAI fraction (cumulative lai/nnu_clai_b):', nnu_clai_b(1,1) / cumulative_lai + write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai endif endif From a010cd9c1853abcff4629e333ce2d2b2caf6dbef Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 18 Mar 2020 15:32:21 -0700 Subject: [PATCH 10/46] adding logic to reduce fit to last few layers --- biogeochem/EDPhysiologyMod.F90 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index ea347268ba..56854875a2 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -525,13 +525,15 @@ subroutine trim_canopy( currentSite ) endif ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai - nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used - nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost - nnu_clai_a(2,1) = nnu_clai_a(1,2) - nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 - nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai - nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai * & - (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) + if (currentCohort%nv - z < nll) then ! Only for nll layers + nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used + nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost + nnu_clai_a(2,1) = nnu_clai_a(1,2) + nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 + nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai + nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai * & + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) + end if ! Check leaf cost against the yearly net uptake for that cohort leaf layer if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost) then From 1bbd1295b565bf057877571e2dec5c12d54a54e8 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 19 Mar 2020 10:42:28 -0700 Subject: [PATCH 11/46] adding more temp diagnostic ouput --- biogeochem/EDPhysiologyMod.F90 | 50 ++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 56854875a2..5e24e830b3 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -393,6 +393,10 @@ subroutine trim_canopy( currentSite ) real(r8) :: lai_current ! the LAI in the current leaf layer real(r8) :: cumulative_lai ! the cumulative LAI, top down, to the leaf layer of interest + ! Temporary diagnostic ouptut + integer :: ipatch + integer :: icohort + ! LAPACK least squares fit variables (A*X = B) integer :: nll = 4 ! Number of leaf layers to fit a regression to for calculating the optimum lai character(1) :: trans = 'N' ! Input matrix is not transposed @@ -411,12 +415,29 @@ subroutine trim_canopy( currentSite ) !---------------------------------------------------------------------- + ipatch = 1 ! Start counting patches + currentPatch => currentSite%youngest_patch do while(associated(currentPatch)) - + + ! Add debug diagnstic output to determine which patch + if (debug) then + write(fates_log(),*) 'Current patch:', ipatch + write(fates_log(),*) 'Current patch cohorts:', currentPatch%countcohorts + endif + + icohort = 1 + currentCohort => currentPatch%tallest do while (associated(currentCohort)) + ! Add debug diagnstic output to determine which cohort + if (debug) then + write(fates_log(),*) 'Current cohort:', icohort + write(fates_log(),*) 'Starting canopy trim:', currentCohort%canopy_trim + write(fates_log(),*) 'Starting laimemory:', currentCohort%laimemory + endif + trimmed = .false. ipft = currentCohort%pft call carea_allom(currentCohort%dbh,currentCohort%n,currentSite%spread,currentCohort%pft,currentCohort%c_area) @@ -524,6 +545,13 @@ subroutine trim_canopy( currentSite ) (EDPftvarcon_inst%grperc(ipft) + 1._r8) endif + if (debug) then + write(fates_log(),*) 'cl,nv,z:', cl,',', currentCohort%nv,',', z + write(fates_log(),*) 'cumulative lai:', cumulative_lai + write(fates_log(),*) 'leaf_cost:', currentCohort%leaf_cost + write(fates_log(),*) 'year_net_uptake:', currentCohort%year_net_uptake(z) + endif + ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai if (currentCohort%nv - z < nll) then ! Only for nll layers nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used @@ -542,7 +570,7 @@ subroutine trim_canopy( currentSite ) if ( debug ) then write(fates_log(),*) 'trimming leaves', & - currentCohort%canopy_trim,currentCohort%leaf_cost + currentCohort%canopy_trim!,currentCohort%leaf_cost endif ! keep trimming until none of the canopy is in negative carbon balance. @@ -553,6 +581,9 @@ subroutine trim_canopy( currentSite ) if (EDPftvarcon_inst%evergreen(ipft) /= 1) then currentCohort%laimemory = currentCohort%laimemory * & (1.0_r8 - EDPftvarcon_inst%trim_inc(ipft)) + if ( debug ) then + write(fates_log(),*) 'evergreen' + endif endif trimmed = .true. @@ -571,9 +602,9 @@ subroutine trim_canopy( currentSite ) call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) lwork = int(work(1)) ! Pick the optimum. TBD, can work(1) come back with greater than work size? - if (debug) then - write(fates_log(),*) 'LLSF lwork output (info, lwork):', info, lwork - endif + ! if (debug) then + ! write(fates_log(),*) 'LLSF lwork output (info, lwork):', info, lwork + ! endif ! Compute the minimum of 2-norm of b-Ax call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) @@ -584,9 +615,10 @@ subroutine trim_canopy( currentSite ) endif if (debug) then - write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b - write(fates_log(),*) 'LLSF optimium LAI info:', info - write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai + ! write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b + write(fates_log(),*) 'LLSF optimium LAI:', nnu_clai_b(1,1) + ! write(fates_log(),*) 'LLSF optimium LAI info:', info + ! write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai endif endif @@ -604,8 +636,10 @@ subroutine trim_canopy( currentSite ) ! currentCohort%canopy_trim = 1.0_r8 !FIX(RF,032414) this turns off ctrim for now. currentCohort => currentCohort%shorter + icohort = icohort + 1 enddo currentPatch => currentPatch%older + ipatch = ipatch + 1 enddo end subroutine trim_canopy From 5151bf0def129ebc627b98c717e574cac27dcf9a Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 19 Mar 2020 13:48:48 -0700 Subject: [PATCH 12/46] adjusting temp diagnostic output --- biogeochem/EDPhysiologyMod.F90 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 5e24e830b3..5f6557ed48 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -550,6 +550,7 @@ subroutine trim_canopy( currentSite ) write(fates_log(),*) 'cumulative lai:', cumulative_lai write(fates_log(),*) 'leaf_cost:', currentCohort%leaf_cost write(fates_log(),*) 'year_net_uptake:', currentCohort%year_net_uptake(z) + write(fates_log(),*) 'canopy trim:', currentCohort%canopy_trim endif ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai @@ -568,10 +569,10 @@ subroutine trim_canopy( currentSite ) ! Make sure the cohort trim fraction is great than the pft trim limit if (currentCohort%canopy_trim > EDPftvarcon_inst%trim_limit(ipft)) then - if ( debug ) then - write(fates_log(),*) 'trimming leaves', & - currentCohort%canopy_trim!,currentCohort%leaf_cost - endif + ! if ( debug ) then + ! write(fates_log(),*) 'trimming leaves', & + ! currentCohort%canopy_trim,currentCohort%leaf_cost + ! endif ! keep trimming until none of the canopy is in negative carbon balance. if (currentCohort%hite > EDPftvarcon_inst%hgt_min(ipft)) then @@ -581,9 +582,6 @@ subroutine trim_canopy( currentSite ) if (EDPftvarcon_inst%evergreen(ipft) /= 1) then currentCohort%laimemory = currentCohort%laimemory * & (1.0_r8 - EDPftvarcon_inst%trim_inc(ipft)) - if ( debug ) then - write(fates_log(),*) 'evergreen' - endif endif trimmed = .true. @@ -631,7 +629,7 @@ subroutine trim_canopy( currentSite ) endif if ( debug ) then - write(fates_log(),*) 'trimming',currentCohort%canopy_trim + write(fates_log(),*) 'trimming:',currentCohort%canopy_trim endif ! currentCohort%canopy_trim = 1.0_r8 !FIX(RF,032414) this turns off ctrim for now. From 022bb72371634f3e2be67e578f6dff4c6d778e37 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 19 Mar 2020 16:39:10 -0700 Subject: [PATCH 13/46] adding in calculation of opmtimum trim value based on previous value --- biogeochem/EDPhysiologyMod.F90 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 5f6557ed48..0451c4b616 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -413,6 +413,9 @@ subroutine trim_canopy( currentSite ) real(r8) :: nnu_clai_b(m,nrhs) ! RHS of linear least squares fit real(r8) :: work(workmax) ! work array + real(r8) :: initial_trim ! Initial trim + real(r8) :: optimum_trim ! Optimum trim value + !---------------------------------------------------------------------- ipatch = 1 ! Start counting patches @@ -431,10 +434,13 @@ subroutine trim_canopy( currentSite ) currentCohort => currentPatch%tallest do while (associated(currentCohort)) + ! Save off the incoming trim + initial_trim = currentCohort%canopy_trim + ! Add debug diagnstic output to determine which cohort if (debug) then write(fates_log(),*) 'Current cohort:', icohort - write(fates_log(),*) 'Starting canopy trim:', currentCohort%canopy_trim + write(fates_log(),*) 'Starting canopy trim:', initial_trim write(fates_log(),*) 'Starting laimemory:', currentCohort%laimemory endif @@ -618,6 +624,16 @@ subroutine trim_canopy( currentSite ) ! write(fates_log(),*) 'LLSF optimium LAI info:', info ! write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai endif + + ! Calculate the optimum trim based on the initial canopy trim value + optimum_trim = (nnu_clai_b(1,1) / cumulative_lai) * initial_trim + + ! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits. + if (optimum_trim > 0. .and. optimum_trim < 1.) then + currentCohort%canopy_trim = optimum_trim + trimmed = .true. + endif + endif ! Reset activity for the cohort for the start of the next year From 779958e3a281866ecb51c9fe03c2dcded6576cd3 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 23 Apr 2020 19:03:20 -0600 Subject: [PATCH 14/46] Use lightning data coming in from the CTSM --- fire/SFMainMod.F90 | 15 ++++++++++----- main/FatesInterfaceMod.F90 | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index c015db7131..79df45da8c 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -96,7 +96,7 @@ subroutine fire_model( currentSite, bc_in) call charecteristics_of_fuel(currentSite) call rate_of_spread(currentSite) call ground_fuel_consumption(currentSite) - call area_burnt_intensity(currentSite) + call area_burnt_intensity(currentSite, bc_in) call crown_scorching(currentSite) call crown_damage(currentSite) call cambial_damage_kill(currentSite) @@ -651,7 +651,7 @@ end subroutine ground_fuel_consumption !***************************************************************** - subroutine area_burnt_intensity ( currentSite ) + subroutine area_burnt_intensity ( currentSite, bc_in ) !***************************************************************** !returns the updated currentPatch%FI value for each patch. @@ -662,8 +662,8 @@ subroutine area_burnt_intensity ( currentSite ) !currentPatch%ROS_front forward ROS (m/min) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2) + use clm_varctl, only: use_fates_spitfire use FatesInterfaceMod, only : hlm_use_spitfire - use EDParamsMod, only : ED_val_nignitions 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, & @@ -671,6 +671,7 @@ subroutine area_burnt_intensity ( currentSite ) type(ed_site_type), intent(inout), target :: currentSite type(ed_patch_type), pointer :: currentPatch + type(bc_in_type), intent(in) :: bc_in real(r8) ROS !m/s real(r8) W !kgBiomass/m2 @@ -688,10 +689,14 @@ subroutine area_burnt_intensity ( currentSite ) ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 - currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) + if (use_fates_spitfire == 3) then + currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA + else ! USING LIGHTNING DATA + currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) + end if !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes - currentSite%NF = ED_val_nignitions * years_per_day * cg_strikes + currentSite%NF = bc_in%lightning24 * cg_strikes ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 8bc84cd8fe..140c283bbd 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -327,6 +327,7 @@ module FatesInterfaceMod ! TO-DO: Get some consensus on the correct vegetation temperature used for phenology. ! It is possible that the bare-ground value is where the average is being stored. ! (RGK-01-2017) + real(r8) :: lightning24 real(r8) :: t_veg24_si ! Patch 24 hour vegetation temperature [K] @@ -888,6 +889,7 @@ subroutine zero_bcs(this,s) ! Input boundaries + this%bc_in(s)%lightning24 = 0.0_r8 this%bc_in(s)%t_veg24_si = 0.0_r8 this%bc_in(s)%t_veg24_pa(:) = 0.0_r8 this%bc_in(s)%precip24_pa(:) = 0.0_r8 From b5a608a41ee3efbd4e70f4506d90d8096f98560f Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 27 Apr 2020 17:16:06 -0700 Subject: [PATCH 15/46] add in calculation for optimum laimemory --- biogeochem/EDPhysiologyMod.F90 | 42 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 0451c4b616..6aac16b42b 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -415,6 +415,8 @@ subroutine trim_canopy( currentSite ) real(r8) :: initial_trim ! Initial trim real(r8) :: optimum_trim ! Optimum trim value + real(r8) :: initial_laimem ! Initial laimemory + real(r8) :: optimum_laimem ! Optimum laimemory !---------------------------------------------------------------------- @@ -434,8 +436,9 @@ subroutine trim_canopy( currentSite ) currentCohort => currentPatch%tallest do while (associated(currentCohort)) - ! Save off the incoming trim + ! Save off the incoming trim and laimemory initial_trim = currentCohort%canopy_trim + initial_laimem = currentCohort%laimemory ! Add debug diagnstic output to determine which cohort if (debug) then @@ -551,16 +554,8 @@ subroutine trim_canopy( currentSite ) (EDPftvarcon_inst%grperc(ipft) + 1._r8) endif - if (debug) then - write(fates_log(),*) 'cl,nv,z:', cl,',', currentCohort%nv,',', z - write(fates_log(),*) 'cumulative lai:', cumulative_lai - write(fates_log(),*) 'leaf_cost:', currentCohort%leaf_cost - write(fates_log(),*) 'year_net_uptake:', currentCohort%year_net_uptake(z) - write(fates_log(),*) 'canopy trim:', currentCohort%canopy_trim - endif - ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai - if (currentCohort%nv - z < nll) then ! Only for nll layers + if (currentCohort%nv > nll .and. currentCohort%nv - z < nll) then ! Only for nll layers nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost nnu_clai_a(2,1) = nnu_clai_a(1,2) @@ -619,20 +614,29 @@ subroutine trim_canopy( currentSite ) endif if (debug) then - ! write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b + write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b write(fates_log(),*) 'LLSF optimium LAI:', nnu_clai_b(1,1) - ! write(fates_log(),*) 'LLSF optimium LAI info:', info - ! write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai + write(fates_log(),*) 'LLSF optimium LAI info:', info + write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai endif ! Calculate the optimum trim based on the initial canopy trim value - optimum_trim = (nnu_clai_b(1,1) / cumulative_lai) * initial_trim + if (cumulative_lai > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? + optimum_trim = (nnu_clai_b(1,1) / cumulative_lai) * initial_trim + optimum_laimem = (nnu_clai_b(1,1) / cumulative_lai) * initial_laimem - ! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits. - if (optimum_trim > 0. .and. optimum_trim < 1.) then - currentCohort%canopy_trim = optimum_trim - trimmed = .true. - endif + ! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits. + if (optimum_trim > 0. .and. optimum_trim < 1.) then + currentCohort%canopy_trim = optimum_trim + + ! If the cohort pft is not evergreen we reduce the laimemory as well + if (EDPftvarcon_inst%evergreen(ipft) /= 1) then + currentCohort%laimemory = optimum_laimem + endif + + trimmed = .true. + + endif endif From 40e20dedb40a80923deb90106709096ebf46505e Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 29 Apr 2020 09:56:13 -0700 Subject: [PATCH 16/46] fixing endif error --- biogeochem/EDPhysiologyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 6aac16b42b..d66078f11f 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -637,7 +637,7 @@ subroutine trim_canopy( currentSite ) trimmed = .true. endif - + endif endif ! Reset activity for the cohort for the start of the next year From 0957319d6d4f7f10f1c7bec5dd5e7e02120e3d6e Mon Sep 17 00:00:00 2001 From: Li Date: Fri, 8 May 2020 18:56:16 -0400 Subject: [PATCH 17/46] Add switch for choosing between Medlyn stomatal model and Ball-Berry model --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 68 +- main/EDParamsMod.F90 | 34 +- main/EDPftvarcon.F90 | 24 +- parameter_files/fates_params_default.cdl | 746 +++++++++++---------- 4 files changed, 431 insertions(+), 441 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index ee1ea5cb6d..7ffac3e6a4 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, stomatal_model ! CIME Globals use shr_log_mod , only : errMsg => shr_log_errMsg @@ -169,7 +169,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) 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) :: stomatal_intercept_btran ! minimum leaf 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]) @@ -250,17 +250,17 @@ 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( & 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? + woody => EDPftvarcon_inst%woody , & ! Is vegetation woody or not? + stomatal_intercept => EDPftvarcon_inst%stomatal_intercept ) !stomatal intercept for Ball-Berry model and Medlyn model + - bbbopt(0) = ED_val_bbopt_c4 - bbbopt(1) = ED_val_bbopt_c3 do s = 1,nsites @@ -403,7 +403,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) if (hlm_use_planthydro.eq.itrue ) then - bbb = max( cf/rsmax0, bbbopt(nint(c3psn(ft)))*currentCohort%co_hydr%btran(1) ) + stomatal_intercept_btran = max( cf/rsmax0,stomatal_intercept(ft)*currentCohort%co_hydr%btran(1) ) btran_eff = currentCohort%co_hydr%btran(1) ! dinc_ed is the total vegetation area index of each "leaf" layer @@ -420,7 +420,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) 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 @@ -525,7 +525,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 @@ -829,7 +829,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 @@ -884,7 +884,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 ! minimum leaf 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) @@ -927,7 +927,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) real(r8) :: term ! intermediate variable in Medlyn stomatal conductance model real(r8) :: vpd ! water vapor deficit in Medlyn stomatal model (KPa) @@ -960,18 +959,17 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in real(r8),parameter :: theta_ip = 0.999_r8 !Flag for stomatal conductance model method, 1 for Ball-Berry, 2 for Medlyn - integer, parameter :: stomatalcond_mtd = 2 + !integer, parameter :: stomatalcond_mtd associate( bb_slope => EDPftvarcon_inst%BB_slope ,& ! slope of BB relationship, unitless - medlynslope=> EDPftvarcon_inst%medlynslope , & ! Slope for Medlyn stomatal conductance model method, the unit is KPa^0.5 - medlynintercept=> EDPftvarcon_inst%medlynintercept ) !Intercept for Medlyn stomatal conductance model method, the unit is umol/m**2/s + 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 ) !Intercept for Medlyn & Ball Berry stomatal conductance model method, 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 @@ -990,7 +988,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 @@ -1106,29 +1104,29 @@ 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- h2o_co2_bl_diffuse_ratio/gb_mol * anet * can_press leaf_co2_ppress = max(leaf_co2_ppress,1.e-06_r8) - if ( stomatalcond_mtd == 2 ) then + if ( stomatal_model == 2 ) then !stomatal conductance calculated from Medlyn et al. (2011), the numerical & !implementation was adapted from the equations in CLM5.0 vpd = max((veg_esat - ceair), 50._r8) * 0.001_r8 !addapted from CLM5. Put some constraint on VPD !when Medlyn stomatal conductance is being used, the unit is KPa. Ignoring the constraint will cause errors when model runs. term = h2o_co2_stoma_diffuse_ratio * anet / (leaf_co2_ppress / can_press) aquad = 1.0_r8 - bquad = -(2.0 * (medlynintercept(ft)+ term) + (medlynslope(ft) * term)**2 / & + bquad = -(2.0 * (stomatal_intercept_btran+ term) + (medlyn_slope(ft) * term)**2 / & (gb_mol * vpd )) - cquad = medlynintercept(ft)*medlynintercept(ft) + & - (2.0*medlynintercept(ft) + term * & - (1.0 - medlynslope(ft)* medlynslope(ft) / vpd)) * term + cquad = stomatal_intercept_btran*stomatal_intercept_btran + & + (2.0*stomatal_intercept_btran + term * & + (1.0 - medlyn_slope(ft)* medlyn_slope(ft) / vpd)) * term call quadratic_f (aquad, bquad, cquad, r1, r2) gs_mol = max(r1,r2) - else if ( stomatalcond_mtd ==1 ) then !stomatal conductance calculated from Ball et al. (1987) + else if ( stomatal_model == 1 ) then !stomatal conductance calculated from Ball et al. (1987) 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) @@ -1149,14 +1147,10 @@ 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 =medlynintercept (for Medlyn's method),& - ! or gs_mol = bbb (for Ball-Berry's method) + ! End of co2_inter_c iteration. Check for an < 0, in which case + ! gs_mol =stomatal_intercept_btran if (anet < 0._r8) then - if ( stomatalcond_mtd == 2 ) then - gs_mol = medlynintercept(ft) - else if ( stomatalcond_mtd == 1) then - gs_mol = bbb - end if + gs_mol = stomatal_intercept_btran end if ! Final estimates for leaf_co2_ppress and co2_inter_c @@ -1202,9 +1196,9 @@ 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 .and. (stomatalcond_mtd == 1)) then + if (abs(gs_mol-gs_mol_err) > 1.e-01_r8 .and. (stomatal_model == 1)) then write (fates_log(),*) 'CF: Ball-Berry error check - stomatal conductance error:' write (fates_log(),*) gs_mol, gs_mol_err end if @@ -1223,7 +1217,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 986151a8fe..181b337543 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 @@ -42,7 +40,8 @@ module EDParamsMod real(r8),protected, public :: ED_val_phen_coldtemp real(r8),protected, public :: ED_val_cohort_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 + real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometriy + real(r8),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 @@ -67,8 +66,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" @@ -82,6 +79,7 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_cohort_fusion_tol= "fates_cohort_size_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= "stomatal_model" ! Resistance to active crown fire @@ -168,8 +166,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 @@ -185,6 +181,7 @@ subroutine FatesParamsInit() ED_val_canopy_closure_thresh = nan hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan + stomatal_model = nan hydr_psi0 = nan hydr_psicap = nan @@ -245,12 +242,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) @@ -289,6 +280,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) @@ -387,12 +381,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) @@ -432,6 +420,9 @@ 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=stomatal_model) + call fates_params%RetreiveParameter(name=hydr_name_kmax_rsurf1, & data=hydr_kmax_rsurf1) @@ -516,8 +507,6 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'ED_val_understorey_death = ',ED_val_understorey_death write(fates_log(),fmt0) 'ED_val_cwd_fcel = ',ED_val_cwd_fcel write(fates_log(),fmt0) 'ED_val_cwd_flig = ',ED_val_cwd_flig - write(fates_log(),fmt0) 'ED_val_bbopt_c3 = ',ED_val_bbopt_c3 - write(fates_log(),fmt0) 'ED_val_bbopt_c4 = ',ED_val_bbopt_c4 write(fates_log(),fmt0) 'ED_val_base_mr_20 = ', ED_val_base_mr_20 write(fates_log(),fmt0) 'ED_val_phen_drought_threshold = ',ED_val_phen_drought_threshold write(fates_log(),fmt0) 'ED_val_phen_doff_time = ',ED_val_phen_doff_time @@ -530,7 +519,8 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'ED_val_phen_coldtemp = ',ED_val_phen_coldtemp write(fates_log(),fmt0) 'ED_val_cohort_fusion_tol = ',ED_val_cohort_fusion_tol write(fates_log(),fmt0) 'ED_val_patch_fusion_tol = ',ED_val_patch_fusion_tol - write(fates_log(),fmt0) 'ED_val_canopy_closure_thresh = ',ED_val_canopy_closure_thresh + write(fates_log(),fmt0) 'ED_val_canopy_closure_thresh = ',ED_val_canopy_closure_thresh + write(fates_log(),fmt0) 'stomatal_model = ',stomatal_model write(fates_log(),fmt0) 'hydr_kmax_rsurf1 = ',hydr_kmax_rsurf1 write(fates_log(),fmt0) 'hydr_kmax_rsurf2 = ',hydr_kmax_rsurf2 write(fates_log(),fmt0) 'hydr_psi0 = ',hydr_psi0 diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 62fd1d2878..50f35b74de 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -52,8 +52,8 @@ module EDPftvarcon real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter - real(r8), allocatable :: medlynslope(:) ! Medlyn slope parameter KPa^0.5 - real(r8), allocatable :: medlynintercept(:) ! Medlyn intercept parameter umol/m**2/s + real(r8), allocatable :: medlyn_slope(:) ! Medlyn slope parameter KPa^0.5 + real(r8), allocatable :: stomatal_intercept(:) ! Stomatal intercept parameter umol/m**2/s real(r8), allocatable :: seed_alloc_mature(:) ! fraction of carbon balance allocated to ! clonal reproduction. @@ -437,15 +437,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_leaf_BB_slope' + name = 'fates_leaf_stomatal_slope_ballberry' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_leaf_medlynslope' !Medlyn's slpoe + name = 'fates_leaf_stomatal_slope_medlyn' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_leaf_medlynintercept' !Medlyn's intercept + name = 'fates_leaf_stomatal_intercept' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -946,17 +946,17 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%seed_suppl) - name = 'fates_leaf_BB_slope' + name = 'fates_leaf_stomatal_slope_ballberry' call fates_params%RetreiveParameterAllocate(name=name, & data=this%BB_slope) - name = 'fates_leaf_medlynslope' !Medlyn's slope + name = 'fates_leaf_stomatal_slope_medlyn' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%medlynslope) + data=this%medlyn_slope) - name = 'fates_leaf_medlynintercept' !Medlyn's intercept + name = 'fates_leaf_stomatal_intercept' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%medlynintercept) + data=this%stomatal_intercept) name = 'fates_senleaf_long_fdrought' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1936,8 +1936,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope - write(fates_log(),fmt0) 'medlynslope = ',EDPftvarcon_inst%medlynslope - write(fates_log(),fmt0) 'medlynintercept = ',EDPftvarcon_inst%medlynintercept + write(fates_log(),fmt0) 'medlyn_slope = ',EDPftvarcon_inst%medlyn_slope + write(fates_log(),fmt0) 'stomatal_intercept = ',EDPftvarcon_inst%stomatal_intercept write(fates_log(),fmt0) 'root_long = ',EDPftvarcon_inst%root_long write(fates_log(),fmt0) 'senleaf_long_fdrought = ',EDPftvarcon_inst%senleaf_long_fdrought write(fates_log(),fmt0) 'seed_alloc_mature = ',EDPftvarcon_inst%seed_alloc_mature diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 7de15e60bc..72a6246b3f 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,36 +1,21 @@ -netcdf fates_params_default { +netcdf fates_params_lqy_new { dimensions: fates_NCWD = 4 ; + fates_pft = 12 ; + fates_litterclass = 6 ; fates_history_age_bins = 7 ; + fates_history_coage_bins = 2 ; fates_history_height_bins = 6 ; fates_history_size_bins = 13 ; - fates_history_coage_bins = 1 ; fates_hydr_organs = 4 ; fates_leafage_class = 1 ; - fates_litterclass = 6 ; - fates_pft = 12 ; - fates_prt_organs = 6 ; fates_string_length = 60 ; + fates_prt_organs = 6 ; fates_variants = 2 ; variables: - double fates_history_ageclass_bin_edges(fates_history_age_bins) ; - fates_history_ageclass_bin_edges:units = "yr" ; - fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; - double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; - fates_history_coageclass_bin_edges:units = "years" ; - fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; - double fates_history_height_bin_edges(fates_history_height_bins) ; - fates_history_height_bin_edges:units = "m" ; - fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; - double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; - fates_history_sizeclass_bin_edges:units = "cm" ; - fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; - char fates_pftname(fates_pft, fates_string_length) ; - fates_pftname:units = "unitless - string" ; - fates_pftname:long_name = "Description of plant type" ; - char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; - fates_prt_organ_name:units = "unitless - string" ; - fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; + double fates_CWD_frac(fates_NCWD) ; + fates_CWD_frac:units = "fraction" ; + fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; double fates_alloc_storage_cushion(fates_pft) ; fates_alloc_storage_cushion:units = "fraction" ; fates_alloc_storage_cushion:long_name = "maximum size of storage C pool, relative to maximum size of leaf C pool" ; @@ -97,7 +82,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: O\'Brien 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" ; @@ -122,12 +107,33 @@ variables: fates_allom_stmode:units = "index" ; fates_allom_stmode:long_name = "storage allometry function index." ; fates_allom_stmode:possible_values = "1: target storage proportional to trimmed maximum leaf biomass." ; + double fates_base_mr_20 ; + fates_base_mr_20:units = "gC/gN/s" ; + fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; double fates_branch_turnover(fates_pft) ; fates_branch_turnover:units = "yr" ; fates_branch_turnover:long_name = "turnover time of branches" ; double fates_c2b(fates_pft) ; fates_c2b:units = "ratio" ; fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ; + double fates_canopy_closure_thresh ; + fates_canopy_closure_thresh:units = "unitless" ; + fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; + double fates_cohort_age_fusion_tol ; + fates_cohort_age_fusion_tol:units = "unitless" ; + fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts." ; + double fates_cohort_size_fusion_tol ; + fates_cohort_size_fusion_tol:units = "unitless" ; + fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + double fates_comp_excln ; + fates_comp_excln:units = "none" ; + fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; + double fates_cwd_fcel ; + fates_cwd_fcel:units = "unitless" ; + fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; + double fates_cwd_flig ; + fates_cwd_flig:units = "unitless" ; + fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; double fates_displar(fates_pft) ; fates_displar:units = "unitless" ; fates_displar:long_name = "Ratio of displacement height to canopy top height" ; @@ -164,18 +170,81 @@ variables: double fates_eca_vmax_ptase(fates_pft) ; fates_eca_vmax_ptase:units = "gP/m2/s" ; fates_eca_vmax_ptase:long_name = "maximum production rate for biochemical P (per m2) (ECA)" ; + double fates_fire_FBD(fates_litterclass) ; + fates_fire_FBD:units = "NA" ; + fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; + double fates_fire_SAV(fates_litterclass) ; + fates_fire_SAV:units = "NA" ; + fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; + double fates_fire_active_crown_fire ; + fates_fire_active_crown_fire:units = "0 or 1" ; + fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; double fates_fire_alpha_SH(fates_pft) ; fates_fire_alpha_SH:units = "NA" ; fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; double fates_fire_bark_scaler(fates_pft) ; fates_fire_bark_scaler:units = "fraction" ; fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; + double fates_fire_cg_strikes ; + fates_fire_cg_strikes:units = "fraction (0-1)" ; + fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; double fates_fire_crown_depth_frac(fates_pft) ; fates_fire_crown_depth_frac:units = "fraction" ; fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; 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_fire_drying_ratio ; + fates_fire_drying_ratio:units = "NA" ; + fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; + double fates_fire_durat_slope ; + fates_fire_durat_slope:units = "NA" ; + fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; + double fates_fire_fdi_a ; + fates_fire_fdi_a:units = "NA" ; + fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; + double fates_fire_fdi_alpha ; + fates_fire_fdi_alpha:units = "NA" ; + fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; + double fates_fire_fdi_b ; + fates_fire_fdi_b:units = "NA" ; + fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; + double fates_fire_fuel_energy ; + fates_fire_fuel_energy:units = "kJ/kg" ; + fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; + double fates_fire_low_moisture_Coeff(fates_litterclass) ; + fates_fire_low_moisture_Coeff:units = "NA" ; + fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_low_moisture_Slope(fates_litterclass) ; + fates_fire_low_moisture_Slope:units = "NA" ; + fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_max_durat ; + fates_fire_max_durat:units = "minutes" ; + fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; + double fates_fire_mid_moisture(fates_litterclass) ; + fates_fire_mid_moisture:units = "NA" ; + fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; + double fates_fire_mid_moisture_Coeff(fates_litterclass) ; + fates_fire_mid_moisture_Coeff:units = "NA" ; + fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_mid_moisture_Slope(fates_litterclass) ; + fates_fire_mid_moisture_Slope:units = "NA" ; + fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_min_moisture(fates_litterclass) ; + fates_fire_min_moisture:units = "NA" ; + fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; + double fates_fire_miner_damp ; + fates_fire_miner_damp:units = "NA" ; + fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; + double fates_fire_miner_total ; + fates_fire_miner_total:units = "fraction" ; + fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; + double fates_fire_nignitions ; + fates_fire_nignitions:units = "ignitions per year per km2" ; + fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; + 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_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -188,6 +257,18 @@ variables: double fates_grperc(fates_pft) ; fates_grperc:units = "unitless" ; fates_grperc:long_name = "Growth respiration factor" ; + double fates_history_ageclass_bin_edges(fates_history_age_bins) ; + fates_history_ageclass_bin_edges:units = "yr" ; + fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; + double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; + fates_history_coageclass_bin_edges:units = "years" ; + fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; + double fates_history_height_bin_edges(fates_history_height_bins) ; + fates_history_height_bin_edges:units = "m" ; + fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; + double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; + fates_history_sizeclass_bin_edges:units = "cm" ; + fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; double fates_hydr_avuln_gs(fates_pft) ; fates_hydr_avuln_gs:units = "unitless" ; fates_hydr_avuln_gs:long_name = "shape parameter for stomatal control of water vapor exiting leaf" ; @@ -199,10 +280,16 @@ variables: fates_hydr_epsil_node:long_name = "bulk elastic modulus" ; double fates_hydr_fcap_node(fates_hydr_organs, fates_pft) ; fates_hydr_fcap_node:units = "unitless" ; - fates_hydr_fcap_node:long_name = "fraction of (1-resid_node) that is capillary in source" ; + fates_hydr_fcap_node:long_name = "fraction of non-residual water that is capillary in source" ; double fates_hydr_kmax_node(fates_hydr_organs, fates_pft) ; - fates_hydr_kmax_node:units = "kgMPa/m/s" ; + fates_hydr_kmax_node:units = "kg/MPa/m/s" ; fates_hydr_kmax_node:long_name = "maximum xylem conductivity per unit conducting xylem area" ; + 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)" ; + double fates_hydr_kmax_rsurf2 ; + fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; + fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; double fates_hydr_p50_gs(fates_pft) ; fates_hydr_p50_gs:units = "MPa" ; fates_hydr_p50_gs:long_name = "water potential at 50% loss of stomatal conductance" ; @@ -218,9 +305,15 @@ variables: double fates_hydr_pitlp_node(fates_hydr_organs, fates_pft) ; fates_hydr_pitlp_node:units = "MPa" ; fates_hydr_pitlp_node:long_name = "turgor loss point" ; + double fates_hydr_psi0 ; + fates_hydr_psi0:units = "MPa" ; + fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; + double fates_hydr_psicap ; + fates_hydr_psicap:units = "MPa" ; + fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; double fates_hydr_resid_node(fates_hydr_organs, fates_pft) ; - fates_hydr_resid_node:units = "fraction" ; - fates_hydr_resid_node:long_name = "residual fraction" ; + fates_hydr_resid_node:units = "cm3/cm3" ; + fates_hydr_resid_node:long_name = "residual water conent" ; double fates_hydr_rfrac_stem(fates_pft) ; fates_hydr_rfrac_stem:units = "fraction" ; fates_hydr_rfrac_stem:long_name = "fraction of total tree resistance from troot to canopy" ; @@ -233,9 +326,12 @@ variables: double fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; fates_hydr_thetas_node:units = "cm3/cm3" ; fates_hydr_thetas_node:long_name = "saturated water content" ; - double fates_leaf_BB_slope(fates_pft) ; - fates_leaf_BB_slope:units = "unitless" ; - fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; + double fates_init_litter ; + fates_init_litter:units = "NA" ; + fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; + double fates_leaf_stomatal_slope_ballberry(fates_pft) ; + fates_leaf_stomatal_slope_ballberry:units = "unitless" ; + fates_leaf_stomatal_slope_ballberry:long_name = "stomatal slope parameter, as per Ball-Berry" ; double fates_leaf_c3psn(fates_pft) ; fates_leaf_c3psn:units = "flag" ; fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; @@ -299,15 +395,45 @@ variables: double fates_lf_flig(fates_pft) ; fates_lf_flig:units = "fraction" ; fates_lf_flig:long_name = "Leaf litter lignin fraction" ; + double fates_logging_coll_under_frac ; + fates_logging_coll_under_frac:units = "fraction" ; + fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; + 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_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." ; + double fates_logging_dbhmin ; + fates_logging_dbhmin:units = "cm" ; + fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; + double fates_logging_direct_frac ; + fates_logging_direct_frac:units = "fraction" ; + fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; + double fates_logging_event_code ; + fates_logging_event_code:units = "unitless" ; + fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; + double fates_logging_export_frac ; + fates_logging_export_frac:units = "fraction" ; + fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; + double fates_logging_mechanical_frac ; + fates_logging_mechanical_frac:units = "fraction" ; + fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; double fates_maintresp_reduction_curvature(fates_pft) ; fates_maintresp_reduction_curvature:units = "unitless (0-1)" ; fates_maintresp_reduction_curvature:long_name = "curvature of MR reduction as f(carbon storage), 1=linear, 0=very curved" ; double fates_maintresp_reduction_intercept(fates_pft) ; fates_maintresp_reduction_intercept:units = "unitless (0-1)" ; fates_maintresp_reduction_intercept:long_name = "intercept of MR reduction as f(carbon storage), 0=no throttling, 1=max throttling" ; + double fates_max_decomp(fates_litterclass) ; + fates_max_decomp:units = "yr-1" ; + fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; double fates_mort_bmort(fates_pft) ; fates_mort_bmort:units = "1/yr" ; fates_mort_bmort:long_name = "background mortality rate" ; + double fates_mort_disturb_frac ; + fates_mort_disturb_frac:units = "fraction" ; + fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; double fates_mort_freezetol(fates_pft) ; fates_mort_freezetol:units = "NA" ; fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; @@ -319,16 +445,16 @@ variables: fates_mort_hf_sm_threshold:long_name = "soil moisture (btran units) at which drought mortality begins for non-hydraulic model" ; double fates_mort_ip_age_senescence(fates_pft) ; fates_mort_ip_age_senescence:units = "years" ; - fates_mort_ip_age_senescence:long_name = "Mortality cohort age senescence inflection point" ; + fates_mort_ip_age_senescence:long_name = "Mortality cohort age senescence inflection point. If _ this mortality term is off. Setting this value turns on age dependent mortality. " ; double fates_mort_ip_size_senescence(fates_pft) ; fates_mort_ip_size_senescence:units = "dbh cm" ; - fates_mort_ip_size_senescence:long_name = "Mortality dbh senescence inflection point" ; + fates_mort_ip_size_senescence:long_name = "Mortality dbh senescence inflection point. If _ this mortality term is off. Setting this value turns on size dependent mortality" ; double fates_mort_r_age_senescence(fates_pft) ; fates_mort_r_age_senescence:units = "mortality rate year^-1" ; - fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change" ; + fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change. Sensible range is around 0.03-0.06. Larger values givesteeper mortality curves." ; double fates_mort_r_size_senescence(fates_pft) ; fates_mort_r_size_senescence:units = "mortality rate dbh^-1" ; - fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change" ; + fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change. Sensible range is around 0.03-0.06. Larger values give steeper mortality curves." ; double fates_mort_scalar_coldstress(fates_pft) ; fates_mort_scalar_coldstress:units = "1/yr" ; fates_mort_scalar_coldstress:long_name = "maximum mortality rate from cold stress" ; @@ -338,18 +464,54 @@ variables: double fates_mort_scalar_hydrfailure(fates_pft) ; fates_mort_scalar_hydrfailure:units = "1/yr" ; fates_mort_scalar_hydrfailure:long_name = "maximum mortality rate from hydraulic failure" ; + double fates_mort_understorey_death ; + fates_mort_understorey_death:units = "fraction" ; + fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; double fates_nfix1(fates_pft) ; fates_nfix1:units = "NA" ; fates_nfix1:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; double fates_nfix2(fates_pft) ; fates_nfix2:units = "NA" ; fates_nfix2:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; + double fates_patch_fusion_tol ; + fates_patch_fusion_tol:units = "unitless" ; + fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; + char fates_pftname(fates_pft, fates_string_length) ; + fates_pftname:units = "unitless - string" ; + fates_pftname:long_name = "Description of plant type" ; + double fates_phen_a ; + fates_phen_a:units = "none" ; + fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_b ; + fates_phen_b:units = "none" ; + fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_c ; + fates_phen_c:units = "none" ; + fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_chiltemp ; + fates_phen_chiltemp:units = "degrees C" ; + fates_phen_chiltemp:long_name = "chilling day counting threshold" ; double fates_phen_cold_size_threshold(fates_pft) ; fates_phen_cold_size_threshold:units = "cm" ; fates_phen_cold_size_threshold:long_name = "the dbh size above which will lead to phenology-related stem and leaf drop" ; + double fates_phen_coldtemp ; + fates_phen_coldtemp:units = "degrees C" ; + fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; + double fates_phen_doff_time ; + fates_phen_doff_time:units = "days" ; + fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; + double fates_phen_drought_threshold ; + fates_phen_drought_threshold:units = "m3/m3" ; + fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; double fates_phen_evergreen(fates_pft) ; fates_phen_evergreen:units = "logical flag" ; fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; + double fates_phen_mindayson ; + fates_phen_mindayson:units = "days" ; + fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; + double fates_phen_ncolddayslim ; + fates_phen_ncolddayslim:units = "days" ; + fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; double fates_phen_season_decid(fates_pft) ; fates_phen_season_decid:units = "logical flag" ; fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; @@ -392,12 +554,21 @@ variables: double fates_prt_nitr_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_nitr_stoich_p2:units = "(gN/gC)" ; fates_prt_nitr_stoich_p2:long_name = "nitrogen stoichiometry, parameter 2" ; + char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; + fates_prt_organ_name:units = "unitless - string" ; + fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; double fates_prt_phos_stoich_p1(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p1:units = "(gP/gC)" ; fates_prt_phos_stoich_p1:long_name = "phosphorous stoichiometry, parameter 1" ; double fates_prt_phos_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p2:units = "(gP/gC)" ; fates_prt_phos_stoich_p2:long_name = "phosphorous stoichiometry, parameter 2" ; + double fates_q10_froz ; + fates_q10_froz:units = "unitless" ; + fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; + double fates_q10_mr ; + fates_q10_mr:units = "unitless" ; + fates_q10_mr:long_name = "Q10 for maintenance respiration" ; double fates_recruit_hgt_min(fates_pft) ; fates_recruit_hgt_min:units = "m" ; fates_recruit_hgt_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ; @@ -455,6 +626,9 @@ variables: double fates_smpso(fates_pft) ; fates_smpso:units = "mm" ; fates_smpso:long_name = "Soil water potential at full stomatal opening" ; + double fates_soil_salinity ; + fates_soil_salinity:units = "ppt" ; + fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; double fates_taulnir(fates_pft) ; fates_taulnir:units = "fraction" ; fates_taulnir:long_name = "Leaf transmittance: near-IR" ; @@ -495,224 +669,25 @@ variables: double fates_z0mr(fates_pft) ; fates_z0mr:units = "unitless" ; fates_z0mr:long_name = "Ratio of momentum roughness length to canopy top height" ; - double fates_fire_FBD(fates_litterclass) ; - fates_fire_FBD:units = "NA" ; - fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; - double fates_fire_low_moisture_Coeff(fates_litterclass) ; - fates_fire_low_moisture_Coeff:units = "NA" ; - fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_low_moisture_Slope(fates_litterclass) ; - fates_fire_low_moisture_Slope:units = "NA" ; - fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_mid_moisture(fates_litterclass) ; - fates_fire_mid_moisture:units = "NA" ; - fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; - double fates_fire_mid_moisture_Coeff(fates_litterclass) ; - fates_fire_mid_moisture_Coeff:units = "NA" ; - fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_mid_moisture_Slope(fates_litterclass) ; - fates_fire_mid_moisture_Slope:units = "NA" ; - fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_min_moisture(fates_litterclass) ; - fates_fire_min_moisture:units = "NA" ; - fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; - double fates_fire_SAV(fates_litterclass) ; - fates_fire_SAV:units = "NA" ; - fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; - double fates_max_decomp(fates_litterclass) ; - fates_max_decomp:units = "yr-1" ; - fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; - double fates_CWD_frac(fates_NCWD) ; - fates_CWD_frac:units = "fraction" ; - fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; - double fates_base_mr_20 ; - fates_base_mr_20:units = "gC/gN/s" ; - fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; - double fates_bbopt_c3 ; - fates_bbopt_c3:units = "umol H2O/m**2/s" ; - fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; - double fates_bbopt_c4 ; - fates_bbopt_c4:units = "umol H2O/m**2/s" ; - fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; - double fates_canopy_closure_thresh ; - fates_canopy_closure_thresh:units = "unitless" ; - fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; - double fates_cohort_age_fusion_tol ; - fates_cohort_age_fusion_tol:units = "unitless" ; - fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts. 0 or _ implies functionality is turned off." ; - double fates_cohort_size_fusion_tol ; - fates_cohort_size_fusion_tol:units = "unitless" ; - fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; - double fates_comp_excln ; - fates_comp_excln:units = "none" ; - fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; - double fates_cwd_fcel ; - fates_cwd_fcel:units = "unitless" ; - fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; - double fates_cwd_flig ; - fates_cwd_flig:units = "unitless" ; - fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; - double fates_fire_active_crown_fire ; - fates_fire_active_crown_fire:units = "0 or 1" ; - fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; - double fates_fire_cg_strikes ; - fates_fire_cg_strikes:units = "fraction (0-1)" ; - fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; - double fates_fire_drying_ratio ; - fates_fire_drying_ratio:units = "NA" ; - fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; - double fates_fire_durat_slope ; - fates_fire_durat_slope:units = "NA" ; - fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; - double fates_fire_fdi_a ; - fates_fire_fdi_a:units = "NA" ; - fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; - double fates_fire_fdi_alpha ; - fates_fire_fdi_alpha:units = "NA" ; - fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; - double fates_fire_fdi_b ; - fates_fire_fdi_b:units = "NA" ; - fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; - double fates_fire_fuel_energy ; - fates_fire_fuel_energy:units = "kJ/kg" ; - fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; - double fates_fire_max_durat ; - fates_fire_max_durat:units = "minutes" ; - fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; - double fates_fire_miner_damp ; - fates_fire_miner_damp:units = "NA" ; - fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; - double fates_fire_miner_total ; - fates_fire_miner_total:units = "fraction" ; - fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; - double fates_fire_nignitions ; - fates_fire_nignitions:units = "ignitions per year per km2" ; - fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; - 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_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)" ; - double fates_hydr_kmax_rsurf2 ; - fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; - fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; - double fates_hydr_psi0 ; - fates_hydr_psi0:units = "MPa" ; - fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; - double fates_hydr_psicap ; - fates_hydr_psicap:units = "MPa" ; - fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; - double fates_init_litter ; - fates_init_litter:units = "NA" ; - fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; - double fates_logging_coll_under_frac ; - fates_logging_coll_under_frac:units = "fraction" ; - fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; - 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_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." ; - double fates_logging_dbhmin ; - fates_logging_dbhmin:units = "cm" ; - fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; - double fates_logging_direct_frac ; - fates_logging_direct_frac:units = "fraction" ; - fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; - double fates_logging_event_code ; - fates_logging_event_code:units = "unitless" ; - fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; - double fates_logging_export_frac ; - fates_logging_export_frac:units = "fraction" ; - fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; - double fates_logging_mechanical_frac ; - fates_logging_mechanical_frac:units = "fraction" ; - fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; - double fates_mort_disturb_frac ; - fates_mort_disturb_frac:units = "fraction" ; - fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; - double fates_mort_understorey_death ; - fates_mort_understorey_death:units = "fraction" ; - fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; - double fates_patch_fusion_tol ; - fates_patch_fusion_tol:units = "unitless" ; - fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; - double fates_phen_a ; - fates_phen_a:units = "none" ; - fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_b ; - fates_phen_b:units = "none" ; - fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_c ; - fates_phen_c:units = "none" ; - fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_chiltemp ; - fates_phen_chiltemp:units = "degrees C" ; - fates_phen_chiltemp:long_name = "chilling day counting threshold" ; - double fates_phen_coldtemp ; - fates_phen_coldtemp:units = "degrees C" ; - fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; - double fates_phen_doff_time ; - fates_phen_doff_time:units = "days" ; - fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; - double fates_phen_drought_threshold ; - fates_phen_drought_threshold:units = "m3/m3" ; - fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; - double fates_phen_mindayson ; - fates_phen_mindayson:units = "days" ; - fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; - double fates_phen_ncolddayslim ; - fates_phen_ncolddayslim:units = "days" ; - fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; - double fates_q10_froz ; - fates_q10_froz:units = "unitless" ; - fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; - double fates_q10_mr ; - fates_q10_mr:units = "unitless" ; - fates_q10_mr:long_name = "Q10 for maintenance respiration" ; - double fates_soil_salinity ; - fates_soil_salinity:units = "ppt" ; - fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; + float fates_leaf_stomatal_slope_medlyn(fates_pft) ; + fates_leaf_stomatal_slope_medlyn:units = "KPa**0.5" ; + fates_leaf_stomatal_slope_medlyn:_FillValue = 1.e+30f ; + float fates_leaf_stomatal_intercept(fates_pft) ; + fates_leaf_stomatal_intercept:units = "umol H2O/m**2/s" ; + fates_leaf_stomatal_intercept:_FillValue = 1.e+30f ; + int stomatal_model ; + stomatal_model:units = " " ; // global attributes: - :history = "This parameter file is maintained in version control\n", + :history = "Tue Apr 28 18:40:36 2020: ncks -O -x -v fates_bbopt_c3,fates_bbopt_c4 fates_params_lqy.nc fates_params_lqy_new.nc\n", + "This parameter file is maintained in version control\n", "See https://github.com/NGEET/fates/blob/master/parameter_files/fates_params_default.cdl \n", "For changes, use git blame \n", "" ; + :NCO = "20200428" ; data: - fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; - - fates_history_coageclass_bin_edges = _ ; - - fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; - - fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, - 80, 90, 100 ; - - fates_pftname = - "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 " ; - - fates_prt_organ_name = - "leaf ", - "fine root ", - "sapwood ", - "storage ", - "reproduction ", - "structure " ; + fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; fates_alloc_storage_cushion = 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2 ; @@ -788,10 +763,24 @@ data: fates_allom_stmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + fates_base_mr_20 = 2.52e-06 ; + fates_branch_turnover = 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0 ; fates_c2b = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; + fates_canopy_closure_thresh = 0.8 ; + + fates_cohort_age_fusion_tol = 0.08 ; + + fates_cohort_size_fusion_tol = 0.08 ; + + fates_comp_excln = 3 ; + + fates_cwd_fcel = 0.76 ; + + fates_cwd_flig = 0.24 ; + fates_displar = 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67 ; @@ -817,18 +806,60 @@ data: fates_eca_vmax_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; + + fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; + + fates_fire_active_crown_fire = 0 ; + fates_fire_alpha_SH = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2 ; fates_fire_bark_scaler = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07 ; + fates_fire_cg_strikes = 0.2 ; + fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, 0.95, 0.95, 1, 1, 1 ; 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_fire_drying_ratio = 66000 ; + + fates_fire_durat_slope = -11.06 ; + + fates_fire_fdi_a = 17.62 ; + + fates_fire_fdi_alpha = 0.00037 ; + + fates_fire_fdi_b = 243.12 ; + + fates_fire_fuel_energy = 18000 ; + + fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; + + fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; + + fates_fire_max_durat = 240 ; + + fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; + + fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; + + fates_fire_miner_damp = 0.41739 ; + + fates_fire_miner_total = 0.055 ; + + fates_fire_nignitions = 15 ; + + fates_fire_part_dens = 513 ; + 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, @@ -840,6 +871,15 @@ data: fates_grperc = 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; + fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; + + fates_history_coageclass_bin_edges = 0, 5 ; + + fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; + + fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, + 80, 90, 100 ; + fates_hydr_avuln_gs = 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5 ; @@ -867,6 +907,10 @@ data: -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999 ; + fates_hydr_kmax_rsurf1 = 20 ; + + fates_hydr_kmax_rsurf2 = 0.0001 ; + fates_hydr_p50_gs = -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5 ; @@ -900,13 +944,15 @@ data: -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2 ; + fates_hydr_psi0 = 0 ; + + fates_hydr_psicap = -0.6 ; + fates_hydr_resid_node = - 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, - 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, - 0.325, 0.325, - 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, 0.325, - 0.325, 0.325, - 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15 ; + 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; fates_hydr_rfrac_stem = 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625 ; @@ -922,7 +968,9 @@ data: 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75 ; - fates_leaf_BB_slope = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + fates_init_litter = 0.05 ; + + fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; fates_leaf_c3psn = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ; @@ -984,14 +1032,34 @@ data: fates_lf_flig = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ; + fates_logging_coll_under_frac = 0.55983 ; + + fates_logging_collateral_frac = 0.05 ; + + fates_logging_dbhmax_infra = 35 ; + + fates_logging_dbhmin = 50 ; + + fates_logging_direct_frac = 0.15 ; + + fates_logging_event_code = -30 ; + + fates_logging_export_frac = 0.8 ; + + fates_logging_mechanical_frac = 0.05 ; + fates_maintresp_reduction_curvature = 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ; fates_maintresp_reduction_intercept = 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1 ; + fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; + fates_mort_bmort = 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014 ; + fates_mort_disturb_frac = 1 ; + fates_mort_freezetol = 2.5, -55, -80, -30, 2.5, -30, -60, -10, -80, -80, -20, 2.5 ; @@ -1017,14 +1085,50 @@ data: fates_mort_scalar_hydrfailure = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6 ; + fates_mort_understorey_death = 0.55983 ; + fates_nfix1 = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_nfix2 = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_patch_fusion_tol = 0.05 ; + + fates_pftname = + "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 " ; + + fates_phen_a = -68 ; + + fates_phen_b = 638 ; + + fates_phen_c = -0.01 ; + + fates_phen_chiltemp = 5 ; + fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_phen_coldtemp = 7.5 ; + + fates_phen_doff_time = 100 ; + + fates_phen_drought_threshold = 0.15 ; + fates_phen_evergreen = 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 ; + fates_phen_mindayson = 90 ; + + fates_phen_ncolddayslim = 5 ; + fates_phen_season_decid = 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 ; fates_phen_stem_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; @@ -1080,6 +1184,14 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_prt_organ_name = + "leaf ", + "fine root ", + "sapwood ", + "storage ", + "reproduction ", + "structure " ; + fates_prt_phos_stoich_p1 = 0.0033, 0.0029, 0.004, 0.0033, 0.004, 0.004, 0.0033, 0.004, 0.004, 0.004, 0.004, 0.004, @@ -1101,6 +1213,10 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_q10_froz = 1.5 ; + + fates_q10_mr = 1.5 ; + fates_recruit_hgt_min = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 0.75, 0.75, 0.75, 0.125, 0.125, 0.125 ; @@ -1152,6 +1268,8 @@ data: fates_smpso = -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000 ; + fates_soil_salinity = 0.4 ; + fates_taulnir = 0.25, 0.1, 0.1, 0.25, 0.25, 0.25, 0.1, 0.25, 0.25, 0.34, 0.34, 0.34 ; @@ -1204,123 +1322,11 @@ data: fates_z0mr = 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055 ; - fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; + fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, + 4.7, 2.2, 5.3, 1.6 ; - fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; - - fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; - - fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; - - fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; - - fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + fates_leaf_stomatal_intercept = 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1000, 1000, 1000 ; - fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; - - fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; - - fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; - - fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; - - fates_base_mr_20 = 2.52e-06 ; - - fates_bbopt_c3 = 10000 ; - - fates_bbopt_c4 = 40000 ; - - fates_canopy_closure_thresh = 0.8 ; - - fates_cohort_age_fusion_tol = _ ; - - fates_cohort_size_fusion_tol = 0.08 ; - - fates_comp_excln = 3 ; - - fates_cwd_fcel = 0.76 ; - - fates_cwd_flig = 0.24 ; - - fates_fire_active_crown_fire = 0 ; - - fates_fire_cg_strikes = 0.2 ; - - fates_fire_drying_ratio = 66000 ; - - fates_fire_durat_slope = -11.06 ; - - fates_fire_fdi_a = 17.62 ; - - fates_fire_fdi_alpha = 0.00037 ; - - fates_fire_fdi_b = 243.12 ; - - fates_fire_fuel_energy = 18000 ; - - fates_fire_max_durat = 240 ; - - fates_fire_miner_damp = 0.41739 ; - - fates_fire_miner_total = 0.055 ; - - fates_fire_nignitions = 15 ; - - fates_fire_part_dens = 513 ; - - fates_hydr_kmax_rsurf1 = 20 ; - - fates_hydr_kmax_rsurf2 = 0.0001 ; - - fates_hydr_psi0 = 0 ; - - fates_hydr_psicap = -0.6 ; - - fates_init_litter = 0.05 ; - - fates_logging_coll_under_frac = 0.55983 ; - - fates_logging_collateral_frac = 0.05 ; - - fates_logging_dbhmax_infra = 35 ; - - fates_logging_dbhmin = 50 ; - - fates_logging_direct_frac = 0.15 ; - - fates_logging_event_code = -30 ; - - fates_logging_export_frac = 0.8 ; - - fates_logging_mechanical_frac = 0.05 ; - - fates_mort_disturb_frac = 1 ; - - fates_mort_understorey_death = 0.55983 ; - - fates_patch_fusion_tol = 0.05 ; - - fates_phen_a = -68 ; - - fates_phen_b = 638 ; - - fates_phen_c = -0.01 ; - - fates_phen_chiltemp = 5 ; - - fates_phen_coldtemp = 7.5 ; - - fates_phen_doff_time = 100 ; - - fates_phen_drought_threshold = 0.15 ; - - fates_phen_mindayson = 90 ; - - fates_phen_ncolddayslim = 5 ; - - fates_q10_froz = 1.5 ; - - fates_q10_mr = 1.5 ; - - fates_soil_salinity = 0.4 ; + stomatal_model = 2 ; } From 9ce3bc50ada958bda4b15b040b383c42c209feca Mon Sep 17 00:00:00 2001 From: Li Date: Mon, 11 May 2020 12:05:47 -0400 Subject: [PATCH 18/46] Update parameter file --- parameter_files/fates_params_default.cdl | 734 ++++++++++++----------- 1 file changed, 369 insertions(+), 365 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index cf374a7a01..0ed4c0125f 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,36 +1,21 @@ -netcdf fates_params_default { +netcdf fates_params_default0510new { dimensions: fates_NCWD = 4 ; + fates_pft = 12 ; + fates_litterclass = 6 ; fates_history_age_bins = 7 ; + fates_history_coage_bins = 2 ; fates_history_height_bins = 6 ; fates_history_size_bins = 13 ; - fates_history_coage_bins = 2 ; fates_hydr_organs = 4 ; fates_leafage_class = 1 ; - fates_litterclass = 6 ; - fates_pft = 12 ; - fates_prt_organs = 6 ; fates_string_length = 60 ; + fates_prt_organs = 6 ; fates_variants = 2 ; variables: - double fates_history_ageclass_bin_edges(fates_history_age_bins) ; - fates_history_ageclass_bin_edges:units = "yr" ; - fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; - double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; - fates_history_coageclass_bin_edges:units = "years" ; - fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; - double fates_history_height_bin_edges(fates_history_height_bins) ; - fates_history_height_bin_edges:units = "m" ; - fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; - double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; - fates_history_sizeclass_bin_edges:units = "cm" ; - fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; - char fates_pftname(fates_pft, fates_string_length) ; - fates_pftname:units = "unitless - string" ; - fates_pftname:long_name = "Description of plant type" ; - char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; - fates_prt_organ_name:units = "unitless - string" ; - fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; + double fates_CWD_frac(fates_NCWD) ; + fates_CWD_frac:units = "fraction" ; + fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; double fates_alloc_storage_cushion(fates_pft) ; fates_alloc_storage_cushion:units = "fraction" ; fates_alloc_storage_cushion:long_name = "maximum size of storage C pool, relative to maximum size of leaf C pool" ; @@ -97,7 +82,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: O\'Brien 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" ; @@ -122,12 +107,33 @@ variables: fates_allom_stmode:units = "index" ; fates_allom_stmode:long_name = "storage allometry function index." ; fates_allom_stmode:possible_values = "1: target storage proportional to trimmed maximum leaf biomass." ; + double fates_base_mr_20 ; + fates_base_mr_20:units = "gC/gN/s" ; + fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; double fates_branch_turnover(fates_pft) ; fates_branch_turnover:units = "yr" ; fates_branch_turnover:long_name = "turnover time of branches" ; double fates_c2b(fates_pft) ; fates_c2b:units = "ratio" ; fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ; + double fates_canopy_closure_thresh ; + fates_canopy_closure_thresh:units = "unitless" ; + fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; + double fates_cohort_age_fusion_tol ; + fates_cohort_age_fusion_tol:units = "unitless" ; + fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts." ; + double fates_cohort_size_fusion_tol ; + fates_cohort_size_fusion_tol:units = "unitless" ; + fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + double fates_comp_excln ; + fates_comp_excln:units = "none" ; + fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; + double fates_cwd_fcel ; + fates_cwd_fcel:units = "unitless" ; + fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; + double fates_cwd_flig ; + fates_cwd_flig:units = "unitless" ; + fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; double fates_displar(fates_pft) ; fates_displar:units = "unitless" ; fates_displar:long_name = "Ratio of displacement height to canopy top height" ; @@ -164,18 +170,81 @@ variables: double fates_eca_vmax_ptase(fates_pft) ; fates_eca_vmax_ptase:units = "gP/m2/s" ; fates_eca_vmax_ptase:long_name = "maximum production rate for biochemical P (per m2) (ECA)" ; + double fates_fire_FBD(fates_litterclass) ; + fates_fire_FBD:units = "NA" ; + fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; + double fates_fire_SAV(fates_litterclass) ; + fates_fire_SAV:units = "NA" ; + fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; + double fates_fire_active_crown_fire ; + fates_fire_active_crown_fire:units = "0 or 1" ; + fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; double fates_fire_alpha_SH(fates_pft) ; fates_fire_alpha_SH:units = "NA" ; fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; double fates_fire_bark_scaler(fates_pft) ; fates_fire_bark_scaler:units = "fraction" ; fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; + double fates_fire_cg_strikes ; + fates_fire_cg_strikes:units = "fraction (0-1)" ; + fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; double fates_fire_crown_depth_frac(fates_pft) ; fates_fire_crown_depth_frac:units = "fraction" ; fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; 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_fire_drying_ratio ; + fates_fire_drying_ratio:units = "NA" ; + fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; + double fates_fire_durat_slope ; + fates_fire_durat_slope:units = "NA" ; + fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; + double fates_fire_fdi_a ; + fates_fire_fdi_a:units = "NA" ; + fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; + double fates_fire_fdi_alpha ; + fates_fire_fdi_alpha:units = "NA" ; + fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; + double fates_fire_fdi_b ; + fates_fire_fdi_b:units = "NA" ; + fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; + double fates_fire_fuel_energy ; + fates_fire_fuel_energy:units = "kJ/kg" ; + fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; + double fates_fire_low_moisture_Coeff(fates_litterclass) ; + fates_fire_low_moisture_Coeff:units = "NA" ; + fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_low_moisture_Slope(fates_litterclass) ; + fates_fire_low_moisture_Slope:units = "NA" ; + fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_max_durat ; + fates_fire_max_durat:units = "minutes" ; + fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; + double fates_fire_mid_moisture(fates_litterclass) ; + fates_fire_mid_moisture:units = "NA" ; + fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; + double fates_fire_mid_moisture_Coeff(fates_litterclass) ; + fates_fire_mid_moisture_Coeff:units = "NA" ; + fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_mid_moisture_Slope(fates_litterclass) ; + fates_fire_mid_moisture_Slope:units = "NA" ; + fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_min_moisture(fates_litterclass) ; + fates_fire_min_moisture:units = "NA" ; + fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; + double fates_fire_miner_damp ; + fates_fire_miner_damp:units = "NA" ; + fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; + double fates_fire_miner_total ; + fates_fire_miner_total:units = "fraction" ; + fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; + double fates_fire_nignitions ; + fates_fire_nignitions:units = "ignitions per year per km2" ; + fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; + 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_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -188,6 +257,18 @@ variables: double fates_grperc(fates_pft) ; fates_grperc:units = "unitless" ; fates_grperc:long_name = "Growth respiration factor" ; + double fates_history_ageclass_bin_edges(fates_history_age_bins) ; + fates_history_ageclass_bin_edges:units = "yr" ; + fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; + double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; + fates_history_coageclass_bin_edges:units = "years" ; + fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; + double fates_history_height_bin_edges(fates_history_height_bins) ; + fates_history_height_bin_edges:units = "m" ; + fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; + double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; + fates_history_sizeclass_bin_edges:units = "cm" ; + fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; double fates_hydr_avuln_gs(fates_pft) ; fates_hydr_avuln_gs:units = "unitless" ; fates_hydr_avuln_gs:long_name = "shape parameter for stomatal control of water vapor exiting leaf" ; @@ -203,6 +284,12 @@ variables: double fates_hydr_kmax_node(fates_hydr_organs, fates_pft) ; fates_hydr_kmax_node:units = "kg/MPa/m/s" ; fates_hydr_kmax_node:long_name = "maximum xylem conductivity per unit conducting xylem area" ; + 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)" ; + double fates_hydr_kmax_rsurf2 ; + fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; + fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; double fates_hydr_p50_gs(fates_pft) ; fates_hydr_p50_gs:units = "MPa" ; fates_hydr_p50_gs:long_name = "water potential at 50% loss of stomatal conductance" ; @@ -218,6 +305,12 @@ variables: double fates_hydr_pitlp_node(fates_hydr_organs, fates_pft) ; fates_hydr_pitlp_node:units = "MPa" ; fates_hydr_pitlp_node:long_name = "turgor loss point" ; + double fates_hydr_psi0 ; + fates_hydr_psi0:units = "MPa" ; + fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; + double fates_hydr_psicap ; + fates_hydr_psicap:units = "MPa" ; + fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; double fates_hydr_resid_node(fates_hydr_organs, fates_pft) ; fates_hydr_resid_node:units = "cm3/cm3" ; fates_hydr_resid_node:long_name = "residual water conent" ; @@ -233,9 +326,9 @@ variables: double fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; fates_hydr_thetas_node:units = "cm3/cm3" ; fates_hydr_thetas_node:long_name = "saturated water content" ; - double fates_leaf_BB_slope(fates_pft) ; - fates_leaf_BB_slope:units = "unitless" ; - fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; + double fates_init_litter ; + fates_init_litter:units = "NA" ; + fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; double fates_leaf_c3psn(fates_pft) ; fates_leaf_c3psn:units = "flag" ; fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; @@ -263,6 +356,15 @@ variables: double fates_leaf_slatop(fates_pft) ; fates_leaf_slatop:units = "m^2/gC" ; fates_leaf_slatop:long_name = "Specific Leaf Area (SLA) at top of canopy, projected area basis" ; + float fates_leaf_stomatal_intercept(fates_pft) ; + fates_leaf_stomatal_intercept:units = "umol H2O/m**2/s" ; + fates_leaf_stomatal_intercept:_FillValue = 1.e+30f ; + double fates_leaf_stomatal_slope_ballberry(fates_pft) ; + fates_leaf_stomatal_slope_ballberry:units = "unitless" ; + fates_leaf_stomatal_slope_ballberry:long_name = "stomatal slope parameter, as per Ball-Berry" ; + float fates_leaf_stomatal_slope_medlyn(fates_pft) ; + fates_leaf_stomatal_slope_medlyn:units = "KPa**0.5" ; + fates_leaf_stomatal_slope_medlyn:_FillValue = 1.e+30f ; double fates_leaf_stor_priority(fates_pft) ; fates_leaf_stor_priority:units = "unitless" ; fates_leaf_stor_priority:long_name = "factor governing priority of replacing storage with NPP" ; @@ -299,15 +401,45 @@ variables: double fates_lf_flig(fates_pft) ; fates_lf_flig:units = "fraction" ; fates_lf_flig:long_name = "Leaf litter lignin fraction" ; + double fates_logging_coll_under_frac ; + fates_logging_coll_under_frac:units = "fraction" ; + fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; + 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_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." ; + double fates_logging_dbhmin ; + fates_logging_dbhmin:units = "cm" ; + fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; + double fates_logging_direct_frac ; + fates_logging_direct_frac:units = "fraction" ; + fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; + double fates_logging_event_code ; + fates_logging_event_code:units = "unitless" ; + fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; + double fates_logging_export_frac ; + fates_logging_export_frac:units = "fraction" ; + fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; + double fates_logging_mechanical_frac ; + fates_logging_mechanical_frac:units = "fraction" ; + fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; double fates_maintresp_reduction_curvature(fates_pft) ; fates_maintresp_reduction_curvature:units = "unitless (0-1)" ; fates_maintresp_reduction_curvature:long_name = "curvature of MR reduction as f(carbon storage), 1=linear, 0=very curved" ; double fates_maintresp_reduction_intercept(fates_pft) ; fates_maintresp_reduction_intercept:units = "unitless (0-1)" ; fates_maintresp_reduction_intercept:long_name = "intercept of MR reduction as f(carbon storage), 0=no throttling, 1=max throttling" ; + double fates_max_decomp(fates_litterclass) ; + fates_max_decomp:units = "yr-1" ; + fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; double fates_mort_bmort(fates_pft) ; fates_mort_bmort:units = "1/yr" ; fates_mort_bmort:long_name = "background mortality rate" ; + double fates_mort_disturb_frac ; + fates_mort_disturb_frac:units = "fraction" ; + fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; double fates_mort_freezetol(fates_pft) ; fates_mort_freezetol:units = "NA" ; fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; @@ -328,7 +460,7 @@ variables: fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change. Sensible range is around 0.03-0.06. Larger values givesteeper mortality curves." ; double fates_mort_r_size_senescence(fates_pft) ; fates_mort_r_size_senescence:units = "mortality rate dbh^-1" ; - fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change. Sensible range is around 0.03-0.06. Larger values give steeper mortality curves." ; + fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change. Sensible range is around 0.03-0.06. Larger values give steeper mortality curves." ; double fates_mort_scalar_coldstress(fates_pft) ; fates_mort_scalar_coldstress:units = "1/yr" ; fates_mort_scalar_coldstress:long_name = "maximum mortality rate from cold stress" ; @@ -338,18 +470,54 @@ variables: double fates_mort_scalar_hydrfailure(fates_pft) ; fates_mort_scalar_hydrfailure:units = "1/yr" ; fates_mort_scalar_hydrfailure:long_name = "maximum mortality rate from hydraulic failure" ; + double fates_mort_understorey_death ; + fates_mort_understorey_death:units = "fraction" ; + fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; double fates_nfix1(fates_pft) ; fates_nfix1:units = "NA" ; fates_nfix1:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; double fates_nfix2(fates_pft) ; fates_nfix2:units = "NA" ; fates_nfix2:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; + double fates_patch_fusion_tol ; + fates_patch_fusion_tol:units = "unitless" ; + fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; + char fates_pftname(fates_pft, fates_string_length) ; + fates_pftname:units = "unitless - string" ; + fates_pftname:long_name = "Description of plant type" ; + double fates_phen_a ; + fates_phen_a:units = "none" ; + fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_b ; + fates_phen_b:units = "none" ; + fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_c ; + fates_phen_c:units = "none" ; + fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_chiltemp ; + fates_phen_chiltemp:units = "degrees C" ; + fates_phen_chiltemp:long_name = "chilling day counting threshold" ; double fates_phen_cold_size_threshold(fates_pft) ; fates_phen_cold_size_threshold:units = "cm" ; fates_phen_cold_size_threshold:long_name = "the dbh size above which will lead to phenology-related stem and leaf drop" ; + double fates_phen_coldtemp ; + fates_phen_coldtemp:units = "degrees C" ; + fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; + double fates_phen_doff_time ; + fates_phen_doff_time:units = "days" ; + fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; + double fates_phen_drought_threshold ; + fates_phen_drought_threshold:units = "m3/m3" ; + fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; double fates_phen_evergreen(fates_pft) ; fates_phen_evergreen:units = "logical flag" ; fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; + double fates_phen_mindayson ; + fates_phen_mindayson:units = "days" ; + fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; + double fates_phen_ncolddayslim ; + fates_phen_ncolddayslim:units = "days" ; + fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; double fates_phen_season_decid(fates_pft) ; fates_phen_season_decid:units = "logical flag" ; fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; @@ -392,12 +560,21 @@ variables: double fates_prt_nitr_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_nitr_stoich_p2:units = "(gN/gC)" ; fates_prt_nitr_stoich_p2:long_name = "nitrogen stoichiometry, parameter 2" ; + char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; + fates_prt_organ_name:units = "unitless - string" ; + fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; double fates_prt_phos_stoich_p1(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p1:units = "(gP/gC)" ; fates_prt_phos_stoich_p1:long_name = "phosphorous stoichiometry, parameter 1" ; double fates_prt_phos_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p2:units = "(gP/gC)" ; fates_prt_phos_stoich_p2:long_name = "phosphorous stoichiometry, parameter 2" ; + double fates_q10_froz ; + fates_q10_froz:units = "unitless" ; + fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; + double fates_q10_mr ; + fates_q10_mr:units = "unitless" ; + fates_q10_mr:long_name = "Q10 for maintenance respiration" ; double fates_recruit_hgt_min(fates_pft) ; fates_recruit_hgt_min:units = "m" ; fates_recruit_hgt_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ; @@ -455,6 +632,9 @@ variables: double fates_smpso(fates_pft) ; fates_smpso:units = "mm" ; fates_smpso:long_name = "Soil water potential at full stomatal opening" ; + double fates_soil_salinity ; + fates_soil_salinity:units = "ppt" ; + fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; double fates_taulnir(fates_pft) ; fates_taulnir:units = "fraction" ; fates_taulnir:long_name = "Leaf transmittance: near-IR" ; @@ -495,225 +675,19 @@ variables: double fates_z0mr(fates_pft) ; fates_z0mr:units = "unitless" ; fates_z0mr:long_name = "Ratio of momentum roughness length to canopy top height" ; - double fates_fire_FBD(fates_litterclass) ; - fates_fire_FBD:units = "NA" ; - fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; - double fates_fire_low_moisture_Coeff(fates_litterclass) ; - fates_fire_low_moisture_Coeff:units = "NA" ; - fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_low_moisture_Slope(fates_litterclass) ; - fates_fire_low_moisture_Slope:units = "NA" ; - fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_mid_moisture(fates_litterclass) ; - fates_fire_mid_moisture:units = "NA" ; - fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; - double fates_fire_mid_moisture_Coeff(fates_litterclass) ; - fates_fire_mid_moisture_Coeff:units = "NA" ; - fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_mid_moisture_Slope(fates_litterclass) ; - fates_fire_mid_moisture_Slope:units = "NA" ; - fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_min_moisture(fates_litterclass) ; - fates_fire_min_moisture:units = "NA" ; - fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; - double fates_fire_SAV(fates_litterclass) ; - fates_fire_SAV:units = "NA" ; - fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; - double fates_max_decomp(fates_litterclass) ; - fates_max_decomp:units = "yr-1" ; - fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; - double fates_CWD_frac(fates_NCWD) ; - fates_CWD_frac:units = "fraction" ; - fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; - double fates_base_mr_20 ; - fates_base_mr_20:units = "gC/gN/s" ; - fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; - double fates_bbopt_c3 ; - fates_bbopt_c3:units = "umol H2O/m**2/s" ; - fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; - double fates_bbopt_c4 ; - fates_bbopt_c4:units = "umol H2O/m**2/s" ; - fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; - double fates_canopy_closure_thresh ; - fates_canopy_closure_thresh:units = "unitless" ; - fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; - double fates_cohort_age_fusion_tol ; - fates_cohort_age_fusion_tol:units = "unitless" ; - fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts." ; - double fates_cohort_size_fusion_tol ; - fates_cohort_size_fusion_tol:units = "unitless" ; - fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; - double fates_comp_excln ; - fates_comp_excln:units = "none" ; - fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; - double fates_cwd_fcel ; - fates_cwd_fcel:units = "unitless" ; - fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; - double fates_cwd_flig ; - fates_cwd_flig:units = "unitless" ; - fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; - double fates_fire_active_crown_fire ; - fates_fire_active_crown_fire:units = "0 or 1" ; - fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; - double fates_fire_cg_strikes ; - fates_fire_cg_strikes:units = "fraction (0-1)" ; - fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; - double fates_fire_drying_ratio ; - fates_fire_drying_ratio:units = "NA" ; - fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; - double fates_fire_durat_slope ; - fates_fire_durat_slope:units = "NA" ; - fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; - double fates_fire_fdi_a ; - fates_fire_fdi_a:units = "NA" ; - fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; - double fates_fire_fdi_alpha ; - fates_fire_fdi_alpha:units = "NA" ; - fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; - double fates_fire_fdi_b ; - fates_fire_fdi_b:units = "NA" ; - fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; - double fates_fire_fuel_energy ; - fates_fire_fuel_energy:units = "kJ/kg" ; - fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; - double fates_fire_max_durat ; - fates_fire_max_durat:units = "minutes" ; - fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; - double fates_fire_miner_damp ; - fates_fire_miner_damp:units = "NA" ; - fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; - double fates_fire_miner_total ; - fates_fire_miner_total:units = "fraction" ; - fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; - double fates_fire_nignitions ; - fates_fire_nignitions:units = "ignitions per year per km2" ; - fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; - 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_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)" ; - double fates_hydr_kmax_rsurf2 ; - fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; - fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; - double fates_hydr_psi0 ; - fates_hydr_psi0:units = "MPa" ; - fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; - double fates_hydr_psicap ; - fates_hydr_psicap:units = "MPa" ; - fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; - double fates_init_litter ; - fates_init_litter:units = "NA" ; - fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; - double fates_logging_coll_under_frac ; - fates_logging_coll_under_frac:units = "fraction" ; - fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; - 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_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." ; - double fates_logging_dbhmin ; - fates_logging_dbhmin:units = "cm" ; - fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; - double fates_logging_direct_frac ; - fates_logging_direct_frac:units = "fraction" ; - fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; - double fates_logging_event_code ; - fates_logging_event_code:units = "unitless" ; - fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; - double fates_logging_export_frac ; - fates_logging_export_frac:units = "fraction" ; - fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; - double fates_logging_mechanical_frac ; - fates_logging_mechanical_frac:units = "fraction" ; - fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; - double fates_mort_disturb_frac ; - fates_mort_disturb_frac:units = "fraction" ; - fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; - double fates_mort_understorey_death ; - fates_mort_understorey_death:units = "fraction" ; - fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; - double fates_patch_fusion_tol ; - fates_patch_fusion_tol:units = "unitless" ; - fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; - double fates_phen_a ; - fates_phen_a:units = "none" ; - fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_b ; - fates_phen_b:units = "none" ; - fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_c ; - fates_phen_c:units = "none" ; - fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_chiltemp ; - fates_phen_chiltemp:units = "degrees C" ; - fates_phen_chiltemp:long_name = "chilling day counting threshold" ; - double fates_phen_coldtemp ; - fates_phen_coldtemp:units = "degrees C" ; - fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; - double fates_phen_doff_time ; - fates_phen_doff_time:units = "days" ; - fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; - double fates_phen_drought_threshold ; - fates_phen_drought_threshold:units = "m3/m3" ; - fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; - double fates_phen_mindayson ; - fates_phen_mindayson:units = "days" ; - fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; - double fates_phen_ncolddayslim ; - fates_phen_ncolddayslim:units = "days" ; - fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; - double fates_q10_froz ; - fates_q10_froz:units = "unitless" ; - fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; - double fates_q10_mr ; - fates_q10_mr:units = "unitless" ; - fates_q10_mr:long_name = "Q10 for maintenance respiration" ; - double fates_soil_salinity ; - fates_soil_salinity:units = "ppt" ; - fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; + int stomatal_model ; + stomatal_model:units = " " ; // global attributes: - :history = "This parameter file is maintained in version control\n", + :history = "Sun May 10 15:37:34 2020: ncks -O -x -v fates_bbopt_c3,fates_bbopt_c4 fates_params_default0510.nc fates_params_default0510new.nc\n", + "This parameter file is maintained in version control\n", "See https://github.com/NGEET/fates/blob/master/parameter_files/fates_params_default.cdl \n", "For changes, use git blame \n", "" ; + :NCO = "20200510" ; data: - fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; - - fates_history_coageclass_bin_edges = 0, 5 ; - - fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; - - fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, - 80, 90, 100 ; - - - fates_pftname = - "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 " ; - - fates_prt_organ_name = - "leaf ", - "fine root ", - "sapwood ", - "storage ", - "reproduction ", - "structure " ; + fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; fates_alloc_storage_cushion = 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2 ; @@ -789,10 +763,24 @@ data: fates_allom_stmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + fates_base_mr_20 = 2.52e-06 ; + fates_branch_turnover = 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0 ; fates_c2b = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; + fates_canopy_closure_thresh = 0.8 ; + + fates_cohort_age_fusion_tol = 0.08 ; + + fates_cohort_size_fusion_tol = 0.08 ; + + fates_comp_excln = 3 ; + + fates_cwd_fcel = 0.76 ; + + fates_cwd_flig = 0.24 ; + fates_displar = 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67 ; @@ -818,18 +806,60 @@ data: fates_eca_vmax_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; + + fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; + + fates_fire_active_crown_fire = 0 ; + fates_fire_alpha_SH = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2 ; fates_fire_bark_scaler = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07 ; + fates_fire_cg_strikes = 0.2 ; + fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, 0.95, 0.95, 1, 1, 1 ; 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_fire_drying_ratio = 66000 ; + + fates_fire_durat_slope = -11.06 ; + + fates_fire_fdi_a = 17.62 ; + + fates_fire_fdi_alpha = 0.00037 ; + + fates_fire_fdi_b = 243.12 ; + + fates_fire_fuel_energy = 18000 ; + + fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; + + fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; + + fates_fire_max_durat = 240 ; + + fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; + + fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; + + fates_fire_miner_damp = 0.41739 ; + + fates_fire_miner_total = 0.055 ; + + fates_fire_nignitions = 15 ; + + fates_fire_part_dens = 513 ; + 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, @@ -841,6 +871,15 @@ data: fates_grperc = 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; + fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; + + fates_history_coageclass_bin_edges = 0, 5 ; + + fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; + + fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, + 80, 90, 100 ; + fates_hydr_avuln_gs = 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5 ; @@ -868,6 +907,10 @@ data: -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999 ; + fates_hydr_kmax_rsurf1 = 20 ; + + fates_hydr_kmax_rsurf2 = 0.0001 ; + fates_hydr_p50_gs = -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5 ; @@ -901,12 +944,14 @@ data: -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2 ; + fates_hydr_psi0 = 0 ; + + fates_hydr_psicap = -0.6 ; + fates_hydr_resid_node = 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, - 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, - 0.21, 0.21, - 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, - 0.21, 0.21, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; fates_hydr_rfrac_stem = 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, @@ -923,7 +968,7 @@ data: 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75 ; - fates_leaf_BB_slope = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + fates_init_litter = 0.05 ; fates_leaf_c3psn = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ; @@ -951,6 +996,14 @@ 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 = 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1000, 1000, 1000 ; + + fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + + fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, + 4.7, 2.2, 5.3, 1.6 ; + fates_leaf_stor_priority = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8 ; @@ -985,14 +1038,34 @@ data: fates_lf_flig = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ; + fates_logging_coll_under_frac = 0.55983 ; + + fates_logging_collateral_frac = 0.05 ; + + fates_logging_dbhmax_infra = 35 ; + + fates_logging_dbhmin = 50 ; + + fates_logging_direct_frac = 0.15 ; + + fates_logging_event_code = -30 ; + + fates_logging_export_frac = 0.8 ; + + fates_logging_mechanical_frac = 0.05 ; + fates_maintresp_reduction_curvature = 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ; fates_maintresp_reduction_intercept = 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1 ; + fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; + fates_mort_bmort = 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014 ; + fates_mort_disturb_frac = 1 ; + fates_mort_freezetol = 2.5, -55, -80, -30, 2.5, -30, -60, -10, -80, -80, -20, 2.5 ; @@ -1018,14 +1091,50 @@ data: fates_mort_scalar_hydrfailure = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6 ; + fates_mort_understorey_death = 0.55983 ; + fates_nfix1 = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_nfix2 = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_patch_fusion_tol = 0.05 ; + + fates_pftname = + "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 " ; + + fates_phen_a = -68 ; + + fates_phen_b = 638 ; + + fates_phen_c = -0.01 ; + + fates_phen_chiltemp = 5 ; + fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_phen_coldtemp = 7.5 ; + + fates_phen_doff_time = 100 ; + + fates_phen_drought_threshold = 0.15 ; + fates_phen_evergreen = 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 ; + fates_phen_mindayson = 90 ; + + fates_phen_ncolddayslim = 5 ; + fates_phen_season_decid = 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 ; fates_phen_stem_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; @@ -1081,6 +1190,14 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_prt_organ_name = + "leaf ", + "fine root ", + "sapwood ", + "storage ", + "reproduction ", + "structure " ; + fates_prt_phos_stoich_p1 = 0.0033, 0.0029, 0.004, 0.0033, 0.004, 0.004, 0.0033, 0.004, 0.004, 0.004, 0.004, 0.004, @@ -1102,6 +1219,10 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_q10_froz = 1.5 ; + + fates_q10_mr = 1.5 ; + fates_recruit_hgt_min = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 0.75, 0.75, 0.75, 0.125, 0.125, 0.125 ; @@ -1145,7 +1266,6 @@ data: fates_seed_suppl = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_senleaf_long_fdrought = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; fates_smpsc = -255000, -255000, -255000, -255000, -255000, -255000, -255000, @@ -1154,6 +1274,8 @@ data: fates_smpso = -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000 ; + fates_soil_salinity = 0.4 ; + fates_taulnir = 0.25, 0.1, 0.1, 0.25, 0.25, 0.25, 0.1, 0.25, 0.25, 0.34, 0.34, 0.34 ; @@ -1206,123 +1328,5 @@ data: fates_z0mr = 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055 ; - fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; - - fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; - - fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; - - fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; - - fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; - - fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; - - fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; - - fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; - - fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; - - fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; - - fates_base_mr_20 = 2.52e-06 ; - - fates_bbopt_c3 = 10000 ; - - fates_bbopt_c4 = 40000 ; - - fates_canopy_closure_thresh = 0.8 ; - - fates_cohort_age_fusion_tol = 0.08 ; - - fates_cohort_size_fusion_tol = 0.08 ; - - fates_comp_excln = 3 ; - - fates_cwd_fcel = 0.76 ; - - fates_cwd_flig = 0.24 ; - - fates_fire_active_crown_fire = 0 ; - - fates_fire_cg_strikes = 0.2 ; - - fates_fire_drying_ratio = 66000 ; - - fates_fire_durat_slope = -11.06 ; - - fates_fire_fdi_a = 17.62 ; - - fates_fire_fdi_alpha = 0.00037 ; - - fates_fire_fdi_b = 243.12 ; - - fates_fire_fuel_energy = 18000 ; - - fates_fire_max_durat = 240 ; - - fates_fire_miner_damp = 0.41739 ; - - fates_fire_miner_total = 0.055 ; - - fates_fire_nignitions = 15 ; - - fates_fire_part_dens = 513 ; - - fates_hydr_kmax_rsurf1 = 20 ; - - fates_hydr_kmax_rsurf2 = 0.0001 ; - - fates_hydr_psi0 = 0 ; - - fates_hydr_psicap = -0.6 ; - - fates_init_litter = 0.05 ; - - fates_logging_coll_under_frac = 0.55983 ; - - fates_logging_collateral_frac = 0.05 ; - - fates_logging_dbhmax_infra = 35 ; - - fates_logging_dbhmin = 50 ; - - fates_logging_direct_frac = 0.15 ; - - fates_logging_event_code = -30 ; - - fates_logging_export_frac = 0.8 ; - - fates_logging_mechanical_frac = 0.05 ; - - fates_mort_disturb_frac = 1 ; - - fates_mort_understorey_death = 0.55983 ; - - fates_patch_fusion_tol = 0.05 ; - - fates_phen_a = -68 ; - - fates_phen_b = 638 ; - - fates_phen_c = -0.01 ; - - fates_phen_chiltemp = 5 ; - - fates_phen_coldtemp = 7.5 ; - - fates_phen_doff_time = 100 ; - - fates_phen_drought_threshold = 0.15 ; - - fates_phen_mindayson = 90 ; - - fates_phen_ncolddayslim = 5 ; - - fates_q10_froz = 1.5 ; - - fates_q10_mr = 1.5 ; - - fates_soil_salinity = 0.4 ; + stomatal_model = 2 ; } From 2d57be32598a64c6ecf94bf9fffe9038ae74226a Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 13 May 2020 13:36:06 -0700 Subject: [PATCH 19/46] Updated python allometry FUTs to py3 --- biogeochem/FatesAllometryMod.F90 | 6 + .../allometry/AutoGenVarCon.py | 2 +- .../allometry/drive_allomtests.py | 108 ++++++++++-------- .../shared/py_src/PyF90Utils.py | 2 + 4 files changed, 72 insertions(+), 46 deletions(-) diff --git a/biogeochem/FatesAllometryMod.F90 b/biogeochem/FatesAllometryMod.F90 index d43b1e7769..982e6a5ecd 100644 --- a/biogeochem/FatesAllometryMod.F90 +++ b/biogeochem/FatesAllometryMod.F90 @@ -1349,6 +1349,9 @@ subroutine d2h_chave2014(d,p1,p2,p3,dbh_maxh,h,dhdd) ! Chave et al. Improved allometric models to estimate the abovegroud ! biomass of tropical trees. Global Change Biology. V20, p3177-3190. 2015. ! + ! p1 = 0.893 - E + ! p2 = 0.76 + ! p3 = -0.034 ! ========================================================================= real(r8),intent(in) :: d ! plant diameter [cm] @@ -1581,6 +1584,9 @@ subroutine dh2bagw_chave2014(d,h,dhdd,p1,p2,wood_density,c2b,bagw,dbagwdd) ! Output: ! bagw: Total above ground biomass [kgC] ! + ! Chave's Paper has p1 = 0.0673, p2 = 0.976 + ! + ! ========================================================================= diff --git a/functional_unit_testing/allometry/AutoGenVarCon.py b/functional_unit_testing/allometry/AutoGenVarCon.py index 8879b2b7da..7bf0f85a6b 100644 --- a/functional_unit_testing/allometry/AutoGenVarCon.py +++ b/functional_unit_testing/allometry/AutoGenVarCon.py @@ -18,7 +18,7 @@ def __init__(self,var_sym,n_dims): def CheckFile(filename,check_str): - file_ptr = file(filename) + file_ptr = open(filename,'r') var_list = [] found = False for line in file_ptr: diff --git a/functional_unit_testing/allometry/drive_allomtests.py b/functional_unit_testing/allometry/drive_allomtests.py index 19c6971603..ff3dab19ac 100644 --- a/functional_unit_testing/allometry/drive_allomtests.py +++ b/functional_unit_testing/allometry/drive_allomtests.py @@ -3,12 +3,15 @@ import matplotlib.pyplot as plt import matplotlib as mp import ctypes +import importlib from ctypes import * #byref, cdll, c_int, c_double, c_char_p, c_long import xml.etree.ElementTree as ET import argparse import re # This is a heftier string parser import code # For development: code.interact(local=dict(globals(), **locals())) - +import sys +sys.path.append('../shared/py_src') +from PyF90Utils import c8, ci, cchar, c8_arr, ci_arr # ======================================================================================= # Set some constants. If they are used as constant arguments to the F90 routines, @@ -81,7 +84,7 @@ def setval(self,val,ipft): def DiscreteCubeHelix(N): base = plt.cm.get_cmap('cubehelix') - np.random.seed(1) + np.random.seed(2) color_list = base(np.random.randint(0,high=255,size=N)) cmap_name = base.name + str(N) return base.from_list(cmap_name, color_list, N) @@ -228,25 +231,21 @@ def CDLParse(file_name,parm): # Allocate fortran PFT arrays # ============================================================================== -iret=f90_pftalloc(byref(c_int(numpft))) +iret=f90_pftalloc(ci(numpft)) # ============================================================================== # Populate the Fortran PFT structure # ============================================================================== -# First set the arg types -f90_pftset.argtypes = \ - [POINTER(c_int),POINTER(c_double),POINTER(c_int),c_char_p,c_long] - for ipft in range(numpft): for key, parm in parms.items(): - #print 'py: sending to F90: {0} = {1}'.format(parm.symbol,parm.vals[ipft]) + print('{} {} '.format(parm.symbol,parm.vals[ipft])) iret=f90_pftset(c_int(ipft+1), \ - c_double(parm.vals[ipft]), \ - c_int(0), \ - c_char_p(parm.symbol), \ - c_long(len(parm.symbol))) - + c_double(parm.vals[ipft]), \ + c_int(0), \ + c_char_p(parm.symbol.encode('utf-8')), \ + c_long(len(parm.symbol))) + # ========================================================================= # Initialize Output Arrays @@ -259,6 +258,9 @@ def CDLParse(file_name,parm): hd = np.zeros((numpft,ndbh)) bagwi = np.zeros((numpft,ndbh)) bagwd = np.zeros((numpft,ndbh)) + +bagwr = np.zeros((numpft,ndbh)) + dbh = np.zeros((numpft,ndbh)) bbgw = np.zeros((numpft,ndbh)) bsapi = np.zeros((numpft,ndbh)) @@ -276,7 +278,7 @@ def CDLParse(file_name,parm): for ipft in range(numpft): - print 'py: Solving for pft: {}'.format(ipft+1) + print('py: Solving for pft: {}'.format(ipft+1)) # Initialize Height #(d,ipft,h,dhdd) ch_min = c_double(eparms['recruit_hgt_min'].vals[ipft]) @@ -316,18 +318,18 @@ def CDLParse(file_name,parm): iret=f90_h(byref(cd),byref(cipft),byref(ch),byref(cdhdd)) hi[ipft,0] = ch.value hd[ipft,0] = ch.value - print 'py: initialize h[{},0]={}'.format(ipft+1,ch.value) + print('py: initialize h[{},0]={}'.format(ipft+1,ch.value)) # Initialize AGB #(d,ipft,bagw,dbagwdd) iret=f90_bagw(byref(cd),byref(cipft),byref(cbagw),byref(cdbagwdd)) bagwi[ipft,0] = cbagw.value - print 'py: initialize bagwi[{},0]={}'.format(ipft+1,cbagw.value) + print('py: initialize bagwi[{},0]={}'.format(ipft+1,cbagw.value)) # Initialize bleaf #(d,ipft,canopy_trim,bl,dbldd) iret=f90_bleaf(byref(cd),byref(cipft),byref(ccanopy_trim),byref(cblmax),byref(cdblmaxdd)) blmaxi[ipft,0] = cblmax.value blmaxd[ipft,0] = cblmax.value - print 'py: initialize blmaxi[{},0]={}'.format(ipft+1,cblmax.value) + print('py: initialize blmaxi[{},0]={}'.format(ipft+1,cblmax.value)) # Initialize bstore #(d,ipft,canopy_trim,bstore,dbstoredd) iret=f90_bstore(byref(cd),byref(cipft),byref(ccanopy_trim),byref(cbstore),byref(cdbstoredd)) @@ -338,8 +340,10 @@ def CDLParse(file_name,parm): # (dbh, nplant, site_spread, ipft, c_area,inverse) iret= f90_carea(byref(cd),byref(cnplant),byref(csite_spread),byref(cipft),byref(ccamin),byref(cdo_reverse)) camin[ipft,0] = ccamin.value + + ldense[ipft,0] = blmaxi[ipft,0]/camin[ipft,0] - print 'py: initialize careai[{},0]={}'.format(ipft+1,ccamin.value) + print('py: initialize careai[{},0]={}'.format(ipft+1,ccamin.value)) #f90_treelai(leaf_c, pft, c_area, nplant, cl, canopy_lai, vcmax25top) cvcmax=c_double(eparms['vcmax25top'].vals[ipft]) @@ -350,13 +354,13 @@ def CDLParse(file_name,parm): iret=f90_bfineroot(byref(cd),byref(cipft),byref(ccanopy_trim), \ byref(cbfrmax),byref(cdbfrmaxdd)) bfrmax[ipft,0] = cbfrmax.value - print 'py: initialize bfrmax[{},0]={}'.format(ipft+1,cbfrmax.value) + print('py: initialize bfrmax[{},0]={}'.format(ipft+1,cbfrmax.value)) # Initialize coarse roots #(d,ipft,bbgw,dbbgwdd) iret=f90_bbgw(byref(cd),byref(cipft),byref(c_double(1.0)), \ byref(cbbgw),byref(cdbbgwdd)) bbgw[ipft,0] = cbbgw.value - print 'py: initialize bbgw[{},0]={}'.format(ipft+1,cbbgw.value) + print('py: initialize bbgw[{},0]={}'.format(ipft+1,cbbgw.value)) # Initialize bsap (d,ipft,canopy_trim,asapw,bsap,dbsapdd) @@ -364,7 +368,7 @@ def CDLParse(file_name,parm): bsapi[ipft,0] = cbsap.value bsapd[ipft,0] = cbsap.value asapd[ipft,0] = casapw.value - print 'py: initialize bsapi[{},0]={}'.format(ipft+1,cbsap.value) + print('py: initialize bsapi[{},0]={}'.format(ipft+1,cbsap.value)) # bdead #(bagw,bbgw,bsap,ipft,bdead,dbagwdd,dbbgwdd,dbsapdd,dbdeaddd) iret=f90_bdead(byref(cbagw),byref(cbbgw),byref(cbsap),byref(cipft), \ @@ -372,8 +376,10 @@ def CDLParse(file_name,parm): byref(cdbsapdd),byref(cdbdeaddd)) bdead[ipft,0] = cbdead.value - print 'py: initialize bdead[{},0]={}'.format(ipft+1,cbdead.value) + print('py: initialize bdead[{},0]={}'.format(ipft+1,cbdead.value)) + bagwr[ipft,0] = (bdead[ipft,0]) * 0.6 + # the metric that shan't be spoken blmax_o_dbagwdh[ipft,0] = blmaxi[ipft,0]/(cdbagwdd.value/cdhdd.value) @@ -410,7 +416,7 @@ def CDLParse(file_name,parm): bagwi[ipft,idi] = bagwi[ipft,idi-1] + cdbagwdd.value*dd # diagnose bleaf #(d,ipft,blmax,dblmaxdd) - iret=f90_bleaf(byref(cdc),byref(cipft),byref(c_double(1.0)),byref(cblmax),byref(cdblmaxdd)) + iret=f90_bleaf(byref(cdc),byref(cipft),byref(ccanopy_trim),byref(cblmax),byref(cdblmaxdd)) blmaxd[ipft,idi] = cblmax.value # bstore #(d,ipft,canopy_trim,bstore,dbstoredd) @@ -426,6 +432,9 @@ def CDLParse(file_name,parm): treelai[ipft,idi]=f90_treelai(byref(cblmax),byref(cipft),byref(ccamin), \ byref(cnplant),byref(cilayer),byref(ccanopy_lai),byref(cvcmax)) + + + # integrate bleaf #(d,ipft,blmax,dblmaxdd) iret=f90_bleaf(byref(cdp),byref(cipft),byref(c_double(1.0)),byref(cblmax),byref(cdblmaxdd)) blmaxi[ipft,idi] = blmaxi[ipft,idi-1] + cdblmaxdd.value*dd @@ -450,6 +459,9 @@ def CDLParse(file_name,parm): iret=f90_bsap(byref(cdp),byref(cipft),byref(ccanopy_trim),byref(casapw),byref(cbsap),byref(cdbsapdd)) bsapi[ipft,idi] = bsapi[ipft,idi-1] + cdbsapdd.value*dd + + + # the metric that shan't be spoken # previous t-step derivatives are used for simplicity if cdhdd.value<0.000001: @@ -463,15 +475,17 @@ def CDLParse(file_name,parm): # Diagnose bdead (bagw,bbgw,bsap,ipft,bdead,dbagwdd,dbbgwdd,dbsapdd,dbdeaddd) - iret=f90_bdead(byref(c_double(bagwi[ipft,idi])), \ + iret=f90_bdead(byref(c_double(bagwd[ipft,idi])), \ byref(c_double(bbgw[ipft,idi])), \ - byref(c_double(bsapi[ipft,idi])), \ + byref(c_double(bsapd[ipft,idi])), \ byref(cipft), byref(cbdead), \ byref(cdbagwdd),byref(cdbbgwdd), \ byref(cdbsapdd),byref(cdbdeaddd)) bdead[ipft,idi] = cbdead.value + bagwr[ipft,idi] = (bdead[ipft,idi] + bsapd[ipft,idi]) * 0.6 + # Create the appropriate number of line-styles, colors and widths linestyles_base = ['-', '--', '-.', ':'] linestyles=[] @@ -509,6 +523,18 @@ def CDLParse(file_name,parm): plt.close(fig0) + +if(False): + fig1_12 = plt.figure() + for ipft in range(numpft): + plt.plot(bagwd[ipft,:],bagwr[ipft,:],linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) + plt.xlabel('bagw [m]') + plt.ylabel('bagr [m]') + plt.title('') + plt.grid(True) + plt.savefig("plots/bagw_vs_bagwr.png") + + if(True): fig1 = plt.figure() figleg = plt.figure() @@ -520,17 +546,7 @@ def CDLParse(file_name,parm): plt.grid(True) plt.tight_layout() -if(False): - fig1_0 = plt.figure() - for ipft in range(numpft): - plt.plot(dbh[ipft,0:15],hi[ipft,0:15],linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) - plt.xlabel('diameter [cm]') - plt.ylabel('height [m]') - plt.title('Integrated Heights') - plt.grid(True) - plt.tight_layout() - -if(False): +if(True): fig1_1 = plt.figure() for ipft in range(numpft): plt.plot(hd[ipft,:],hi[ipft,:],linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) @@ -662,7 +678,7 @@ def CDLParse(file_name,parm): linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) ax.set_xlabel('diameter [cm]') ax.set_ylabel('[kgC/kgC]') - ax.set_title('Sapwood (fraction of total live)') + ax.set_title('Sapwood (fraction of live)') ax.grid(True) # Leaf ax = fig7_2.add_subplot(222) @@ -671,7 +687,7 @@ def CDLParse(file_name,parm): linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) ax.set_xlabel('diameter [cm]') ax.set_ylabel('[kgC/kgC]') - ax.set_title('Leaf (fraction of total live)') + ax.set_title('Leaf (fraction of live)') ax.grid(True) # Fine Root ax = fig7_2.add_subplot(223) @@ -680,7 +696,7 @@ def CDLParse(file_name,parm): linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) ax.set_xlabel('diameter [cm]') ax.set_ylabel('[kgC/kgC]') - ax.set_title('Fine-Root (fraction of total live)') + ax.set_title('Fine-Root (fraction of live)') ax.grid(True) # Storage ax = fig7_2.add_subplot(224) @@ -689,7 +705,7 @@ def CDLParse(file_name,parm): linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) ax.set_xlabel('diameter [cm]') ax.set_ylabel('[kgC/kgC]') - ax.set_title('Storage (fraction of total live)') + ax.set_title('Storage (fraction of live)') ax.grid(True) plt.tight_layout() @@ -698,12 +714,14 @@ def CDLParse(file_name,parm): if(True): fig8=plt.figure() + ax = fig8.add_subplot(111) for ipft in range(numpft): - plt.semilogy(dbh[ipft,:],treelai[ipft,:],linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) - plt.xlabel('diameter [cm]') - plt.ylabel('[m2/m2]') - plt.title('In-Crown LAI') - plt.grid(True) + ax.plot(dbh[ipft,:],treelai[ipft,:],linestyle=linestyles[ipft],color=my_colors(ipft),linewidth=lwidth) + ax.ticklabel_format(style='plain') + ax.set_xlabel('diameter [cm]') + ax.set_ylabel('[m2/m2]') + ax.set_title('In-Crown LAI') + ax.grid(True) plt.tight_layout() diff --git a/functional_unit_testing/shared/py_src/PyF90Utils.py b/functional_unit_testing/shared/py_src/PyF90Utils.py index 49965e794c..a9ffaf89ad 100644 --- a/functional_unit_testing/shared/py_src/PyF90Utils.py +++ b/functional_unit_testing/shared/py_src/PyF90Utils.py @@ -16,6 +16,8 @@ def ci(i8): def cchar(fchar): return(byref(c_char(fchar))) +def cchar3(fchar): + return(byref(c_char(fchar.encode('utf-8')))) # We do NOT pass arrays back by reference # This is because we will need to get their length From 927170e4f3f4f9286b81f0b3455ed693064e308e Mon Sep 17 00:00:00 2001 From: Li Date: Wed, 13 May 2020 18:33:02 -0400 Subject: [PATCH 20/46] Revert the parameter file --- parameter_files/fates_params_default.cdl | 808 +++++++++++------------ 1 file changed, 402 insertions(+), 406 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 0ed4c0125f..cf374a7a01 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,21 +1,36 @@ -netcdf fates_params_default0510new { +netcdf fates_params_default { dimensions: fates_NCWD = 4 ; - fates_pft = 12 ; - fates_litterclass = 6 ; fates_history_age_bins = 7 ; - fates_history_coage_bins = 2 ; fates_history_height_bins = 6 ; fates_history_size_bins = 13 ; + fates_history_coage_bins = 2 ; fates_hydr_organs = 4 ; fates_leafage_class = 1 ; - fates_string_length = 60 ; + fates_litterclass = 6 ; + fates_pft = 12 ; fates_prt_organs = 6 ; + fates_string_length = 60 ; fates_variants = 2 ; variables: - double fates_CWD_frac(fates_NCWD) ; - fates_CWD_frac:units = "fraction" ; - fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; + double fates_history_ageclass_bin_edges(fates_history_age_bins) ; + fates_history_ageclass_bin_edges:units = "yr" ; + fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; + double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; + fates_history_coageclass_bin_edges:units = "years" ; + fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; + double fates_history_height_bin_edges(fates_history_height_bins) ; + fates_history_height_bin_edges:units = "m" ; + fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; + double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; + fates_history_sizeclass_bin_edges:units = "cm" ; + fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; + char fates_pftname(fates_pft, fates_string_length) ; + fates_pftname:units = "unitless - string" ; + fates_pftname:long_name = "Description of plant type" ; + char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; + fates_prt_organ_name:units = "unitless - string" ; + fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; double fates_alloc_storage_cushion(fates_pft) ; fates_alloc_storage_cushion:units = "fraction" ; fates_alloc_storage_cushion:long_name = "maximum size of storage C pool, relative to maximum size of leaf C pool" ; @@ -82,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: O'Brien 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" ; @@ -107,33 +122,12 @@ variables: fates_allom_stmode:units = "index" ; fates_allom_stmode:long_name = "storage allometry function index." ; fates_allom_stmode:possible_values = "1: target storage proportional to trimmed maximum leaf biomass." ; - double fates_base_mr_20 ; - fates_base_mr_20:units = "gC/gN/s" ; - fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; double fates_branch_turnover(fates_pft) ; fates_branch_turnover:units = "yr" ; fates_branch_turnover:long_name = "turnover time of branches" ; double fates_c2b(fates_pft) ; fates_c2b:units = "ratio" ; fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ; - double fates_canopy_closure_thresh ; - fates_canopy_closure_thresh:units = "unitless" ; - fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; - double fates_cohort_age_fusion_tol ; - fates_cohort_age_fusion_tol:units = "unitless" ; - fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts." ; - double fates_cohort_size_fusion_tol ; - fates_cohort_size_fusion_tol:units = "unitless" ; - fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; - double fates_comp_excln ; - fates_comp_excln:units = "none" ; - fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; - double fates_cwd_fcel ; - fates_cwd_fcel:units = "unitless" ; - fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; - double fates_cwd_flig ; - fates_cwd_flig:units = "unitless" ; - fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; double fates_displar(fates_pft) ; fates_displar:units = "unitless" ; fates_displar:long_name = "Ratio of displacement height to canopy top height" ; @@ -170,81 +164,18 @@ variables: double fates_eca_vmax_ptase(fates_pft) ; fates_eca_vmax_ptase:units = "gP/m2/s" ; fates_eca_vmax_ptase:long_name = "maximum production rate for biochemical P (per m2) (ECA)" ; - double fates_fire_FBD(fates_litterclass) ; - fates_fire_FBD:units = "NA" ; - fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; - double fates_fire_SAV(fates_litterclass) ; - fates_fire_SAV:units = "NA" ; - fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; - double fates_fire_active_crown_fire ; - fates_fire_active_crown_fire:units = "0 or 1" ; - fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; double fates_fire_alpha_SH(fates_pft) ; fates_fire_alpha_SH:units = "NA" ; fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; double fates_fire_bark_scaler(fates_pft) ; fates_fire_bark_scaler:units = "fraction" ; fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; - double fates_fire_cg_strikes ; - fates_fire_cg_strikes:units = "fraction (0-1)" ; - fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; double fates_fire_crown_depth_frac(fates_pft) ; fates_fire_crown_depth_frac:units = "fraction" ; fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; 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_fire_drying_ratio ; - fates_fire_drying_ratio:units = "NA" ; - fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; - double fates_fire_durat_slope ; - fates_fire_durat_slope:units = "NA" ; - fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; - double fates_fire_fdi_a ; - fates_fire_fdi_a:units = "NA" ; - fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; - double fates_fire_fdi_alpha ; - fates_fire_fdi_alpha:units = "NA" ; - fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; - double fates_fire_fdi_b ; - fates_fire_fdi_b:units = "NA" ; - fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; - double fates_fire_fuel_energy ; - fates_fire_fuel_energy:units = "kJ/kg" ; - fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; - double fates_fire_low_moisture_Coeff(fates_litterclass) ; - fates_fire_low_moisture_Coeff:units = "NA" ; - fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_low_moisture_Slope(fates_litterclass) ; - fates_fire_low_moisture_Slope:units = "NA" ; - fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_max_durat ; - fates_fire_max_durat:units = "minutes" ; - fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; - double fates_fire_mid_moisture(fates_litterclass) ; - fates_fire_mid_moisture:units = "NA" ; - fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; - double fates_fire_mid_moisture_Coeff(fates_litterclass) ; - fates_fire_mid_moisture_Coeff:units = "NA" ; - fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_mid_moisture_Slope(fates_litterclass) ; - fates_fire_mid_moisture_Slope:units = "NA" ; - fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; - double fates_fire_min_moisture(fates_litterclass) ; - fates_fire_min_moisture:units = "NA" ; - fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; - double fates_fire_miner_damp ; - fates_fire_miner_damp:units = "NA" ; - fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; - double fates_fire_miner_total ; - fates_fire_miner_total:units = "fraction" ; - fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; - double fates_fire_nignitions ; - fates_fire_nignitions:units = "ignitions per year per km2" ; - fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; - 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_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -257,18 +188,6 @@ variables: double fates_grperc(fates_pft) ; fates_grperc:units = "unitless" ; fates_grperc:long_name = "Growth respiration factor" ; - double fates_history_ageclass_bin_edges(fates_history_age_bins) ; - fates_history_ageclass_bin_edges:units = "yr" ; - fates_history_ageclass_bin_edges:long_name = "Lower edges for age class bins used in age-resolved patch history output" ; - double fates_history_coageclass_bin_edges(fates_history_coage_bins) ; - fates_history_coageclass_bin_edges:units = "years" ; - fates_history_coageclass_bin_edges:long_name = "Lower edges for cohort age class bins used in cohort age resolved history output" ; - double fates_history_height_bin_edges(fates_history_height_bins) ; - fates_history_height_bin_edges:units = "m" ; - fates_history_height_bin_edges:long_name = "Lower edges for height bins used in height-resolved history output" ; - double fates_history_sizeclass_bin_edges(fates_history_size_bins) ; - fates_history_sizeclass_bin_edges:units = "cm" ; - fates_history_sizeclass_bin_edges:long_name = "Lower edges for DBH size class bins used in size-resolved cohort history output" ; double fates_hydr_avuln_gs(fates_pft) ; fates_hydr_avuln_gs:units = "unitless" ; fates_hydr_avuln_gs:long_name = "shape parameter for stomatal control of water vapor exiting leaf" ; @@ -284,12 +203,6 @@ variables: double fates_hydr_kmax_node(fates_hydr_organs, fates_pft) ; fates_hydr_kmax_node:units = "kg/MPa/m/s" ; fates_hydr_kmax_node:long_name = "maximum xylem conductivity per unit conducting xylem area" ; - 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)" ; - double fates_hydr_kmax_rsurf2 ; - fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; - fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; double fates_hydr_p50_gs(fates_pft) ; fates_hydr_p50_gs:units = "MPa" ; fates_hydr_p50_gs:long_name = "water potential at 50% loss of stomatal conductance" ; @@ -305,12 +218,6 @@ variables: double fates_hydr_pitlp_node(fates_hydr_organs, fates_pft) ; fates_hydr_pitlp_node:units = "MPa" ; fates_hydr_pitlp_node:long_name = "turgor loss point" ; - double fates_hydr_psi0 ; - fates_hydr_psi0:units = "MPa" ; - fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; - double fates_hydr_psicap ; - fates_hydr_psicap:units = "MPa" ; - fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; double fates_hydr_resid_node(fates_hydr_organs, fates_pft) ; fates_hydr_resid_node:units = "cm3/cm3" ; fates_hydr_resid_node:long_name = "residual water conent" ; @@ -326,9 +233,9 @@ variables: double fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; fates_hydr_thetas_node:units = "cm3/cm3" ; fates_hydr_thetas_node:long_name = "saturated water content" ; - double fates_init_litter ; - fates_init_litter:units = "NA" ; - fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; + double fates_leaf_BB_slope(fates_pft) ; + fates_leaf_BB_slope:units = "unitless" ; + fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; double fates_leaf_c3psn(fates_pft) ; fates_leaf_c3psn:units = "flag" ; fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; @@ -356,15 +263,6 @@ variables: double fates_leaf_slatop(fates_pft) ; fates_leaf_slatop:units = "m^2/gC" ; fates_leaf_slatop:long_name = "Specific Leaf Area (SLA) at top of canopy, projected area basis" ; - float fates_leaf_stomatal_intercept(fates_pft) ; - fates_leaf_stomatal_intercept:units = "umol H2O/m**2/s" ; - fates_leaf_stomatal_intercept:_FillValue = 1.e+30f ; - double fates_leaf_stomatal_slope_ballberry(fates_pft) ; - fates_leaf_stomatal_slope_ballberry:units = "unitless" ; - fates_leaf_stomatal_slope_ballberry:long_name = "stomatal slope parameter, as per Ball-Berry" ; - float fates_leaf_stomatal_slope_medlyn(fates_pft) ; - fates_leaf_stomatal_slope_medlyn:units = "KPa**0.5" ; - fates_leaf_stomatal_slope_medlyn:_FillValue = 1.e+30f ; double fates_leaf_stor_priority(fates_pft) ; fates_leaf_stor_priority:units = "unitless" ; fates_leaf_stor_priority:long_name = "factor governing priority of replacing storage with NPP" ; @@ -401,45 +299,15 @@ variables: double fates_lf_flig(fates_pft) ; fates_lf_flig:units = "fraction" ; fates_lf_flig:long_name = "Leaf litter lignin fraction" ; - double fates_logging_coll_under_frac ; - fates_logging_coll_under_frac:units = "fraction" ; - fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; - 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_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." ; - double fates_logging_dbhmin ; - fates_logging_dbhmin:units = "cm" ; - fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; - double fates_logging_direct_frac ; - fates_logging_direct_frac:units = "fraction" ; - fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; - double fates_logging_event_code ; - fates_logging_event_code:units = "unitless" ; - fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; - double fates_logging_export_frac ; - fates_logging_export_frac:units = "fraction" ; - fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; - double fates_logging_mechanical_frac ; - fates_logging_mechanical_frac:units = "fraction" ; - fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; double fates_maintresp_reduction_curvature(fates_pft) ; fates_maintresp_reduction_curvature:units = "unitless (0-1)" ; fates_maintresp_reduction_curvature:long_name = "curvature of MR reduction as f(carbon storage), 1=linear, 0=very curved" ; double fates_maintresp_reduction_intercept(fates_pft) ; fates_maintresp_reduction_intercept:units = "unitless (0-1)" ; fates_maintresp_reduction_intercept:long_name = "intercept of MR reduction as f(carbon storage), 0=no throttling, 1=max throttling" ; - double fates_max_decomp(fates_litterclass) ; - fates_max_decomp:units = "yr-1" ; - fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; double fates_mort_bmort(fates_pft) ; fates_mort_bmort:units = "1/yr" ; fates_mort_bmort:long_name = "background mortality rate" ; - double fates_mort_disturb_frac ; - fates_mort_disturb_frac:units = "fraction" ; - fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; double fates_mort_freezetol(fates_pft) ; fates_mort_freezetol:units = "NA" ; fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; @@ -460,7 +328,7 @@ variables: fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change. Sensible range is around 0.03-0.06. Larger values givesteeper mortality curves." ; double fates_mort_r_size_senescence(fates_pft) ; fates_mort_r_size_senescence:units = "mortality rate dbh^-1" ; - fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change. Sensible range is around 0.03-0.06. Larger values give steeper mortality curves." ; + fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change. Sensible range is around 0.03-0.06. Larger values give steeper mortality curves." ; double fates_mort_scalar_coldstress(fates_pft) ; fates_mort_scalar_coldstress:units = "1/yr" ; fates_mort_scalar_coldstress:long_name = "maximum mortality rate from cold stress" ; @@ -470,54 +338,18 @@ variables: double fates_mort_scalar_hydrfailure(fates_pft) ; fates_mort_scalar_hydrfailure:units = "1/yr" ; fates_mort_scalar_hydrfailure:long_name = "maximum mortality rate from hydraulic failure" ; - double fates_mort_understorey_death ; - fates_mort_understorey_death:units = "fraction" ; - fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; double fates_nfix1(fates_pft) ; fates_nfix1:units = "NA" ; fates_nfix1:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; double fates_nfix2(fates_pft) ; fates_nfix2:units = "NA" ; fates_nfix2:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; - double fates_patch_fusion_tol ; - fates_patch_fusion_tol:units = "unitless" ; - fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; - char fates_pftname(fates_pft, fates_string_length) ; - fates_pftname:units = "unitless - string" ; - fates_pftname:long_name = "Description of plant type" ; - double fates_phen_a ; - fates_phen_a:units = "none" ; - fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_b ; - fates_phen_b:units = "none" ; - fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_c ; - fates_phen_c:units = "none" ; - fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; - double fates_phen_chiltemp ; - fates_phen_chiltemp:units = "degrees C" ; - fates_phen_chiltemp:long_name = "chilling day counting threshold" ; double fates_phen_cold_size_threshold(fates_pft) ; fates_phen_cold_size_threshold:units = "cm" ; fates_phen_cold_size_threshold:long_name = "the dbh size above which will lead to phenology-related stem and leaf drop" ; - double fates_phen_coldtemp ; - fates_phen_coldtemp:units = "degrees C" ; - fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; - double fates_phen_doff_time ; - fates_phen_doff_time:units = "days" ; - fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; - double fates_phen_drought_threshold ; - fates_phen_drought_threshold:units = "m3/m3" ; - fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; double fates_phen_evergreen(fates_pft) ; fates_phen_evergreen:units = "logical flag" ; fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; - double fates_phen_mindayson ; - fates_phen_mindayson:units = "days" ; - fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; - double fates_phen_ncolddayslim ; - fates_phen_ncolddayslim:units = "days" ; - fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; double fates_phen_season_decid(fates_pft) ; fates_phen_season_decid:units = "logical flag" ; fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; @@ -560,21 +392,12 @@ variables: double fates_prt_nitr_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_nitr_stoich_p2:units = "(gN/gC)" ; fates_prt_nitr_stoich_p2:long_name = "nitrogen stoichiometry, parameter 2" ; - char fates_prt_organ_name(fates_prt_organs, fates_string_length) ; - fates_prt_organ_name:units = "unitless - string" ; - fates_prt_organ_name:long_name = "Plant organ name (order must match PRTGenericMod.F90)" ; double fates_prt_phos_stoich_p1(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p1:units = "(gP/gC)" ; fates_prt_phos_stoich_p1:long_name = "phosphorous stoichiometry, parameter 1" ; double fates_prt_phos_stoich_p2(fates_prt_organs, fates_pft) ; fates_prt_phos_stoich_p2:units = "(gP/gC)" ; fates_prt_phos_stoich_p2:long_name = "phosphorous stoichiometry, parameter 2" ; - double fates_q10_froz ; - fates_q10_froz:units = "unitless" ; - fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; - double fates_q10_mr ; - fates_q10_mr:units = "unitless" ; - fates_q10_mr:long_name = "Q10 for maintenance respiration" ; double fates_recruit_hgt_min(fates_pft) ; fates_recruit_hgt_min:units = "m" ; fates_recruit_hgt_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ; @@ -632,9 +455,6 @@ variables: double fates_smpso(fates_pft) ; fates_smpso:units = "mm" ; fates_smpso:long_name = "Soil water potential at full stomatal opening" ; - double fates_soil_salinity ; - fates_soil_salinity:units = "ppt" ; - fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; double fates_taulnir(fates_pft) ; fates_taulnir:units = "fraction" ; fates_taulnir:long_name = "Leaf transmittance: near-IR" ; @@ -675,49 +495,255 @@ variables: double fates_z0mr(fates_pft) ; fates_z0mr:units = "unitless" ; fates_z0mr:long_name = "Ratio of momentum roughness length to canopy top height" ; - int stomatal_model ; - stomatal_model:units = " " ; - -// global attributes: - :history = "Sun May 10 15:37:34 2020: ncks -O -x -v fates_bbopt_c3,fates_bbopt_c4 fates_params_default0510.nc fates_params_default0510new.nc\n", - "This parameter file is maintained in version control\n", - "See https://github.com/NGEET/fates/blob/master/parameter_files/fates_params_default.cdl \n", - "For changes, use git blame \n", - "" ; - :NCO = "20200510" ; -data: - - fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; - - fates_alloc_storage_cushion = 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, - 1.2, 1.2, 1.2 ; - - fates_allom_agb1 = 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, - 0.06896, 0.06896, 0.06896, 0.01, 0.01, 0.01 ; - - fates_allom_agb2 = 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, - 0.572, 0.572, 0.572, 0.572 ; - - fates_allom_agb3 = 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, - 1.94, 1.94, 1.94 ; - - fates_allom_agb4 = 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, - 0.931, 0.931, 0.931, 0.931 ; - - fates_allom_agb_frac = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, - 0.6, 0.6 ; - - fates_allom_amode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - - fates_allom_blca_expnt_diff = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - - fates_allom_cmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - - fates_allom_d2bl1 = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, - 0.07, 0.07, 0.07 ; - - fates_allom_d2bl2 = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, - 1.3 ; + double fates_fire_FBD(fates_litterclass) ; + fates_fire_FBD:units = "NA" ; + fates_fire_FBD:long_name = "spitfire parameter related to fuel bulk density, see SFMain.F90" ; + double fates_fire_low_moisture_Coeff(fates_litterclass) ; + fates_fire_low_moisture_Coeff:units = "NA" ; + fates_fire_low_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_low_moisture_Slope(fates_litterclass) ; + fates_fire_low_moisture_Slope:units = "NA" ; + fates_fire_low_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_mid_moisture(fates_litterclass) ; + fates_fire_mid_moisture:units = "NA" ; + fates_fire_mid_moisture:long_name = "spitfire litter moisture threshold to be considered medium dry" ; + double fates_fire_mid_moisture_Coeff(fates_litterclass) ; + fates_fire_mid_moisture_Coeff:units = "NA" ; + fates_fire_mid_moisture_Coeff:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_mid_moisture_Slope(fates_litterclass) ; + fates_fire_mid_moisture_Slope:units = "NA" ; + fates_fire_mid_moisture_Slope:long_name = "spitfire parameter, equation B1 Thonicke et al 2010" ; + double fates_fire_min_moisture(fates_litterclass) ; + fates_fire_min_moisture:units = "NA" ; + fates_fire_min_moisture:long_name = "spitfire litter moisture threshold to be considered very dry" ; + double fates_fire_SAV(fates_litterclass) ; + fates_fire_SAV:units = "NA" ; + fates_fire_SAV:long_name = "spitfire parameter related to surface area to volume ratio, see SFMain.F90" ; + double fates_max_decomp(fates_litterclass) ; + fates_max_decomp:units = "yr-1" ; + fates_max_decomp:long_name = "maximum rate of litter & CWD transfer from non-decomposing class into decomposing class" ; + double fates_CWD_frac(fates_NCWD) ; + fates_CWD_frac:units = "fraction" ; + fates_CWD_frac:long_name = "fraction of woody (bdead+bsw) biomass destined for CWD pool" ; + double fates_base_mr_20 ; + fates_base_mr_20:units = "gC/gN/s" ; + fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; + double fates_bbopt_c3 ; + fates_bbopt_c3:units = "umol H2O/m**2/s" ; + fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; + double fates_bbopt_c4 ; + fates_bbopt_c4:units = "umol H2O/m**2/s" ; + fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; + double fates_canopy_closure_thresh ; + fates_canopy_closure_thresh:units = "unitless" ; + fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; + double fates_cohort_age_fusion_tol ; + fates_cohort_age_fusion_tol:units = "unitless" ; + fates_cohort_age_fusion_tol:long_name = "minimum fraction in differece in cohort age between cohorts." ; + double fates_cohort_size_fusion_tol ; + fates_cohort_size_fusion_tol:units = "unitless" ; + fates_cohort_size_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + double fates_comp_excln ; + fates_comp_excln:units = "none" ; + fates_comp_excln:long_name = "IF POSITIVE: weighting factor (exponent on dbh) for canopy layer exclusion and promotion, IF NEGATIVE: switch to use deterministic height sorting" ; + double fates_cwd_fcel ; + fates_cwd_fcel:units = "unitless" ; + fates_cwd_fcel:long_name = "Cellulose fraction for CWD" ; + double fates_cwd_flig ; + fates_cwd_flig:units = "unitless" ; + fates_cwd_flig:long_name = "Lignin fraction of coarse woody debris" ; + double fates_fire_active_crown_fire ; + fates_fire_active_crown_fire:units = "0 or 1" ; + fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; + double fates_fire_cg_strikes ; + fates_fire_cg_strikes:units = "fraction (0-1)" ; + fates_fire_cg_strikes:long_name = "fraction of cloud to ground lightning strikes" ; + double fates_fire_drying_ratio ; + fates_fire_drying_ratio:units = "NA" ; + fates_fire_drying_ratio:long_name = "spitfire parameter, fire drying ratio for fuel moisture, alpha_FMC EQ 6 Thonicke et al 2010" ; + double fates_fire_durat_slope ; + fates_fire_durat_slope:units = "NA" ; + fates_fire_durat_slope:long_name = "spitfire parameter, fire max duration slope, Equation 14 Thonicke et al 2010" ; + double fates_fire_fdi_a ; + fates_fire_fdi_a:units = "NA" ; + fates_fire_fdi_a:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010" ; + double fates_fire_fdi_alpha ; + fates_fire_fdi_alpha:units = "NA" ; + fates_fire_fdi_alpha:long_name = "spitfire parameter, EQ 7 Venevsky et al. GCB 2002,(modified EQ 8 Thonicke et al. 2010) " ; + double fates_fire_fdi_b ; + fates_fire_fdi_b:units = "NA" ; + fates_fire_fdi_b:long_name = "spitfire parameter, fire danger index, EQ 5 Thonicke et al 2010 " ; + double fates_fire_fuel_energy ; + fates_fire_fuel_energy:units = "kJ/kg" ; + fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; + double fates_fire_max_durat ; + fates_fire_max_durat:units = "minutes" ; + fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; + double fates_fire_miner_damp ; + fates_fire_miner_damp:units = "NA" ; + fates_fire_miner_damp:long_name = "spitfire parameter, mineral-dampening coefficient EQ A1 Thonicke et al 2010 " ; + double fates_fire_miner_total ; + fates_fire_miner_total:units = "fraction" ; + fates_fire_miner_total:long_name = "spitfire parameter, total mineral content, Table A1 Thonicke et al 2010" ; + double fates_fire_nignitions ; + fates_fire_nignitions:units = "ignitions per year per km2" ; + fates_fire_nignitions:long_name = "number of annual ignitions per square km" ; + 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_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)" ; + double fates_hydr_kmax_rsurf2 ; + fates_hydr_kmax_rsurf2:units = "kg water/m2 root area/Mpa/s" ; + fates_hydr_kmax_rsurf2:long_name = "maximum conducitivity for unit root surface (out of root)" ; + double fates_hydr_psi0 ; + fates_hydr_psi0:units = "MPa" ; + fates_hydr_psi0:long_name = "sapwood water potential at saturation" ; + double fates_hydr_psicap ; + fates_hydr_psicap:units = "MPa" ; + fates_hydr_psicap:long_name = "sapwood water potential at which capillary reserves exhausted" ; + double fates_init_litter ; + fates_init_litter:units = "NA" ; + fates_init_litter:long_name = "Initialization value for litter pool in cold-start (NOT USED)" ; + double fates_logging_coll_under_frac ; + fates_logging_coll_under_frac:units = "fraction" ; + fates_logging_coll_under_frac:long_name = "Fraction of stems killed in the understory when logging generates disturbance" ; + 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_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." ; + double fates_logging_dbhmin ; + fates_logging_dbhmin:units = "cm" ; + fates_logging_dbhmin:long_name = "Minimum dbh at which logging is applied" ; + double fates_logging_direct_frac ; + fates_logging_direct_frac:units = "fraction" ; + fates_logging_direct_frac:long_name = "Fraction of stems logged directly per event" ; + double fates_logging_event_code ; + fates_logging_event_code:units = "unitless" ; + fates_logging_event_code:long_name = "Integer code that options how logging events are structured" ; + double fates_logging_export_frac ; + fates_logging_export_frac:units = "fraction" ; + fates_logging_export_frac:long_name = "fraction of trunk product being shipped offsite, the leftovers will be left onsite as large CWD" ; + double fates_logging_mechanical_frac ; + fates_logging_mechanical_frac:units = "fraction" ; + fates_logging_mechanical_frac:long_name = "Fraction of stems killed due infrastructure an other mechanical means" ; + double fates_mort_disturb_frac ; + fates_mort_disturb_frac:units = "fraction" ; + fates_mort_disturb_frac:long_name = "fraction of canopy mortality that results in disturbance (i.e. transfer of area from new to old patch)" ; + double fates_mort_understorey_death ; + fates_mort_understorey_death:units = "fraction" ; + fates_mort_understorey_death:long_name = "fraction of plants in understorey cohort impacted by overstorey tree-fall" ; + double fates_patch_fusion_tol ; + fates_patch_fusion_tol:units = "unitless" ; + fates_patch_fusion_tol:long_name = "minimum fraction in difference in profiles between patches" ; + double fates_phen_a ; + fates_phen_a:units = "none" ; + fates_phen_a:long_name = "GDD accumulation function, intercept parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_b ; + fates_phen_b:units = "none" ; + fates_phen_b:long_name = "GDD accumulation function, multiplier parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_c ; + fates_phen_c:units = "none" ; + fates_phen_c:long_name = "GDD accumulation function, exponent parameter: gdd_thesh = a + b exp(c*ncd)" ; + double fates_phen_chiltemp ; + fates_phen_chiltemp:units = "degrees C" ; + fates_phen_chiltemp:long_name = "chilling day counting threshold" ; + double fates_phen_coldtemp ; + fates_phen_coldtemp:units = "degrees C" ; + fates_phen_coldtemp:long_name = "temperature exceedance to flag a cold-day for temperature leaf drop" ; + double fates_phen_doff_time ; + fates_phen_doff_time:units = "days" ; + fates_phen_doff_time:long_name = "day threshold compared against days since leaves became off-allometry" ; + double fates_phen_drought_threshold ; + fates_phen_drought_threshold:units = "m3/m3" ; + fates_phen_drought_threshold:long_name = "liquid volume in soil layer, threashold for drought phenology" ; + double fates_phen_mindayson ; + fates_phen_mindayson:units = "days" ; + fates_phen_mindayson:long_name = "day threshold compared against days since leaves became on-allometry" ; + double fates_phen_ncolddayslim ; + fates_phen_ncolddayslim:units = "days" ; + fates_phen_ncolddayslim:long_name = "day threshold exceedance for temperature leaf-drop" ; + double fates_q10_froz ; + fates_q10_froz:units = "unitless" ; + fates_q10_froz:long_name = "Q10 for frozen-soil respiration rates" ; + double fates_q10_mr ; + fates_q10_mr:units = "unitless" ; + fates_q10_mr:long_name = "Q10 for maintenance respiration" ; + double fates_soil_salinity ; + fates_soil_salinity:units = "ppt" ; + fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; + +// global attributes: + :history = "This parameter file is maintained in version control\n", + "See https://github.com/NGEET/fates/blob/master/parameter_files/fates_params_default.cdl \n", + "For changes, use git blame \n", + "" ; +data: + + fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; + + fates_history_coageclass_bin_edges = 0, 5 ; + + fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; + + fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, + 80, 90, 100 ; + + + fates_pftname = + "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 " ; + + fates_prt_organ_name = + "leaf ", + "fine root ", + "sapwood ", + "storage ", + "reproduction ", + "structure " ; + + fates_alloc_storage_cushion = 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, + 1.2, 1.2, 1.2 ; + + fates_allom_agb1 = 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, + 0.06896, 0.06896, 0.06896, 0.01, 0.01, 0.01 ; + + fates_allom_agb2 = 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, 0.572, + 0.572, 0.572, 0.572, 0.572 ; + + fates_allom_agb3 = 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, + 1.94, 1.94, 1.94 ; + + fates_allom_agb4 = 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, + 0.931, 0.931, 0.931, 0.931 ; + + fates_allom_agb_frac = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, + 0.6, 0.6 ; + + fates_allom_amode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_blca_expnt_diff = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_allom_cmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; + + fates_allom_d2bl1 = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, + 0.07, 0.07, 0.07 ; + + fates_allom_d2bl2 = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, + 1.3 ; fates_allom_d2bl3 = 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55 ; @@ -763,24 +789,10 @@ data: fates_allom_stmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - fates_base_mr_20 = 2.52e-06 ; - fates_branch_turnover = 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0 ; fates_c2b = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; - fates_canopy_closure_thresh = 0.8 ; - - fates_cohort_age_fusion_tol = 0.08 ; - - fates_cohort_size_fusion_tol = 0.08 ; - - fates_comp_excln = 3 ; - - fates_cwd_fcel = 0.76 ; - - fates_cwd_flig = 0.24 ; - fates_displar = 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67, 0.67 ; @@ -806,60 +818,18 @@ data: fates_eca_vmax_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; - - fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; - - fates_fire_active_crown_fire = 0 ; - fates_fire_alpha_SH = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2 ; fates_fire_bark_scaler = 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07 ; - fates_fire_cg_strikes = 0.2 ; - fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, 0.95, 0.95, 1, 1, 1 ; 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_fire_drying_ratio = 66000 ; - - fates_fire_durat_slope = -11.06 ; - - fates_fire_fdi_a = 17.62 ; - - fates_fire_fdi_alpha = 0.00037 ; - - fates_fire_fdi_b = 243.12 ; - - fates_fire_fuel_energy = 18000 ; - - fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; - - fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; - - fates_fire_max_durat = 240 ; - - fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; - - fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; - - fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; - - fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; - - fates_fire_miner_damp = 0.41739 ; - - fates_fire_miner_total = 0.055 ; - - fates_fire_nignitions = 15 ; - - fates_fire_part_dens = 513 ; - 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, @@ -871,15 +841,6 @@ data: fates_grperc = 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; - fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; - - fates_history_coageclass_bin_edges = 0, 5 ; - - fates_history_height_bin_edges = 0, 0.1, 0.3, 1, 3, 10 ; - - fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, - 80, 90, 100 ; - fates_hydr_avuln_gs = 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5 ; @@ -907,10 +868,6 @@ data: -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999 ; - fates_hydr_kmax_rsurf1 = 20 ; - - fates_hydr_kmax_rsurf2 = 0.0001 ; - fates_hydr_p50_gs = -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5 ; @@ -944,14 +901,12 @@ data: -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.4, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2, -1.2 ; - fates_hydr_psi0 = 0 ; - - fates_hydr_psicap = -0.6 ; - fates_hydr_resid_node = 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, - 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, - 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.21, 0.21, + 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, + 0.21, 0.21, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11 ; fates_hydr_rfrac_stem = 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, 0.625, @@ -968,7 +923,7 @@ data: 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75 ; - fates_init_litter = 0.05 ; + fates_leaf_BB_slope = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; fates_leaf_c3psn = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ; @@ -996,14 +951,6 @@ 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 = 1000, 1000, 1000, 1000, 1000, 1000, 1000, - 1000, 1000, 1000, 1000, 1000 ; - - fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; - - fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, - 4.7, 2.2, 5.3, 1.6 ; - fates_leaf_stor_priority = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8 ; @@ -1038,34 +985,14 @@ data: fates_lf_flig = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ; - fates_logging_coll_under_frac = 0.55983 ; - - fates_logging_collateral_frac = 0.05 ; - - fates_logging_dbhmax_infra = 35 ; - - fates_logging_dbhmin = 50 ; - - fates_logging_direct_frac = 0.15 ; - - fates_logging_event_code = -30 ; - - fates_logging_export_frac = 0.8 ; - - fates_logging_mechanical_frac = 0.05 ; - fates_maintresp_reduction_curvature = 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ; fates_maintresp_reduction_intercept = 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1 ; - fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; - fates_mort_bmort = 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014, 0.014 ; - fates_mort_disturb_frac = 1 ; - fates_mort_freezetol = 2.5, -55, -80, -30, 2.5, -30, -60, -10, -80, -80, -20, 2.5 ; @@ -1091,50 +1018,14 @@ data: fates_mort_scalar_hydrfailure = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6 ; - fates_mort_understorey_death = 0.55983 ; - fates_nfix1 = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_nfix2 = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_patch_fusion_tol = 0.05 ; - - fates_pftname = - "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 " ; - - fates_phen_a = -68 ; - - fates_phen_b = 638 ; - - fates_phen_c = -0.01 ; - - fates_phen_chiltemp = 5 ; - fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_phen_coldtemp = 7.5 ; - - fates_phen_doff_time = 100 ; - - fates_phen_drought_threshold = 0.15 ; - fates_phen_evergreen = 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 ; - fates_phen_mindayson = 90 ; - - fates_phen_ncolddayslim = 5 ; - fates_phen_season_decid = 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 ; fates_phen_stem_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; @@ -1190,14 +1081,6 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_prt_organ_name = - "leaf ", - "fine root ", - "sapwood ", - "storage ", - "reproduction ", - "structure " ; - fates_prt_phos_stoich_p1 = 0.0033, 0.0029, 0.004, 0.0033, 0.004, 0.004, 0.0033, 0.004, 0.004, 0.004, 0.004, 0.004, @@ -1219,10 +1102,6 @@ data: _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_q10_froz = 1.5 ; - - fates_q10_mr = 1.5 ; - fates_recruit_hgt_min = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 0.75, 0.75, 0.75, 0.125, 0.125, 0.125 ; @@ -1266,6 +1145,7 @@ data: fates_seed_suppl = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_senleaf_long_fdrought = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; fates_smpsc = -255000, -255000, -255000, -255000, -255000, -255000, -255000, @@ -1274,8 +1154,6 @@ data: fates_smpso = -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000 ; - fates_soil_salinity = 0.4 ; - fates_taulnir = 0.25, 0.1, 0.1, 0.25, 0.25, 0.25, 0.1, 0.25, 0.25, 0.34, 0.34, 0.34 ; @@ -1328,5 +1206,123 @@ data: fates_z0mr = 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055 ; - stomatal_model = 2 ; + fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; + + fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; + + fates_fire_low_moisture_Slope = 0.62, 0.72, 0.85, 0.8, 0.62, 0.62 ; + + fates_fire_mid_moisture = 0.72, 0.51, 0.38, 1, 0.8, 0.8 ; + + fates_fire_mid_moisture_Coeff = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_mid_moisture_Slope = 2.35, 1.47, 1.06, 0.8, 3.2, 3.2 ; + + fates_fire_min_moisture = 0.18, 0.12, 0, 0, 0.24, 0.24 ; + + fates_fire_SAV = 13, 3.58, 0.98, 0.2, 66, 66 ; + + fates_max_decomp = 0.52, 0.383, 0.383, 0.19, 1, 999 ; + + fates_CWD_frac = 0.045, 0.075, 0.21, 0.67 ; + + fates_base_mr_20 = 2.52e-06 ; + + fates_bbopt_c3 = 10000 ; + + fates_bbopt_c4 = 40000 ; + + fates_canopy_closure_thresh = 0.8 ; + + fates_cohort_age_fusion_tol = 0.08 ; + + fates_cohort_size_fusion_tol = 0.08 ; + + fates_comp_excln = 3 ; + + fates_cwd_fcel = 0.76 ; + + fates_cwd_flig = 0.24 ; + + fates_fire_active_crown_fire = 0 ; + + fates_fire_cg_strikes = 0.2 ; + + fates_fire_drying_ratio = 66000 ; + + fates_fire_durat_slope = -11.06 ; + + fates_fire_fdi_a = 17.62 ; + + fates_fire_fdi_alpha = 0.00037 ; + + fates_fire_fdi_b = 243.12 ; + + fates_fire_fuel_energy = 18000 ; + + fates_fire_max_durat = 240 ; + + fates_fire_miner_damp = 0.41739 ; + + fates_fire_miner_total = 0.055 ; + + fates_fire_nignitions = 15 ; + + fates_fire_part_dens = 513 ; + + fates_hydr_kmax_rsurf1 = 20 ; + + fates_hydr_kmax_rsurf2 = 0.0001 ; + + fates_hydr_psi0 = 0 ; + + fates_hydr_psicap = -0.6 ; + + fates_init_litter = 0.05 ; + + fates_logging_coll_under_frac = 0.55983 ; + + fates_logging_collateral_frac = 0.05 ; + + fates_logging_dbhmax_infra = 35 ; + + fates_logging_dbhmin = 50 ; + + fates_logging_direct_frac = 0.15 ; + + fates_logging_event_code = -30 ; + + fates_logging_export_frac = 0.8 ; + + fates_logging_mechanical_frac = 0.05 ; + + fates_mort_disturb_frac = 1 ; + + fates_mort_understorey_death = 0.55983 ; + + fates_patch_fusion_tol = 0.05 ; + + fates_phen_a = -68 ; + + fates_phen_b = 638 ; + + fates_phen_c = -0.01 ; + + fates_phen_chiltemp = 5 ; + + fates_phen_coldtemp = 7.5 ; + + fates_phen_doff_time = 100 ; + + fates_phen_drought_threshold = 0.15 ; + + fates_phen_mindayson = 90 ; + + fates_phen_ncolddayslim = 5 ; + + fates_q10_froz = 1.5 ; + + fates_q10_mr = 1.5 ; + + fates_soil_salinity = 0.4 ; } From 1639e58e8fad774c2adee6a3f7120ea689bed399 Mon Sep 17 00:00:00 2001 From: Li Date: Wed, 13 May 2020 19:58:04 -0400 Subject: [PATCH 21/46] Update the parameter file --- parameter_files/fates_params_default.cdl | 39 ++++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index cf374a7a01..29cffd1002 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -233,9 +233,6 @@ variables: double fates_hydr_thetas_node(fates_hydr_organs, fates_pft) ; fates_hydr_thetas_node:units = "cm3/cm3" ; fates_hydr_thetas_node:long_name = "saturated water content" ; - double fates_leaf_BB_slope(fates_pft) ; - fates_leaf_BB_slope:units = "unitless" ; - fates_leaf_BB_slope:long_name = "stomatal slope parameter, as per Ball-Berry" ; double fates_leaf_c3psn(fates_pft) ; fates_leaf_c3psn:units = "flag" ; fates_leaf_c3psn:long_name = "Photosynthetic pathway (1=c3, 0=c4)" ; @@ -263,6 +260,15 @@ variables: double fates_leaf_slatop(fates_pft) ; fates_leaf_slatop:units = "m^2/gC" ; fates_leaf_slatop:long_name = "Specific Leaf Area (SLA) at top of canopy, projected area basis" ; + double fates_leaf_stomatal_intercept(fates_pft) ; + fates_leaf_stomatal_intercept:units = "umol H2O/m**2/s" ; + fates_leaf_stomatal_intercept:long_name = "Minimum unstressed stomatal conductance for Ball-Berry model and Medlyn model" ; + double fates_leaf_stomatal_slope_ballberry(fates_pft) ; + fates_leaf_stomatal_slope_ballberry:units = "unitless" ; + fates_leaf_stomatal_slope_ballberry:long_name = "stomatal slope parameter, as per Ball-Berry" ; + double fates_leaf_stomatal_slope_medlyn(fates_pft) ; + fates_leaf_stomatal_slope_medlyn:units = "KPa**0.5" ; + fates_leaf_stomatal_slope_medlyn:long_name = "stomatal slope parameter, as per Medlyn" ; double fates_leaf_stor_priority(fates_pft) ; fates_leaf_stor_priority:units = "unitless" ; fates_leaf_stor_priority:long_name = "factor governing priority of replacing storage with NPP" ; @@ -528,12 +534,6 @@ variables: double fates_base_mr_20 ; fates_base_mr_20:units = "gC/gN/s" ; fates_base_mr_20:long_name = "Base maintenance respiration rate for plant tissues, using Ryan 1991" ; - double fates_bbopt_c3 ; - fates_bbopt_c3:units = "umol H2O/m**2/s" ; - fates_bbopt_c3:long_name = "Ball-Berry minimum unstressed leaf conductance for C3" ; - double fates_bbopt_c4 ; - fates_bbopt_c4:units = "umol H2O/m**2/s" ; - fates_bbopt_c4:long_name = "Ball-Berry minimum unstressed leaf conductance for C4" ; double fates_canopy_closure_thresh ; fates_canopy_closure_thresh:units = "unitless" ; fates_canopy_closure_thresh:long_name = "tree canopy coverage at which crown area allometry changes from savanna to forest value" ; @@ -675,7 +675,10 @@ variables: double fates_soil_salinity ; fates_soil_salinity:units = "ppt" ; fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; - + int stomatal_model ; + stomatal_model:units = "unitless" ; + stomatal_model:long_name = "switch for choosing between Ball-Berry stomatal conductance model and Medlyn model" ; + // global attributes: :history = "This parameter file is maintained in version control\n", "See https://github.com/NGEET/fates/blob/master/parameter_files/fates_params_default.cdl \n", @@ -923,8 +926,6 @@ data: 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75 ; - fates_leaf_BB_slope = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; - fates_leaf_c3psn = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ; fates_leaf_clumping_index = 0.85, 0.85, 0.8, 0.85, 0.85, 0.9, 0.85, 0.9, @@ -951,6 +952,14 @@ 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 = 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1000, 1000, 1000 ; + + fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + + fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, + 4.7, 2.2, 5.3, 1.6 ; + fates_leaf_stor_priority = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8 ; @@ -1228,10 +1237,6 @@ data: fates_base_mr_20 = 2.52e-06 ; - fates_bbopt_c3 = 10000 ; - - fates_bbopt_c4 = 40000 ; - fates_canopy_closure_thresh = 0.8 ; fates_cohort_age_fusion_tol = 0.08 ; @@ -1325,4 +1330,6 @@ data: fates_q10_mr = 1.5 ; fates_soil_salinity = 0.4 ; + + stomatal_model = 2 ; } From b51ffe0663e28dd771e66b8debf68b72c5c449f7 Mon Sep 17 00:00:00 2001 From: Li Date: Fri, 15 May 2020 12:59:30 -0400 Subject: [PATCH 22/46] Added the logging of Medlyn model error --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 33 ++++++++++++---------- main/EDPftvarcon.F90 | 2 +- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 6a1af1d379..6039427bfc 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -169,7 +169,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) 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) :: stomatal_intercept_btran ! minimum leaf conductance (umol H2O/m**2/s) + 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]) @@ -257,7 +257,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) 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? - stomatal_intercept => EDPftvarcon_inst%stomatal_intercept ) !stomatal intercept for Ball-Berry model and Medlyn model + stomatal_intercept => EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance @@ -884,7 +884,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) :: stomatal_intercept_btran ! 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) @@ -958,12 +958,10 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! empirical curvature parameter for ap photosynthesis co-limitation real(r8),parameter :: theta_ip = 0.999_r8 - !Flag for stomatal conductance model method, 1 for Ball-Berry, 2 for Medlyn - !integer, parameter :: stomatalcond_mtd 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 ) !Intercept for Medlyn & Ball Berry stomatal conductance model method, the unit is umol/m**2/s + stomatal_intercept=> EDPftvarcon_inst%stomatal_intercept ) !Unstressed minimum stomatal conductance, the unit is umol/m**2/s @@ -1193,15 +1191,20 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in write (fates_log(),*)'gs_mol= ',gs_mol call endrun(msg=errMsg(sourcefile, __LINE__)) 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 - - if (abs(gs_mol-gs_mol_err) > 1.e-01_r8 .and. (stomatal_model == 1)) then - write (fates_log(),*) 'CF: Ball-Berry error check - stomatal conductance error:' - write (fates_log(),*) gs_mol, gs_mol_err - end if + + ! Compare with Medlyn model: gs_mol = 1.6*(1+m/sqrt(vpd)) * an/leaf_co2_ppress*p + b + if ( stomatal_model == 2 ) then + gs_mol_err = 1.6*(1 + medlyn_slope(ft)/sqrt(vpd))*max(anet,0._r8)/leaf_co2_ppress*can_press + stomatal_intercept_btran + ! Compare with Ball-Berry model: gs_mol = m * an * hs/leaf_co2_ppress*p + b + else if ( stomatal_model == 1 ) then + 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 + end if + + 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 + end if enddo !sunsha loop diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 3bf1c074bd..0539c1ab55 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -53,7 +53,7 @@ module EDPftvarcon real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter real(r8), allocatable :: medlyn_slope(:) ! Medlyn slope parameter KPa^0.5 - real(r8), allocatable :: stomatal_intercept(:) ! Stomatal intercept parameter umol/m**2/s + real(r8), allocatable :: stomatal_intercept(:) ! intercept of stomatal conductance model (or unstressed minimum conductance) umol/m**2/s real(r8), allocatable :: seed_alloc_mature(:) ! fraction of carbon balance allocated to ! clonal reproduction. From bf8d5f6915c77fb45546c7e002ecda7fe06d4154 Mon Sep 17 00:00:00 2001 From: Li Date: Fri, 15 May 2020 17:16:32 -0400 Subject: [PATCH 23/46] Small fix about the logging of Medlyn model error --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 6039427bfc..dca06bb988 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -1194,7 +1194,7 @@ subroutine LeafLayerPhotosynthesis(f_sun_lsl, & ! in ! Compare with Medlyn model: gs_mol = 1.6*(1+m/sqrt(vpd)) * an/leaf_co2_ppress*p + b if ( stomatal_model == 2 ) then - gs_mol_err = 1.6*(1 + medlyn_slope(ft)/sqrt(vpd))*max(anet,0._r8)/leaf_co2_ppress*can_press + stomatal_intercept_btran + gs_mol_err = h2o_co2_stoma_diffuse_ratio*(1 + medlyn_slope(ft)/sqrt(vpd))*max(anet,0._r8)/leaf_co2_ppress*can_press + stomatal_intercept_btran ! Compare with Ball-Berry model: gs_mol = m * an * hs/leaf_co2_ppress*p + b else if ( stomatal_model == 1 ) then hs = (gb_mol*ceair + gs_mol* veg_esat ) / ((gb_mol+gs_mol)*veg_esat ) From f59805e84cd903032124a7341382c680820bbd2b Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 15 May 2020 15:45:49 -0700 Subject: [PATCH 24/46] minor updates to allometry func test --- functional_unit_testing/allometry/drive_allomtests.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/functional_unit_testing/allometry/drive_allomtests.py b/functional_unit_testing/allometry/drive_allomtests.py index ff3dab19ac..d97da4ded3 100644 --- a/functional_unit_testing/allometry/drive_allomtests.py +++ b/functional_unit_testing/allometry/drive_allomtests.py @@ -720,14 +720,11 @@ def CDLParse(file_name,parm): ax.ticklabel_format(style='plain') ax.set_xlabel('diameter [cm]') ax.set_ylabel('[m2/m2]') - ax.set_title('In-Crown LAI') + ax.set_title('Untrimmed In-Crown LAI') ax.grid(True) plt.tight_layout() -# print(blmaxi[2,:]) -# print(bfrmax[2,:]) -# print(bstore[2,:]) -# print(bsapd[2,:]) + plt.show() From b636984919278c7499453e5ac1a33d6177b61caa Mon Sep 17 00:00:00 2001 From: Li Date: Mon, 1 Jun 2020 22:03:27 -0400 Subject: [PATCH 25/46] small edits on parameter description --- parameter_files/fates_params_default.cdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 29cffd1002..033fafb3f4 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -676,8 +676,8 @@ variables: fates_soil_salinity:units = "ppt" ; fates_soil_salinity:long_name = "soil salinity used for model when not coupled to dynamic soil salinity" ; int stomatal_model ; - stomatal_model:units = "unitless" ; - stomatal_model:long_name = "switch for choosing between Ball-Berry stomatal conductance model and Medlyn model" ; + stomatal_model:units = "flag" ; + stomatal_model:long_name = "switch for choosing between Ball-Berry stomatal conductance model (1) and Medlyn model (2)" ; // global attributes: :history = "This parameter file is maintained in version control\n", From 4c93dff8b4aaa161fd967912b8adac981baa83b6 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 2 Jun 2020 11:27:14 -0700 Subject: [PATCH 26/46] removing lai_canopy_above from the optimum cumulative lai calculation --- biogeochem/EDPhysiologyMod.F90 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index c1d3f93b5c..a2bc512b2c 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -392,6 +392,7 @@ subroutine trim_canopy( currentSite ) ! above the leaf layer of interest real(r8) :: lai_current ! the LAI in the current leaf layer real(r8) :: cumulative_lai ! the cumulative LAI, top down, to the leaf layer of interest + real(r8) :: cohort_cumulative_lai ! cumulative LAI within the current cohort ! Temporary diagnostic ouptut integer :: ipatch @@ -502,6 +503,7 @@ subroutine trim_canopy( currentSite ) lai_layers_above = leaf_inc * (z-1) lai_current = min(leaf_inc, currentCohort%treelai - lai_layers_above) cumulative_lai = lai_canopy_above + lai_layers_above + 0.5*lai_current + cohort_cumulative_lai = lai_layers_above + 0.5*lai_current !there was activity this year in this leaf layer. This should only occur for bottom most leaf layer if (currentCohort%year_net_uptake(z) /= 999._r8)then @@ -560,8 +562,8 @@ subroutine trim_canopy( currentSite ) nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost nnu_clai_a(2,1) = nnu_clai_a(1,2) nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 - nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai - nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai * & + nnu_clai_b(1,1) = nnu_clai_b(1,1) + cohort_cumulative_lai + nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cohort_cumulative_lai * & (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) end if @@ -617,13 +619,13 @@ subroutine trim_canopy( currentSite ) write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b write(fates_log(),*) 'LLSF optimium LAI:', nnu_clai_b(1,1) write(fates_log(),*) 'LLSF optimium LAI info:', info - write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai + write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cohort_cumulative_lai endif ! Calculate the optimum trim based on the initial canopy trim value - if (cumulative_lai > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? - optimum_trim = (nnu_clai_b(1,1) / cumulative_lai) * initial_trim - optimum_laimem = (nnu_clai_b(1,1) / cumulative_lai) * initial_laimem + if (cohort_cumulative_lai > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? + optimum_trim = (nnu_clai_b(1,1) / cohort_cumulative_lai) * initial_trim + optimum_laimem = (nnu_clai_b(1,1) / cohort_cumulative_lai) * initial_laimem ! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits. if (optimum_trim > 0. .and. optimum_trim < 1.) then From a57c17b9726e4df29911b50a3333bd03c31616c9 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Thu, 4 Jun 2020 18:14:59 -0700 Subject: [PATCH 27/46] 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 28/46] 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 29/46] 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 From b01ba28a36da6cd315883fc881b1742d55016530 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 5 Jun 2020 18:02:21 -0600 Subject: [PATCH 30/46] Additional conflicts resolved; revisions in response to rgknox's review Had to resolve conflicts that did not get caught by git. Did some cleanup recommended by rgknox in Friday's meeting. --- fire/SFMainMod.F90 | 16 ++++++++++------ main/FatesInterfaceMod.F90 | 12 ++++++------ main/FatesInterfaceTypesMod.F90 | 7 +++++-- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 5ec742564f..f9bce8f979 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -56,6 +56,7 @@ module SFMainMod public :: cambial_damage_kill public :: post_fire_mortality + integer :: no_fire = 0 ! value of the no_fire mode integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging @@ -69,7 +70,7 @@ module SFMainMod ! ============================================================================ subroutine fire_model( currentSite, bc_in) - use FatesInterfaceTypesMod, only : hlm_use_spitfire + use FatesInterfaceTypesMod, only : hlm_spitfire_mode type(ed_site_type) , intent(inout), target :: currentSite type(bc_in_type) , intent(in) :: bc_in @@ -86,10 +87,10 @@ subroutine fire_model( currentSite, bc_in) enddo if(write_SF==1)then - write(fates_log(),*) 'use_spitfire',hlm_use_spitfire + write(fates_log(),*) 'spitfire_mode', hlm_spitfire_mode endif - if( hlm_use_spitfire > 0 )then + if( hlm_spitfire_mode > no_fire )then call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) call charecteristics_of_fuel(currentSite) @@ -661,7 +662,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) !currentPatch%ROS_front forward ROS (m/min) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2) - use FatesInterfaceTypesMod, only : hlm_use_spitfire + use FatesInterfaceTypesMod, only : hlm_spitfire_mode use EDParamsMod, only : ED_val_nignitions use EDParamsMod, only : cg_strikes ! fraction of cloud-to-ground ligtning strikes use FatesConstantsMod, only : years_per_day @@ -680,6 +681,8 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) AB !daily area burnt in m2 per km2 real(r8) size_of_fire !in m2 + integer :: iofp ! index of oldest fates patch + integer :: successful_ignitions = 3 ! value of successful_ignitions mode real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m ! ---initialize site parameters to zero--- @@ -688,14 +691,15 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 - if (hlm_use_spitfire == 3) then + if (hlm_spitfire_mode == successful_ignitions) then currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA else ! USING LIGHTNING DATA currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) end if !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes - currentSite%NF = bc_in%lightning24 * cg_strikes + iofp = currentSite%oldest_patch%patchno + currentSite%NF = bc_in%lightning24(iofp) * cg_strikes ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 4213e90728..bf6385c1e5 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -983,7 +983,7 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) hlm_max_patch_per_site = unset_int hlm_use_vertsoilc = unset_int hlm_parteh_mode = unset_int - hlm_use_spitfire = unset_int + hlm_spitfire_mode = unset_int hlm_use_planthydro = unset_int hlm_use_cohort_age_tracking = unset_int hlm_use_logging = unset_int @@ -1182,9 +1182,9 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) call endrun(msg=errMsg(sourcefile, __LINE__)) end if - if(hlm_use_spitfire .eq. unset_int) then + if(hlm_spitfire_mode .eq. unset_int) then if (fates_global_verbose()) then - write(fates_log(), *) 'switch for SPITFIRE unset: hlm_use_spitfire, exiting' + write(fates_log(), *) 'switch for SPITFIRE unset: hlm_spitfire_mode, exiting' end if call endrun(msg=errMsg(sourcefile, __LINE__)) end if @@ -1267,10 +1267,10 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) write(fates_log(),*) 'Transfering hlm_parteh_mode= ',ival,' to FATES' end if - case('use_spitfire') - hlm_use_spitfire = ival + case('spitfire_mode') + hlm_spitfire_mode = ival if (fates_global_verbose()) then - write(fates_log(),*) 'Transfering hlm_use_spitfire= ',ival,' to FATES' + write(fates_log(),*) 'Transfering hlm_spitfire_mode =',ival,' to FATES' end if case('use_planthydro') diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index ecc1624ec0..be4962fe2f 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -85,8 +85,8 @@ module FatesInterfaceTypesMod ! soil carbon ! 1 = TRUE, 0 = FALSE - integer, public :: hlm_use_spitfire ! This flag signals whether or not to use SPITFIRE - ! 1 = TRUE, 0 = FALSE + integer, public :: hlm_spitfire_mode ! Flag to signal SPITFIRE mode + ! 0 = no fire, 1 = global constant lightning value from fates_params file, 2 = Lightning dataset, 3 = Successful ignitions dataset integer, public :: hlm_use_logging ! This flag signals whether or not to use @@ -281,6 +281,9 @@ module FatesInterfaceTypesMod ! Vegetation Dynamics ! --------------------------------------------------------------------------------- + ! 24-hour lightning or ignitions [#/km2/day] + real(r8),allocatable :: lightning24(:) + ! Patch 24 hour vegetation temperature [K] real(r8),allocatable :: t_veg24_pa(:) From 46a0b0f3a6b61734adbad455391e9dd71fa87b24 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sat, 6 Jun 2020 22:05:04 -0600 Subject: [PATCH 31/46] One-line addition for "successful igntions" mode In successful ignitions mode want cg_strikes = 1.0 --- fire/SFMainMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index f9bce8f979..7be20da6fc 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -693,6 +693,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 if (hlm_spitfire_mode == successful_ignitions) then currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA + cg_strikes = 1.0_r8 else ! USING LIGHTNING DATA currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) end if From e90e5f4e6be165376a88757d1052633ed4c92411 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sat, 6 Jun 2020 22:30:23 -0600 Subject: [PATCH 32/46] Correction of last commit For "successful ignitions" cases, could not overwrite cg_strikes directly so created new local variable for that purpose. --- fire/SFMainMod.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 7be20da6fc..b3a31e3107 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -681,6 +681,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) AB !daily area burnt in m2 per km2 real(r8) size_of_fire !in m2 + real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode integer :: iofp ! index of oldest fates patch integer :: successful_ignitions = 3 ! value of successful_ignitions mode real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m @@ -693,14 +694,15 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 if (hlm_spitfire_mode == successful_ignitions) then currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA - cg_strikes = 1.0_r8 + cloud_to_ground_strikes = 1.0_r8 else ! USING LIGHTNING DATA currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) + cloud_to_ground_strikes = cg_strikes end if !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes iofp = currentSite%oldest_patch%patchno - currentSite%NF = bc_in%lightning24(iofp) * cg_strikes + currentSite%NF = bc_in%lightning24(iofp) * cloud_to_ground_strikes ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day From 17e1b2870cea0d91986e4e27197096efc5987033 Mon Sep 17 00:00:00 2001 From: Chonggang Xu Date: Mon, 15 Jun 2020 10:38:45 -0600 Subject: [PATCH 33/46] resolve a bug when relh is zero --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index df5f999426..95423f7be1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -141,7 +141,7 @@ subroutine fire_danger_index ( currentSite, bc_in) d_NI = 0.0_r8 currentSite%acc_NI = 0.0_r8 else - yipsolon = (SF_val_fdi_a* temp_in_C)/(SF_val_fdi_b+ temp_in_C)+log(rh/100.0_r8) + yipsolon = (SF_val_fdi_a* temp_in_C)/(SF_val_fdi_b+ temp_in_C)+log(max(1.0_r8,rh)/100.0_r8) dewpoint = (SF_val_fdi_b*yipsolon)/(SF_val_fdi_a-yipsolon) !Standard met. formula d_NI = ( temp_in_C-dewpoint)* temp_in_C !follows Nesterov 1968. Equation 5. Thonicke et al. 2010. if (d_NI < 0.0_r8) then !Change in NI cannot be negative. From 8f2be05c533bc51918a282d73d6a7dcd16ca40cd Mon Sep 17 00:00:00 2001 From: Chonggang Xu Date: Mon, 15 Jun 2020 10:38:14 -0600 Subject: [PATCH 34/46] resolve a loop hang bug --- biogeochem/EDPatchDynamicsMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index fa2ac315af..1130aea6f4 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -1452,6 +1452,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, newPatch, patch_site_ar num_dead_trees = (currentCohort%fire_mort * & currentCohort%n*patch_site_areadis/currentPatch%area) call AccumulateMortalityWaterStorage(currentSite,currentCohort,num_dead_trees) + currentCohort => currentCohort%taller end do end if From 4839f413aeb01406650df86df46733b0107e770a Mon Sep 17 00:00:00 2001 From: Azamat Mametjanov Date: Fri, 19 Jun 2020 15:55:35 -0400 Subject: [PATCH 35/46] Cleanup IBM compiler warnings and errors --- biogeophys/FatesHydroWTFMod.F90 | 5 +++++ biogeophys/FatesPlantHydraulicsMod.F90 | 6 +++--- main/EDParamsMod.F90 | 2 +- parteh/PRTGenericMod.F90 | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/biogeophys/FatesHydroWTFMod.F90 b/biogeophys/FatesHydroWTFMod.F90 index acae6e3e41..455f4878d6 100644 --- a/biogeophys/FatesHydroWTFMod.F90 +++ b/biogeophys/FatesHydroWTFMod.F90 @@ -210,6 +210,7 @@ function th_from_psi_base(this,psi) result(th) class(wrf_type) :: this real(r8),intent(in) :: psi real(r8) :: th + th = 0._r8 write(fates_log(),*) 'The base water retention function' write(fates_log(),*) 'should never be actualized' write(fates_log(),*) 'check how the class pointer was setup' @@ -219,6 +220,7 @@ function psi_from_th_base(this,th) result(psi) class(wrf_type) :: this real(r8),intent(in) :: th real(r8) :: psi + psi = 0._r8 write(fates_log(),*) 'The base water retention function' write(fates_log(),*) 'should never be actualized' write(fates_log(),*) 'check how the class pointer was setup' @@ -228,6 +230,7 @@ function dpsidth_from_th_base(this,th) result(dpsidth) class(wrf_type) :: this real(r8),intent(in) :: th real(r8) :: dpsidth + dpsidth = 0._r8 write(fates_log(),*) 'The base water retention function' write(fates_log(),*) 'should never be actualized' write(fates_log(),*) 'check how the class pointer was setup' @@ -237,6 +240,7 @@ function ftc_from_psi_base(this,psi) result(ftc) class(wkf_type) :: this real(r8),intent(in) :: psi real(r8) :: ftc + ftc = 0._r8 write(fates_log(),*) 'The base water retention function' write(fates_log(),*) 'should never be actualized' write(fates_log(),*) 'check how the class pointer was setup' @@ -246,6 +250,7 @@ function dftcdpsi_from_psi_base(this,psi) result(dftcdpsi) class(wkf_type) :: this real(r8),intent(in) :: psi real(r8) :: dftcdpsi + dftcdpsi = 0._r8 write(fates_log(),*) 'The base water retention function' write(fates_log(),*) 'should never be actualized' write(fates_log(),*) 'check how the class pointer was setup' diff --git a/biogeophys/FatesPlantHydraulicsMod.F90 b/biogeophys/FatesPlantHydraulicsMod.F90 index ca984d16da..2f736799c6 100644 --- a/biogeophys/FatesPlantHydraulicsMod.F90 +++ b/biogeophys/FatesPlantHydraulicsMod.F90 @@ -3620,9 +3620,9 @@ subroutine ImTaylorSolve1D(site_hydr,cohort,cohort_hydr,dtime,q_top, & end if ! Save the number of times we refined our sub-step counts (iterh1) - cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter)) + cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter,r8)) ! Save the number of sub-steps we ultimately used - cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps)) + cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps,r8)) ! Update water contents in the relevant plant compartments [m3/m3] ! ------------------------------------------------------------------------------- @@ -4983,7 +4983,7 @@ subroutine MatSolve2D(site_hydr,cohort,cohort_hydr, & cohort_hydr%iterh1 = cohort_hydr%iterh1 + 1 ! Save the max number of Newton iterations needed - cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nwtn_iter)) + cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nwtn_iter,r8)) print*,'Completed a newton solve' print*,psi_node(:) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index d9c7a4e050..2198452b2a 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -567,7 +567,7 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'q10_mr = ',q10_mr write(fates_log(),fmt0) 'q10_froz = ',q10_froz write(fates_log(),fmt0) 'cg_strikes = ',cg_strikes - write(fates_log(),'(a,L)') 'active_crown_fire = ',active_crown_fire + write(fates_log(),'(a,L2)') 'active_crown_fire = ',active_crown_fire write(fates_log(),*) '------------------------------------------------------' end if diff --git a/parteh/PRTGenericMod.F90 b/parteh/PRTGenericMod.F90 index fd43c574df..f60c4f94fe 100644 --- a/parteh/PRTGenericMod.F90 +++ b/parteh/PRTGenericMod.F90 @@ -1205,6 +1205,7 @@ function GetCoordVal(this, organ_id, element_id ) result(prt_val) integer,intent(in) :: element_id real(r8) :: prt_val + prt_val = 0._r8 write(fates_log(),*)'Init must be extended by a child class.' call endrun(msg=errMsg(sourcefile, __LINE__)) From 334195c6a841f615070d02ae1ed268da4f9c5f5d Mon Sep 17 00:00:00 2001 From: Azamat Mametjanov Date: Fri, 19 Jun 2020 13:18:59 -0700 Subject: [PATCH 36/46] Cleanup PGI compiler warning --- biogeochem/EDPatchDynamicsMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 2998fd85d8..83f78859de 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -1059,7 +1059,7 @@ subroutine check_patch_area( currentSite ) ! !USES: ! ! !ARGUMENTS: - type(ed_site_type), intent(in), target :: currentSite + type(ed_site_type), intent(inout), target :: currentSite ! ! !LOCAL VARIABLES: real(r8) :: areatot From 30ecaf71ad91b9a71f6b574a27f794397af101c8 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 25 Jun 2020 14:39:47 -0700 Subject: [PATCH 37/46] minor formatting changes and refactor --- biogeochem/EDPhysiologyMod.F90 | 64 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index a2bc512b2c..523b59ad27 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -371,28 +371,28 @@ subroutine trim_canopy( currentSite ) type (ed_cohort_type) , pointer :: currentCohort type (ed_patch_type) , pointer :: currentPatch - integer :: z ! leaf layer - integer :: ipft ! pft index - logical :: trimmed ! was this layer trimmed in this year? If not expand the canopy. - real(r8) :: tar_bl ! target leaf biomass (leaves flushed, trimmed) - real(r8) :: tar_bfr ! target fine-root biomass (leaves flushed, trimmed) - real(r8) :: bfr_per_bleaf ! ratio of fine root per leaf biomass - real(r8) :: sla_levleaf ! sla at leaf level z - real(r8) :: nscaler_levleaf ! nscaler value at leaf level z - integer :: cl ! canopy layer index - real(r8) :: kn ! nitrogen decay coefficient - real(r8) :: sla_max ! Observational constraint on how large sla (m2/gC) can become - real(r8) :: leaf_c ! leaf carbon [kg] - real(r8) :: sapw_c ! sapwood carbon [kg] - real(r8) :: store_c ! storage carbon [kg] - real(r8) :: struct_c ! structure carbon [kg] - real(r8) :: leaf_inc ! LAI-only portion of the vegetation increment of dinc_ed - real(r8) :: lai_canopy_above ! the LAI in the canopy layers above the layer of interest - real(r8) :: lai_layers_above ! the LAI in the leaf layers, within the current canopy, - ! above the leaf layer of interest - real(r8) :: lai_current ! the LAI in the current leaf layer - real(r8) :: cumulative_lai ! the cumulative LAI, top down, to the leaf layer of interest - real(r8) :: cohort_cumulative_lai ! cumulative LAI within the current cohort + integer :: z ! leaf layer + integer :: ipft ! pft index + logical :: trimmed ! was this layer trimmed in this year? If not expand the canopy. + real(r8) :: tar_bl ! target leaf biomass (leaves flushed, trimmed) + real(r8) :: tar_bfr ! target fine-root biomass (leaves flushed, trimmed) + real(r8) :: bfr_per_bleaf ! ratio of fine root per leaf biomass + real(r8) :: sla_levleaf ! sla at leaf level z + real(r8) :: nscaler_levleaf ! nscaler value at leaf level z + integer :: cl ! canopy layer index + real(r8) :: kn ! nitrogen decay coefficient + real(r8) :: sla_max ! Observational constraint on how large sla (m2/gC) can become + real(r8) :: leaf_c ! leaf carbon [kg] + real(r8) :: sapw_c ! sapwood carbon [kg] + real(r8) :: store_c ! storage carbon [kg] + real(r8) :: struct_c ! structure carbon [kg] + real(r8) :: leaf_inc ! LAI-only portion of the vegetation increment of dinc_ed + real(r8) :: lai_canopy_above ! the LAI in the canopy layers above the layer of interest + real(r8) :: lai_layers_above ! the LAI in the leaf layers, within the current canopy, + ! above the leaf layer of interest + real(r8) :: lai_current ! the LAI in the current leaf layer + real(r8) :: cumulative_lai ! whole canopy cumulative LAI, top down, to the leaf layer of interest + real(r8) :: cumulative_lai_cohort ! cumulative LAI within the current cohort only ! Temporary diagnostic ouptut integer :: ipatch @@ -499,12 +499,12 @@ subroutine trim_canopy( currentSite ) currentCohort%treelai/(currentCohort%treelai+currentCohort%treesai) ! Now calculate the cumulative top-down lai of the current layer's midpoint - lai_canopy_above = sum(currentPatch%canopy_layer_tlai(1:cl-1)) lai_layers_above = leaf_inc * (z-1) lai_current = min(leaf_inc, currentCohort%treelai - lai_layers_above) - cumulative_lai = lai_canopy_above + lai_layers_above + 0.5*lai_current - cohort_cumulative_lai = lai_layers_above + 0.5*lai_current - + cumulative_lai_cohort = lai_layers_above + 0.5*lai_current + lai_canopy_above = sum(currentPatch%canopy_layer_tlai(1:cl-1)) + cumulative_lai = lai_canopy_above + cumulative_lai_cohort + !there was activity this year in this leaf layer. This should only occur for bottom most leaf layer if (currentCohort%year_net_uptake(z) /= 999._r8)then @@ -562,8 +562,8 @@ subroutine trim_canopy( currentSite ) nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost nnu_clai_a(2,1) = nnu_clai_a(1,2) nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 - nnu_clai_b(1,1) = nnu_clai_b(1,1) + cohort_cumulative_lai - nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cohort_cumulative_lai * & + nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai_cohort + nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai_cohort * & (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) end if @@ -619,13 +619,13 @@ subroutine trim_canopy( currentSite ) write(fates_log(),*) 'LLSF optimium LAI (intercept,slope):', nnu_clai_b write(fates_log(),*) 'LLSF optimium LAI:', nnu_clai_b(1,1) write(fates_log(),*) 'LLSF optimium LAI info:', info - write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cohort_cumulative_lai + write(fates_log(),*) 'LAI fraction (optimum_lai/cumulative_lai):', nnu_clai_b(1,1) / cumulative_lai_cohort endif ! Calculate the optimum trim based on the initial canopy trim value - if (cohort_cumulative_lai > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? - optimum_trim = (nnu_clai_b(1,1) / cohort_cumulative_lai) * initial_trim - optimum_laimem = (nnu_clai_b(1,1) / cohort_cumulative_lai) * initial_laimem + if (cumulative_lai_cohort > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? + optimum_trim = (nnu_clai_b(1,1) / cumulative_lai_cohort) * initial_trim + optimum_laimem = (nnu_clai_b(1,1) / cumulative_lai_cohort) * initial_laimem ! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits. if (optimum_trim > 0. .and. optimum_trim < 1.) then From 2f726a46c3d7b2ac349b0f62de12baf75abf0c64 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 25 Jun 2020 15:42:40 -0700 Subject: [PATCH 38/46] adding explanatory comments to the linear fit calculation --- biogeochem/EDPhysiologyMod.F90 | 42 ++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 523b59ad27..51e38ea557 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -398,8 +398,15 @@ subroutine trim_canopy( currentSite ) integer :: ipatch integer :: icohort - ! LAPACK least squares fit variables (A*X = B) - integer :: nll = 4 ! Number of leaf layers to fit a regression to for calculating the optimum lai + ! LAPACK linear least squares fit variables + ! The standard equation for a linear fit, y = mx + b, is converted to a linear system, AX=B and has + ! the form: [n sum(x); sum(x) sum(x^2)] * [b; m] = [sum(y); sum(x*y)] where + ! n is the number of leaf layers + ! x is yearly_net_uptake minus the leaf cost aka the net-net uptake + ! y is the cumulative lai for the current cohort + ! b is the y-intercept i.e. the cumulative lai that has zero net-net uptake + ! m is the slope of the linear fit + integer :: nll = 3 ! Number of leaf layers to fit a regression to for calculating the optimum lai character(1) :: trans = 'N' ! Input matrix is not transposed integer, parameter :: m = 2, n = 2 ! Number of rows and columns, respectively, in matrix A @@ -410,8 +417,8 @@ subroutine trim_canopy( currentSite ) integer :: lwork ! Dimension of work array integer :: info ! Procedure diagnostic ouput - real(r8) :: nnu_clai_a(m,n) ! LHS of linear least squares fit - real(r8) :: nnu_clai_b(m,nrhs) ! RHS of linear least squares fit + real(r8) :: nnu_clai_a(m,n) ! LHS of linear least squares fit, A matrix + real(r8) :: nnu_clai_b(m,nrhs) ! RHS of linear least squares fit, B matrix real(r8) :: work(workmax) ! work array real(r8) :: initial_trim ! Initial trim @@ -498,14 +505,16 @@ subroutine trim_canopy( currentSite ) leaf_inc = dinc_ed * & currentCohort%treelai/(currentCohort%treelai+currentCohort%treesai) - ! Now calculate the cumulative top-down lai of the current layer's midpoint - lai_layers_above = leaf_inc * (z-1) - lai_current = min(leaf_inc, currentCohort%treelai - lai_layers_above) + ! Now calculate the cumulative top-down lai of the current layer's midpoint within the current cohort + lai_layers_above = leaf_inc * (z-1) + lai_current = min(leaf_inc, currentCohort%treelai - lai_layers_above) cumulative_lai_cohort = lai_layers_above + 0.5*lai_current + + ! Now add in the lai above the current cohort for calculating the sla leaf level lai_canopy_above = sum(currentPatch%canopy_layer_tlai(1:cl-1)) cumulative_lai = lai_canopy_above + cumulative_lai_cohort - !there was activity this year in this leaf layer. This should only occur for bottom most leaf layer + ! There was activity this year in this leaf layer. This should only occur for bottom most leaf layer if (currentCohort%year_net_uptake(z) /= 999._r8)then ! Calculate sla_levleaf following the sla profile with overlying leaf area @@ -557,11 +566,18 @@ subroutine trim_canopy( currentSite ) endif ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai - if (currentCohort%nv > nll .and. currentCohort%nv - z < nll) then ! Only for nll layers + ! if a least nll leaf layers are present in the current cohort + if (currentCohort%nv > nll .and. currentCohort%nv - z < nll) then + + ! Build the A matrix for the LHS of the linear system. A = [n sum(x); sum(x) sum(x^2)] + ! where n = nll and x = yearly_net_uptake-leafcost nnu_clai_a(1,1) = nnu_clai_a(1,1) + 1 ! Increment for each layer used nnu_clai_a(1,2) = nnu_clai_a(1,2) + currentCohort%year_net_uptake(z) - currentCohort%leaf_cost nnu_clai_a(2,1) = nnu_clai_a(1,2) nnu_clai_a(2,2) = nnu_clai_a(2,2) + (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)**2 + + ! Build the B matrix for the RHS of the linear system. B = [sum(y); sum(x*y)] + ! where x = yearly_net_uptake-leafcost and y = cumulative_lai_cohort nnu_clai_b(1,1) = nnu_clai_b(1,1) + cumulative_lai_cohort nnu_clai_b(2,1) = nnu_clai_b(2,1) + (cumulative_lai_cohort * & (currentCohort%year_net_uptake(z) - currentCohort%leaf_cost)) @@ -607,7 +623,11 @@ subroutine trim_canopy( currentSite ) ! write(fates_log(),*) 'LLSF lwork output (info, lwork):', info, lwork ! endif - ! Compute the minimum of 2-norm of b-Ax + ! Compute the minimum of 2-norm of of the least squares fit to solve for X + ! Note that dgels returns the solution by overwriting the nnu_clai_b array. + ! The result has the form: X = [b; m] + ! where b = y-intercept (i.e. the cohort lai that has zero yearly net-net uptake) + ! and m is the slope of the linear fit call dgels(trans, m, n, nrhs, nnu_clai_a, lda, nnu_clai_b, ldb, work, lwork, info) if (info < 0) then @@ -624,6 +644,8 @@ subroutine trim_canopy( currentSite ) ! Calculate the optimum trim based on the initial canopy trim value if (cumulative_lai_cohort > 0._r8) then ! Sometime cumulative_lai comes in at 0.0? + + ! optimum_trim = (nnu_clai_b(1,1) / cumulative_lai_cohort) * initial_trim optimum_laimem = (nnu_clai_b(1,1) / cumulative_lai_cohort) * initial_laimem From 38a70f541117f487a60377d20e08101d1457c67d Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 25 Jun 2020 15:59:15 -0700 Subject: [PATCH 39/46] slight clarification in notes --- biogeochem/EDPhysiologyMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 51e38ea557..ce238a5d52 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -566,7 +566,8 @@ subroutine trim_canopy( currentSite ) endif ! Construct the arrays for a least square fit of the net_net_uptake versus the cumulative lai - ! if a least nll leaf layers are present in the current cohort + ! if at least nll leaf layers are present in the current cohort and only for the bottom nll + ! leaf layers. if (currentCohort%nv > nll .and. currentCohort%nv - z < nll) then ! Build the A matrix for the LHS of the linear system. A = [n sum(x); sum(x) sum(x^2)] From d9a632cc2d6e43ed61c4849a7a8795023002420b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sat, 11 Jul 2020 16:16:12 -0600 Subject: [PATCH 40/46] Updates needed for anthropogenic ignitions in FATES-SPITFIRE Changes to the lightning_v2_fates branch corresponding to the commit that I just made on the lightning_v2_ctsm branch: 35c9b8a --- fire/SFMainMod.F90 | 13 ++++++++++++- main/FatesInterfaceMod.F90 | 4 +++- main/FatesInterfaceTypesMod.F90 | 5 ++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index b3a31e3107..1660a0a625 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -683,7 +683,10 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) size_of_fire !in m2 real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode integer :: iofp ! index of oldest fates patch + integer :: scalar_lightning = 1 ! value of scalar_lightning mode integer :: successful_ignitions = 3 ! value of successful_ignitions mode + integer :: anthro_ignitions = 4 ! value of anthro_ignitions mode + real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et. al. 2012) (#/person/month) real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m ! ---initialize site parameters to zero--- @@ -702,11 +705,19 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes iofp = currentSite%oldest_patch%patchno - currentSite%NF = bc_in%lightning24(iofp) * cloud_to_ground_strikes + if (hlm_spitfire_mode == scalar_lightning) then + currentSite%NF = ED_val_nignitions * years_per_day * cloud_to_ground_strikes + else + currentSite%NF = bc_in%lightning24(iofp) * cloud_to_ground_strikes + end if ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day + ! Calculate and add anthropogenic ignitions to ignitions by lightning + if (hlm_spitfire_mode == anthro_ignitions) then + currentSite%NF = currentSite%NF + pot_hmn_ign_counts_alpha * 6.8_r8 * bc_in%pop_density(iofp)**0.43_r8 / 30._r8 / 24._r8 ! divides by hrs/day and by approximate days per month + end if currentPatch => currentSite%oldest_patch; do while(associated(currentPatch)) diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index a15584597c..5b440dc5cf 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -129,6 +129,7 @@ subroutine zero_bcs(fates,s) fates%bc_in(s)%wind24_pa(:) = 0.0_r8 fates%bc_in(s)%lightning24(:) = 0.0_r8 + fates%bc_in(s)%pop_density(:) = 0.0_r8 fates%bc_in(s)%solad_parb(:,:) = 0.0_r8 fates%bc_in(s)%solai_parb(:,:) = 0.0_r8 fates%bc_in(s)%smp_sl(:) = 0.0_r8 @@ -299,8 +300,9 @@ subroutine allocate_bcin(bc_in, nlevsoil_in, nlevdecomp_in) allocate(bc_in%decomp_id(nlevsoil_in)) allocate(bc_in%dz_decomp_sisl(nlevdecomp_in)) - ! Lightning or ignitions + ! Lightning (or successful ignitions) and population density allocate(bc_in%lightning24(maxPatchesPerSite)) + allocate(bc_in%pop_density(maxPatchesPerSite)) ! Vegetation Dynamics allocate(bc_in%t_veg24_pa(maxPatchesPerSite)) diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index a6f090fe59..135937794f 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -86,7 +86,7 @@ module FatesInterfaceTypesMod ! 1 = TRUE, 0 = FALSE integer, public :: hlm_spitfire_mode ! Flag to signal SPITFIRE mode - ! 0 = no fire, 1 = global constant lightning value from fates_params file, 2 = Lightning dataset, 3 = Successful ignitions dataset + ! See namelist_definition_clm4_5.xml integer, public :: hlm_use_logging ! This flag signals whether or not to use @@ -287,6 +287,9 @@ module FatesInterfaceTypesMod ! 24-hour lightning or ignitions [#/km2/day] real(r8),allocatable :: lightning24(:) + ! Population density [#/km2] + real(r8),allocatable :: pop_density(:) + ! Patch 24 hour vegetation temperature [K] real(r8),allocatable :: t_veg24_pa(:) From 49223024db85ae06dd58247f21b5b618759a32ff Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 12 Jul 2020 13:45:02 -0600 Subject: [PATCH 41/46] Declare spitfire_mode values as parameters --- fire/SFMainMod.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 1660a0a625..8015fca95f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -56,7 +56,7 @@ module SFMainMod public :: cambial_damage_kill public :: post_fire_mortality - integer :: no_fire = 0 ! value of the no_fire mode + integer, parameter :: no_fire = 0 ! value of the no_fire mode integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging @@ -683,9 +683,9 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) size_of_fire !in m2 real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode integer :: iofp ! index of oldest fates patch - integer :: scalar_lightning = 1 ! value of scalar_lightning mode - integer :: successful_ignitions = 3 ! value of successful_ignitions mode - integer :: anthro_ignitions = 4 ! value of anthro_ignitions mode + integer, parameter :: scalar_lightning = 1 ! value of scalar_lightning mode + integer, parameter :: successful_ignitions = 3 ! value of successful_ignitions mode + integer, parameter :: anthro_ignitions = 4 ! value of anthro_ignitions mode real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et. al. 2012) (#/person/month) real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m From 79bafc08e38e06179fcbd1b66c2cab6ff96b0033 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 12 Jul 2020 14:15:31 -0600 Subject: [PATCH 42/46] Added some comments to the code --- fire/SFMainMod.F90 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 8015fca95f..4c3c53c7b6 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -56,6 +56,9 @@ module SFMainMod public :: cambial_damage_kill public :: post_fire_mortality + ! The following parameter represents one of the values of hlm_spitfire_mode + ! and more of these appear in subroutine area_burnt_intensity below + ! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod integer, parameter :: no_fire = 0 ! value of the no_fire mode integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging @@ -683,6 +686,8 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) size_of_fire !in m2 real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode integer :: iofp ! index of oldest fates patch + ! The following three parameters represent values of hlm_spitfire_mode + ! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod integer, parameter :: scalar_lightning = 1 ! value of scalar_lightning mode integer, parameter :: successful_ignitions = 3 ! value of successful_ignitions mode integer, parameter :: anthro_ignitions = 4 ! value of anthro_ignitions mode From eb85d43691282252e0815a3eae55dab00857ec7e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 12 Jul 2020 14:19:04 -0600 Subject: [PATCH 43/46] Added more comments to the code --- fire/SFMainMod.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 4c3c53c7b6..83933db596 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -691,7 +691,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) integer, parameter :: scalar_lightning = 1 ! value of scalar_lightning mode integer, parameter :: successful_ignitions = 3 ! value of successful_ignitions mode integer, parameter :: anthro_ignitions = 4 ! value of anthro_ignitions mode - real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et. al. 2012) (#/person/month) + real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et al. 2012) (#/person/month) real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m ! ---initialize site parameters to zero--- @@ -719,7 +719,8 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day - ! Calculate and add anthropogenic ignitions to ignitions by lightning + ! Calculate anthropogenic ignitions according to Li et al. (2012) + ! Add to ignitions by lightning if (hlm_spitfire_mode == anthro_ignitions) then currentSite%NF = currentSite%NF + pot_hmn_ign_counts_alpha * 6.8_r8 * bc_in%pop_density(iofp)**0.43_r8 / 30._r8 / 24._r8 ! divides by hrs/day and by approximate days per month end if From 1f09dc8224f79985b5a3dd80fe39d447258396f3 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 14 Jul 2020 15:35:11 -0700 Subject: [PATCH 44/46] Apply suggestions from code review Thank you for these suggestions @jkshuman. I have left a few others pending for now. Co-authored-by: jkshuman --- fire/SFMainMod.F90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 83933db596..7386ecee4c 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -685,6 +685,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) size_of_fire !in m2 real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode + real(r8) anthro_ign_count ! anthropogenic ignition count/km2/day integer :: iofp ! index of oldest fates patch ! The following three parameters represent values of hlm_spitfire_mode ! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod @@ -702,7 +703,8 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 if (hlm_spitfire_mode == successful_ignitions) then currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA - cloud_to_ground_strikes = 1.0_r8 + ! force ignition potential to be extreme + cloud_to_ground_strikes = 1.0_r8 ! cloud_to_ground = 1 = use 100% incoming observed ignitions else ! USING LIGHTNING DATA currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) cloud_to_ground_strikes = cg_strikes @@ -712,7 +714,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) iofp = currentSite%oldest_patch%patchno if (hlm_spitfire_mode == scalar_lightning) then currentSite%NF = ED_val_nignitions * years_per_day * cloud_to_ground_strikes - else + else ! use external daily lightning ignition data currentSite%NF = bc_in%lightning24(iofp) * cloud_to_ground_strikes end if @@ -722,7 +724,12 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! Calculate anthropogenic ignitions according to Li et al. (2012) ! Add to ignitions by lightning if (hlm_spitfire_mode == anthro_ignitions) then - currentSite%NF = currentSite%NF + pot_hmn_ign_counts_alpha * 6.8_r8 * bc_in%pop_density(iofp)**0.43_r8 / 30._r8 / 24._r8 ! divides by hrs/day and by approximate days per month + ! anthropogenic ignitions (count/km2/day) + ! = ignitions/person/month * 6.8 * population_density **0.43 /approximate days per month + anthro_ign_count = pot_hmn_ign_counts_alpha * 6.8_r8 * bc_in%pop_density(iofp)**0.43_r8 / 30._r8 + + currentSite%NF = currentSite%NF + anthro_ign_count + end if currentPatch => currentSite%oldest_patch; From 583b1d4158338114816da4e63b1c11afb848b510 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 14 Jul 2020 15:46:19 -0700 Subject: [PATCH 45/46] Update main/FatesInterfaceTypesMod.F90 Clearer comment. Co-authored-by: jkshuman --- main/FatesInterfaceTypesMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index 135937794f..fc90aed1dc 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -87,6 +87,7 @@ module FatesInterfaceTypesMod integer, public :: hlm_spitfire_mode ! Flag to signal SPITFIRE mode ! See namelist_definition_clm4_5.xml + ! ignitions: 1=constant, >1=external data sources (lightning and/or anthropogenic) integer, public :: hlm_use_logging ! This flag signals whether or not to use From 0ad0de9fe9e0df1188164290a91ae08a8d894554 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sat, 18 Jul 2020 11:23:40 -0600 Subject: [PATCH 46/46] Made spitfire_mode flags public for use throughout CTSM-FATES --- fire/SFMainMod.F90 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 7386ecee4c..a02b47759d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -41,6 +41,9 @@ module SFMainMod use PRTGenericMod, only : SetState use FatesInterfaceTypesMod , only : numpft + use CNFireFactoryMod, only: no_fire, scalar_lightning, & + lightning_from_data, successful_ignitions, anthro_ignitions + implicit none private @@ -59,7 +62,6 @@ module SFMainMod ! The following parameter represents one of the values of hlm_spitfire_mode ! and more of these appear in subroutine area_burnt_intensity below ! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod - integer, parameter :: no_fire = 0 ! value of the no_fire mode integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging @@ -685,13 +687,8 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) real(r8) size_of_fire !in m2 real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode - real(r8) anthro_ign_count ! anthropogenic ignition count/km2/day + real(r8) anthro_ign_count ! anthropogenic ignition count/km2/day integer :: iofp ! index of oldest fates patch - ! The following three parameters represent values of hlm_spitfire_mode - ! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod - integer, parameter :: scalar_lightning = 1 ! value of scalar_lightning mode - integer, parameter :: successful_ignitions = 3 ! value of successful_ignitions mode - integer, parameter :: anthro_ignitions = 4 ! value of anthro_ignitions mode real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et al. 2012) (#/person/month) real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m