From 73c18805bd9bd881d5abd32f17ed6e44b9a3944c Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 12:25:52 -0800 Subject: [PATCH 01/29] Added ECA parameters to the default parameter file. --- parameter_files/fates_params_default.cdl | 176 +++++++++++++++++------ 1 file changed, 136 insertions(+), 40 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 82142bf816..cc5a022a9f 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,4 +1,4 @@ -netcdf fates_params_default { +netcdf fates_params_default_ordered { dimensions: fates_NCWD = 4 ; fates_history_age_bins = 7 ; @@ -120,6 +120,42 @@ variables: double fates_displar(fates_pft) ; fates_displar:units = "unitless" ; fates_displar:long_name = "Ratio of displacement height to canopy top height" ; + double fates_eca_alpha_ptase(fates_pft) ; + fates_eca_alpha_ptase:units = "g/m3" ; + fates_eca_alpha_ptase:long_name = "fraction of P from ptase activity sent directly to plant (ECA)" ; + double fates_eca_decompmicc(fates_pft) ; + fates_eca_decompmicc:units = "gC/m3" ; + fates_eca_decompmicc:long_name = "mean soil microbial decomposer biomass (ECA)" ; + double fates_eca_km_nh4(fates_pft) ; + fates_eca_km_nh4:units = "gN/m3" ; + fates_eca_km_nh4:long_name = "half-saturation constant for plant nh4 uptake (ECA)" ; + double fates_eca_km_no3(fates_pft) ; + fates_eca_km_no3:units = "gN/m3" ; + fates_eca_km_no3:long_name = "half-saturation constant for plant no3 uptake (ECA)" ; + double fates_eca_km_p(fates_pft) ; + fates_eca_km_p:units = "gP/m3" ; + fates_eca_km_p:long_name = "half-saturation constant for plant p uptake (ECA)" ; + double fates_eca_km_ptase(fates_pft) ; + fates_eca_km_ptase:units = "gP/m3" ; + fates_eca_km_ptase:long_name = "half-saturation constant for biochemical P (ECA)" ; + double fates_eca_lambda_ptase(fates_pft) ; + fates_eca_lambda_ptase:units = "g/m3" ; + fates_eca_lambda_ptase:long_name = "critical value for biochemical production (ECA)" ; + double fates_eca_vmax_nh4(fates_pft) ; + fates_eca_vmax_nh4:units = "gN/gC/s" ; + fates_eca_vmax_nh4:long_name = "maximum production rate for plant nh4 uptake (ECA)" ; + double fates_eca_vmax_no3(fates_pft) ; + fates_eca_vmax_no3:units = "gN/gC/s" ; + fates_eca_vmax_no3:long_name = "maximum production rate for plant no3 uptake (ECA)" ; + double fates_eca_vmax_p(fates_pft) ; + fates_eca_vmax_p:units = "gP/gC/s" ; + fates_eca_vmax_p:long_name = "maximum production rate for plant p uptake (ECA)" ; + 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_active_crown_fire(fates_pft) ; + fates_fire_active_crown_fire:units = "fraction" ; + fates_fire_active_crown_fire:long_name = "resistance to active crown fire (1=none)" ; 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" ; @@ -282,6 +318,12 @@ 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_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_phen_evergreen(fates_pft) ; fates_phen_evergreen:units = "logical flag" ; fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; @@ -306,6 +348,12 @@ variables: double fates_prescribed_npp_understory(fates_pft) ; fates_prescribed_npp_understory:units = "kgC / m^2 / yr" ; fates_prescribed_npp_understory:long_name = "NPP per unit crown area of understory trees for prescribed physiology mode" ; + double fates_prescribed_nuptake(fates_pft) ; + fates_prescribed_nuptake:units = "kgN/m^2/yr" ; + fates_prescribed_nuptake:long_name = "Nitrogen uptake flux per unit crown area (negative implies fraction of NPP)" ; + double fates_prescribed_puptake(fates_pft) ; + fates_prescribed_puptake:units = "kgP/m^2/yr" ; + fates_prescribed_puptake:long_name = "Phosphorus uptake flux per unit crown area (negative implies fraction of NPP)" ; double fates_prescribed_recruitment(fates_pft) ; fates_prescribed_recruitment:units = "n/yr" ; fates_prescribed_recruitment:long_name = "recruitment rate for prescribed physiology mode" ; @@ -365,10 +413,10 @@ variables: fates_seed_dbh_repro_threshold:long_name = "the diameter (if any) where the plant will start extra clonal allocation to the seed pool" ; double fates_seed_decay_turnover(fates_pft) ; fates_seed_decay_turnover:units = "1/yr" ; - fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to germination" ; + fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to decay" ; double fates_seed_germination_timescale(fates_pft) ; fates_seed_germination_timescale:units = "1/yr" ; - fates_seed_germination_timescale:long_name = "turnover time for seeds with respect to decay" ; + fates_seed_germination_timescale:long_name = "germination timescale for seeds (fraction germinated per year)" ; double fates_seed_suppl(fates_pft) ; fates_seed_suppl:units = "KgC/m2/yr" ; fates_seed_suppl:long_name = "Supplemental external seed rain source term (non-mass conserving)" ; @@ -706,6 +754,30 @@ data: 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 ; + fates_eca_alpha_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_decompmicc = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_km_nh4 = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_km_no3 = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_km_p = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_km_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_lambda_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_vmax_nh4 = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_vmax_no3 = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_vmax_p = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_eca_vmax_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_fire_active_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ; @@ -898,6 +970,10 @@ 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_nfix1 = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_nfix2 = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_phen_evergreen = 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 ; fates_phen_season_decid = 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 ; @@ -918,16 +994,22 @@ data: fates_prescribed_npp_understory = 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125 ; + fates_prescribed_nuptake = -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, + -0.02, -0.02, -0.02, -0.02, -0.02 ; + + fates_prescribed_puptake = -0.002, -0.002, -0.002, -0.002, -0.002, -0.002, + -0.002, -0.002, -0.002, -0.002, -0.002, -0.002 ; + fates_prescribed_recruitment = 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 ; fates_prt_alloc_priority = - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _ ; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ; fates_prt_nitr_stoich_p1 = 0.033, 0.029, 0.04, 0.033, 0.04, 0.04, 0.033, 0.04, 0.04, 0.04, 0.04, 0.04, @@ -942,28 +1024,42 @@ data: 0.0047, 0.0047, 0.0047 ; fates_prt_nitr_stoich_p2 = - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _ ; + 0.033, 0.029, 0.04, 0.033, 0.04, 0.04, 0.033, 0.04, 0.04, 0.04, 0.04, 0.04, + 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, + 0.024, 0.024, + 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, + 1e-08, 1e-08, + 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, + 1e-08, 1e-08, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, + 0.0047, 0.0047, 0.0047 ; 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, + 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, + 0.0024, 0.0024, 0.0024, + 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, + 1e-09, 1e-09, + 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, + 1e-09, 1e-09, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, + 0.00047, 0.00047, 0.00047, 0.00047 ; fates_prt_phos_stoich_p2 = - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _ ; + 0.0033, 0.0029, 0.004, 0.0033, 0.004, 0.004, 0.0033, 0.004, 0.004, 0.004, + 0.004, 0.004, + 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, + 0.0024, 0.0024, 0.0024, + 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, + 1e-09, 1e-09, + 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, + 1e-09, 1e-09, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, + 0.00047, 0.00047, 0.00047, 0.00047 ; 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 ; @@ -1043,20 +1139,20 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_turnover_nitr_retrans = - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _ ; + 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.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_turnover_phos_retrans = - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _, - _, _, _, _, _, _, _, _, _, _, _, _ ; + 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.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_turnover_retrans_mode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; @@ -1172,7 +1268,7 @@ data: fates_phen_drought_threshold = 0.15 ; - fates_phen_mindayson = 90 ; + fates_phen_mindayson = 30 ; fates_phen_ncolddayslim = 5 ; From 8260afb6b7e7d49eddac68f018b2f04e2b35284b Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 12:34:11 -0800 Subject: [PATCH 02/29] Added new eca entries to parameter file --- main/EDPftvarcon.F90 | 124 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 0e4a9f7720..22a7753799 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -198,6 +198,41 @@ module EDPftvarcon real(r8), allocatable :: prt_phos_stoich_p2(:,:) ! Parameter 2 for phosphorus stoichiometry (pft x organ) real(r8), allocatable :: prt_alloc_priority(:,:) ! Allocation priority for each organ (pft x organ) [integer 0-6] + ! Nutrient Aquisition parameters + + ! (NONE OF THESE ARE ACTIVE YET - PLACEHOLDERS ONLY!!!!!) + + ! Nutrient Aquisition (ECA & RD) + real(r8), allocatable :: decompmicc(:) ! microbial decomposer biomass gC/m3 + ! on root surface + + ! ECA Parameters: See Zhu et al. Multiple soil nutrient competition between plants, + ! microbes, and mineral surfaces: model development, parameterization, + ! and example applications in several tropical forests. Biogeosciences, + ! 13, pp.341-363, 2016. + ! KM: Michaeles-Menten half-saturation constants for ECA (plant–enzyme affinity) + ! VMAX: Product of the reaction-rate and enzyme abundance for each PFT in ECA + ! Note*: units of [gC] is grams carbon of fine-root + + real(r8), allocatable :: eca_km_nh4(:) ! half-saturation constant for plant nh4 uptake [gN/m3] + real(r8), allocatable :: eca_vmax_nh4(:) ! maximum production rate for plant nh4 uptake [gN/gC/s] + real(r8), allocatable :: eca_km_no3(:) ! half-saturation constant for plant no3 uptake [gN/m3] + real(r8), allocatable :: eca_vmax_no3(:) ! maximum production rate for plant no3 uptake [gN/gC/s] + real(r8), allocatable :: eca_km_p(:) ! half-saturation constant for plant p uptake [gP/m3] + real(r8), allocatable :: eca_vmax_p(:) ! maximum production rate for plant p uptake [gP/gC/s] + real(r8), allocatable :: eca_km_ptase(:) ! half-saturation constant for biochemical P production [gP/m3] + real(r8), allocatable :: eca_vmax_ptase(:) ! maximum production rate for biochemical P prod [gP/m2/s] + real(r8), allocatable :: eca_alpha_ptase(:) ! Fraction of min P generated from ptase activity + ! that is immediately sent to the plant [/] + real(r8), allocatable :: eca_lambda_ptase(:) ! critical value for Ptase that incurs + ! biochemical production, fraction based how much + ! more in need a plant is for P versus N [/] + + !real(r8), allocatable :: nfix1(:) ! nitrogen fixation parameter 1 (in file, but not used yet) + !real(r8), allocatable :: nfix2(:) ! nitrogen fixation parameter 2 (in file, but not used yet) + + + ! Turnover related things real(r8), allocatable :: phenflush_fraction(:) ! Maximum fraction of storage carbon used to flush leaves @@ -758,7 +793,52 @@ 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) + ! Nutrient competition parameters + + name = 'fates_eca_decompmicc' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_km_nh4' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_vmax_nh4' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_km_no3' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_vmax_no3' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_km_p' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_vmax_p' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_km_ptase' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_eca_vmax_ptase' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_alpha_ptase' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_eca_lambda_ptase' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + end subroutine Register_PFT !----------------------------------------------------------------------- @@ -1189,6 +1269,50 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%phenflush_fraction) + name = 'fates_eca_decompmicc' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_decompmicc) + + name = 'fates_eca_km_nh4' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_km_nh4) + + name = 'fates_eca_vmax_nh4' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_vmax_nh4) + + name = 'fates_eca_km_no3' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_km_no3) + + name = 'fates_eca_vmax_no3' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_vmax_no3) + + name = 'fates_eca_km_p' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_km_p) + + name = 'fates_eca_vmax_p' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_vmax_p) + + name = 'fates_eca_km_ptase' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_km_ptase) + + name = 'fates_eca_vmax_ptase' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_vmax_ptase) + + name = 'fates_eca_alpha_ptase' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_alpha_ptase) + + name = 'fates_eca_lambda_ptase' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%eca_lambda_ptase) + end subroutine Receive_PFT !----------------------------------------------------------------------- From 0cc3cb32b87f31acff4e183cdfc8dddcd8bd27c1 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 12:37:56 -0800 Subject: [PATCH 03/29] Updated parameter file metadata for branch and seed turnover, as well as germination --- parameter_files/fates_params_default.cdl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index cc5a022a9f..e2c04e9d5f 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -112,7 +112,7 @@ variables: fates_allom_stmode:units = "index" ; fates_allom_stmode:long_name = "storage allometry function index" ; double fates_branch_turnover(fates_pft) ; - fates_branch_turnover:units = "yr-1" ; + fates_branch_turnover:units = "yr" ; fates_branch_turnover:long_name = "turnover time of branches" ; double fates_c2b(fates_pft) ; fates_c2b:units = "ratio" ; @@ -412,10 +412,10 @@ variables: fates_seed_dbh_repro_threshold:units = "cm" ; fates_seed_dbh_repro_threshold:long_name = "the diameter (if any) where the plant will start extra clonal allocation to the seed pool" ; double fates_seed_decay_turnover(fates_pft) ; - fates_seed_decay_turnover:units = "1/yr" ; + fates_seed_decay_turnover:units = "yr" ; fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to decay" ; double fates_seed_germination_timescale(fates_pft) ; - fates_seed_germination_timescale:units = "1/yr" ; + fates_seed_germination_timescale:units = "yr" ; fates_seed_germination_timescale:long_name = "germination timescale for seeds (fraction germinated per year)" ; double fates_seed_suppl(fates_pft) ; fates_seed_suppl:units = "KgC/m2/yr" ; From 19ae640409d0e70b93b0d42378278d849b5be1b2 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 12:55:56 -0800 Subject: [PATCH 04/29] Updated names and metadata for seed decay and germination parameters --- biogeochem/EDPhysiologyMod.F90 | 12 ++++++------ main/EDPftvarcon.F90 | 13 +++++++------ parameter_files/fates_params_default.cdl | 16 ++++++++-------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 9706c1af0d..2104d52794 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -1231,16 +1231,16 @@ subroutine SeedDecay( litt ) ! default value from Liscke and Loffler 2006 ; making this a PFT-specific parameter ! decays the seed pool according to exponential model - ! seed_decay_turnover is in yr-1 + ! seed_decay_rate is in yr-1 ! seed_decay is kg/day ! Assume that decay rates are same for all chemical species do pft = 1,numpft litt%seed_decay(pft) = litt%seed(pft) * & - EDPftvarcon_inst%seed_decay_turnover(pft)*years_per_day + EDPftvarcon_inst%seed_decay_rate(pft)*years_per_day litt%seed_germ_decay(pft) = litt%seed_germ(pft) * & - EDPftvarcon_inst%seed_decay_turnover(pft)*years_per_day + EDPftvarcon_inst%seed_decay_rate(pft)*years_per_day enddo @@ -1274,14 +1274,14 @@ subroutine SeedGermination( litt, cold_stat, drought_stat ) !---------------------------------------------------------------------- - ! germination_timescale is being pulled to PFT parameter; units are 1/yr + ! germination_rate is being pulled to PFT parameter; units are 1/yr ! thus the mortality rate of seed -> recruit (in units of carbon) - ! is seed_decay_turnover(p)/germination_timescale(p) + ! is seed_decay_turnover(p)/germination_rate(p) ! and thus the mortality rate (in units of individuals) is the product of ! that times the ratio of (hypothetical) seed mass to recruit biomass do pft = 1,numpft - litt%seed_germ_in(pft) = min(litt%seed(pft) * EDPftvarcon_inst%germination_timescale(pft), & + litt%seed_germ_in(pft) = min(litt%seed(pft) * EDPftvarcon_inst%germination_rate(pft), & max_germination)*years_per_day !set the germination only under the growing season...c.xu diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 22a7753799..4ef6b2a0d0 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -108,8 +108,9 @@ module EDPftvarcon real(r8), allocatable :: vcmaxse(:) real(r8), allocatable :: jmaxse(:) real(r8), allocatable :: tpuse(:) - real(r8), allocatable :: germination_timescale(:) - real(r8), allocatable :: seed_decay_turnover(:) + real(r8), allocatable :: germination_rate(:) ! Fraction of seed mass germinating per year (yr-1) + real(r8), allocatable :: seed_decay_rate(:) ! Fraction of seed mass (both germinated and + ! ungerminated), decaying per year (yr-1) real(r8), allocatable :: trim_limit(:) ! Limit to reductions in leaf area w stress (m2/m2) real(r8), allocatable :: trim_inc(:) ! Incremental change in trimming function (m2/m2) @@ -753,11 +754,11 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_seed_germination_timescale' + name = 'fates_seed_germination_rate' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_seed_decay_turnover' + name = 'fates_seed_decay_rate' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -1229,11 +1230,11 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%tpuse) - name = 'fates_seed_germination_timescale' + name = 'fates_seed_germination_rate' call fates_params%RetreiveParameterAllocate(name=name, & data=this%germination_timescale) - name = 'fates_seed_decay_turnover' + name = 'fates_seed_decay_rate' call fates_params%RetreiveParameterAllocate(name=name, & data=this%seed_decay_turnover) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index e2c04e9d5f..d3cc2178ac 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -411,12 +411,12 @@ variables: double fates_seed_dbh_repro_threshold(fates_pft) ; fates_seed_dbh_repro_threshold:units = "cm" ; fates_seed_dbh_repro_threshold:long_name = "the diameter (if any) where the plant will start extra clonal allocation to the seed pool" ; - double fates_seed_decay_turnover(fates_pft) ; - fates_seed_decay_turnover:units = "yr" ; - fates_seed_decay_turnover:long_name = "turnover time for seeds with respect to decay" ; - double fates_seed_germination_timescale(fates_pft) ; - fates_seed_germination_timescale:units = "yr" ; - fates_seed_germination_timescale:long_name = "germination timescale for seeds (fraction germinated per year)" ; + double fates_seed_decay_rate(fates_pft) ; + fates_seed_decay_rate:units = "yr-1" ; + fates_seed_decay_rate:long_name = "fraction of seeds that decay per year" ; + double fates_seed_germination_rate(fates_pft) ; + fates_seed_germination_rate:units = "yr-1" ; + fates_seed_germination_rate:long_name = "fraction of seeds that germinate per year" ; double fates_seed_suppl(fates_pft) ; fates_seed_suppl:units = "KgC/m2/yr" ; fates_seed_suppl:long_name = "Supplemental external seed rain source term (non-mass conserving)" ; @@ -1096,10 +1096,10 @@ data: fates_seed_dbh_repro_threshold = 150, 90, 90, 90, 90, 90, 3, 3, 2, 1.47, 1.47, 1.47 ; - fates_seed_decay_turnover = 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, + fates_seed_decay_rate = 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51 ; - fates_seed_germination_timescale = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, + fates_seed_germination_rate = 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_seed_suppl = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; From eaf8cb8a6e93889a74574b2fbb1a90a1c5d21a2b Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 13:01:48 -0800 Subject: [PATCH 05/29] Added parameter for active fire flag. --- main/EDPftvarcon.F90 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 4ef6b2a0d0..ff07093ffc 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -49,6 +49,7 @@ module EDPftvarcon ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_kill(:) ! scaler on fire death. For fire model. + real(r8), allocatable :: active_crown_fire(:) ! Is plant susceptible to active crown fire? 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 @@ -417,6 +418,10 @@ 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_fire_active_crown_fire' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -894,6 +899,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) + name = 'fates_fire_active_crown_fire' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%active_crown_fire) + name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -1232,11 +1241,11 @@ subroutine Receive_PFT(this, fates_params) name = 'fates_seed_germination_rate' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%germination_timescale) + data=this%germination_rate) name = 'fates_seed_decay_rate' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%seed_decay_turnover) + data=this%seed_decay_rate) name = 'fates_branch_turnover' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1847,6 +1856,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill + write(fates_log(),fmt0) 'active_crown_fire = ',EDPftvarcon_inst%active_crown_fire 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 @@ -1892,8 +1902,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'vcmaxse = ',EDPftvarcon_inst%vcmaxse write(fates_log(),fmt0) 'jmaxse = ',EDPftvarcon_inst%jmaxse write(fates_log(),fmt0) 'tpuse = ',EDPftvarcon_inst%tpuse - write(fates_log(),fmt0) 'germination_timescale = ',EDPftvarcon_inst%germination_timescale - write(fates_log(),fmt0) 'seed_decay_turnover = ',EDPftvarcon_inst%seed_decay_turnover + write(fates_log(),fmt0) 'germination_rate = ',EDPftvarcon_inst%germination_rate + write(fates_log(),fmt0) 'seed_decay_rate = ',EDPftvarcon_inst%seed_decay_rate write(fates_log(),fmt0) 'branch_turnover = ',EDPftvarcon_inst%branch_turnover write(fates_log(),fmt0) 'trim_limit = ',EDPftvarcon_inst%trim_limit write(fates_log(),fmt0) 'trim_inc = ',EDPftvarcon_inst%trim_inc From 53817e05c5e1d610663505b46b685cb9f0d8a1f0 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 13:11:33 -0800 Subject: [PATCH 06/29] Added non-woody cold-size and stem drop parameters for phenology --- main/EDPftvarcon.F90 | 34 ++++++++++++++++++++++++ parameter_files/fates_params_default.cdl | 12 ++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index ff07093ffc..1e97b57609 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -240,6 +240,11 @@ module EDPftvarcon real(r8), allocatable :: phenflush_fraction(:) ! Maximum fraction of storage carbon used to flush leaves ! on bud-burst [kgC/kgC] + real(r8), allocatable :: phen_cold_size_threshold(:) ! stem/leaf drop occurs on DBH size of decidious non-woody + ! (coastal grass) plants larger than the threshold value + real(r8), allocatable :: phen_stem_drop_fraction(:) ! Fraction of stem dropped/senescened for decidious + ! non-woody (grass) plants + real(r8), allocatable :: senleaf_long_fdrought(:) ! Multiplication factor for leaf longevity of senescent ! leaves during drought( 1.0 indicates no change) @@ -799,6 +804,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_phen_cold_size_threshold' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_phen_stem_drop_fraction' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + ! Nutrient competition parameters name = 'fates_eca_decompmicc' @@ -1279,6 +1292,14 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%phenflush_fraction) + name = 'fates_phen_cold_size_threshold' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%phen_cold_size_threshold) + + name = 'fates_phen_stem_drop_fraction' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%phen_stem_drop_fraction) + name = 'fates_eca_decompmicc' call fates_params%RetreiveParameterAllocate(name=name, & data=this%eca_decompmicc) @@ -1912,6 +1933,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'taul = ',EDPftvarcon_inst%taul write(fates_log(),fmt0) 'taus = ',EDPftvarcon_inst%taus write(fates_log(),fmt0) 'phenflush_fraction',EDpftvarcon_inst%phenflush_fraction + write(fates_log(),fmt0) 'phen_cold_size_threshold = ',EDPftvarcon_inst%phen_cold_size_threshold + write(fates_log(),fmt0) 'phen_stem_drop_fraction',EDpftvarcon_inst%phen_stem_drop_fraction write(fates_log(),fmt0) 'rootprof_beta = ',EDPftvarcon_inst%rootprof_beta write(fates_log(),fmt0) 'fire_alpha_SH = ',EDPftvarcon_inst%fire_alpha_SH write(fates_log(),fmt0) 'allom_hmode = ',EDPftvarcon_inst%allom_hmode @@ -2129,6 +2152,17 @@ subroutine FatesCheckParams(is_master, parteh_mode) write(fates_log(),*) ' Aborting' call endrun(msg=errMsg(sourcefile, __LINE__)) end if + if ( ( EDPftvarcon_inst%phen_stem_drop_fraction(ipft) < 0.0_r8 ) .or. & + ( EDPFtvarcon_inst%phen_stem_drop_fraction(ipft) > 1 ) ) then + + write(fates_log(),*) ' Deciduous non-wood plants must keep 0-100% of their stems' + write(fates_log(),*) ' during the dedicous period.' + write(fates_log(),*) ' PFT#: ',ipft + write(fates_log(),*) ' evergreen flag: (shold be 0):',int(EDPftvarcon_inst%evergreen(ipft)) + write(fates_log(),*) ' phen_stem_drop_fraction: ', EDPFtvarcon_inst%phen_stem_drop_fraction(ipft) + write(fates_log(),*) ' Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if end if diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index d3cc2178ac..95f7cc6a30 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -332,7 +332,13 @@ variables: fates_phen_season_decid:long_name = "Binary flag for seasonal-deciduous leaf habit" ; double fates_phen_stress_decid(fates_pft) ; fates_phen_stress_decid:units = "logical flag" ; - fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; + fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; + 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_stem_drop_fraction(fates_pft) ; + fates_phen_stem_drop_fraction:units = "fraction" ; + fates_phen_stem_drop_fraction:long_name = "fraction of stems to drop for non-woody species during drought/cold" ; double fates_phenflush_fraction(fates_pft) ; fates_phenflush_fraction:units = "fraction" ; fates_phenflush_fraction:long_name = "Upon bud-burst, the maximum fraction of storage carbon used for flushing leaves" ; @@ -980,6 +986,10 @@ data: fates_phen_stress_decid = 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 ; + fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_phen_stem_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_phenflush_fraction = _, _, 0.5, _, 0.5, 0.5, _, 0.5, 0.5, 0.5, 0.5, 0.5 ; fates_prescribed_mortality_canopy = 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, From d84a19aeb0a74ae5e14f715719803e7059e2442a Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 13:13:23 -0800 Subject: [PATCH 07/29] ran the parameter ordering script on the default file. --- parameter_files/fates_params_default.cdl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 95f7cc6a30..8d9b71a640 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -324,21 +324,21 @@ variables: double fates_nfix2(fates_pft) ; fates_nfix2:units = "NA" ; fates_nfix2:long_name = "place-holder for future n-fixation parameter (NOT IMPLEMENTED)" ; + 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_evergreen(fates_pft) ; fates_phen_evergreen:units = "logical flag" ; fates_phen_evergreen:long_name = "Binary flag for evergreen leaf habit" ; 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" ; - double fates_phen_stress_decid(fates_pft) ; - fates_phen_stress_decid:units = "logical flag" ; - fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; - 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_stem_drop_fraction(fates_pft) ; fates_phen_stem_drop_fraction:units = "fraction" ; fates_phen_stem_drop_fraction:long_name = "fraction of stems to drop for non-woody species during drought/cold" ; + double fates_phen_stress_decid(fates_pft) ; + fates_phen_stress_decid:units = "logical flag" ; + fates_phen_stress_decid:long_name = "Binary flag for stress-deciduous leaf habit" ; double fates_phenflush_fraction(fates_pft) ; fates_phenflush_fraction:units = "fraction" ; fates_phenflush_fraction:long_name = "Upon bud-burst, the maximum fraction of storage carbon used for flushing leaves" ; @@ -980,16 +980,16 @@ data: fates_nfix2 = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_phen_evergreen = 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 ; fates_phen_season_decid = 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 ; - fates_phen_stress_decid = 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 ; - - fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_phen_stem_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_phen_stress_decid = 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 ; + fates_phenflush_fraction = _, _, 0.5, _, 0.5, 0.5, _, 0.5, 0.5, 0.5, 0.5, 0.5 ; fates_prescribed_mortality_canopy = 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, @@ -1109,8 +1109,8 @@ data: fates_seed_decay_rate = 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51 ; - fates_seed_germination_rate = 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_seed_germination_rate = 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_seed_suppl = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; From 3af6ab2b6e20b9872717d97a4edef5152f3c67bc Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 26 Nov 2019 13:42:44 -0800 Subject: [PATCH 08/29] Added parameter definitions for prescribed N/P uptake --- main/EDPftvarcon.F90 | 22 +++++++ parameter_files/fates_params_default.cdl | 79 ++++++++++-------------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 1e97b57609..bcbbfb4e24 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -202,6 +202,12 @@ module EDPftvarcon ! Nutrient Aquisition parameters + real(r8), allocatable :: prescribed_nuptake(:) ! Nitrogen uptake flux per unit crown area + ! (negative implies fraction of NPP) kgN/m2/yr + + real(r8), allocatable :: prescribed_puptake(:) ! Phosphorus uptake flux per unit crown area + ! (negative implies fraction of NPP) kgP/m2/yr + ! (NONE OF THESE ARE ACTIVE YET - PLACEHOLDERS ONLY!!!!!) ! Nutrient Aquisition (ECA & RD) @@ -1664,6 +1670,14 @@ subroutine Register_PFT_prt_organs(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_prescribed_nuptake' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_prescribed_puptake' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_turnover_carb_retrans' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -1713,6 +1727,14 @@ subroutine Receive_PFT_prt_organs(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%prt_alloc_priority) + name = 'fates_prescribed_nuptake' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%prescribed_nuptake) + + name = 'fates_prescribed_puptake' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%prescribed_puptake) + name = 'fates_turnover_carb_retrans' call fates_params%RetreiveParameterAllocate(name=name, & data=this%turnover_carb_retrans) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 8d9b71a640..6e0006ff6e 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,4 +1,4 @@ -netcdf fates_params_default_ordered { +netcdf fates_params_default { dimensions: fates_NCWD = 4 ; fates_history_age_bins = 7 ; @@ -1004,22 +1004,20 @@ data: fates_prescribed_npp_understory = 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125, 0.03125 ; - fates_prescribed_nuptake = -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, - -0.02, -0.02, -0.02, -0.02, -0.02 ; + fates_prescribed_nuptake = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_prescribed_puptake = -0.002, -0.002, -0.002, -0.002, -0.002, -0.002, - -0.002, -0.002, -0.002, -0.002, -0.002, -0.002 ; + fates_prescribed_puptake = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_prescribed_recruitment = 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 ; fates_prt_alloc_priority = - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ; + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _ ; fates_prt_nitr_stoich_p1 = 0.033, 0.029, 0.04, 0.033, 0.04, 0.04, 0.033, 0.04, 0.04, 0.04, 0.04, 0.04, @@ -1034,16 +1032,12 @@ data: 0.0047, 0.0047, 0.0047 ; fates_prt_nitr_stoich_p2 = - 0.033, 0.029, 0.04, 0.033, 0.04, 0.04, 0.033, 0.04, 0.04, 0.04, 0.04, 0.04, - 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, - 0.024, 0.024, - 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, - 1e-08, 1e-08, - 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, 1e-08, - 1e-08, 1e-08, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, 0.0047, - 0.0047, 0.0047, 0.0047 ; + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _ ; 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, @@ -1059,17 +1053,12 @@ data: 0.00047, 0.00047, 0.00047, 0.00047 ; fates_prt_phos_stoich_p2 = - 0.0033, 0.0029, 0.004, 0.0033, 0.004, 0.004, 0.0033, 0.004, 0.004, 0.004, - 0.004, 0.004, - 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, 0.0024, - 0.0024, 0.0024, 0.0024, - 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, - 1e-09, 1e-09, - 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, 1e-09, - 1e-09, 1e-09, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, 0.00047, - 0.00047, 0.00047, 0.00047, 0.00047 ; + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _ ; 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 ; @@ -1149,20 +1138,20 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_turnover_nitr_retrans = - 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.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _ ; fates_turnover_phos_retrans = - 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.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _, + _, _, _, _, _, _, _, _, _, _, _, _ ; fates_turnover_retrans_mode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; @@ -1278,7 +1267,7 @@ data: fates_phen_drought_threshold = 0.15 ; - fates_phen_mindayson = 30 ; + fates_phen_mindayson = 90 ; fates_phen_ncolddayslim = 5 ; From dfd6297a2dbfbbcec0a47401c2cc3aba82e71e93 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 13 Dec 2019 11:06:01 -0800 Subject: [PATCH 09/29] Moved active_crown_fire to a scalar parameter. --- main/EDParamsMod.F90 | 13 ++++++++++++- main/EDPftvarcon.F90 | 10 ---------- parameter_files/fates_params_default.cdl | 10 +++++----- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 34365e1150..3d29eabb41 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -41,6 +41,7 @@ module EDParamsMod 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 :: active_crown_fire real(r8),protected,public :: q10_mr ! Q10 for respiration rate (for soil fragmenation and plant respiration) (unitless) real(r8),protected,public :: q10_froz ! Q10 for frozen-soil respiration rates (for soil fragmentation) (unitless) @@ -50,6 +51,7 @@ module EDParamsMod real(r8),protected,allocatable,public :: ED_val_history_ageclass_bin_edges(:) real(r8),protected,allocatable,public :: ED_val_history_height_bin_edges(:) + character(len=param_string_length),parameter,public :: ED_name_mort_disturb_frac = "fates_mort_disturb_frac" character(len=param_string_length),parameter,public :: ED_name_comp_excln = "fates_comp_excln" character(len=param_string_length),parameter,public :: ED_name_init_litter = "fates_init_litter" @@ -73,6 +75,8 @@ module EDParamsMod 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" + ! Resistance to active crown fire + character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" character(len=param_string_length),parameter :: fates_name_q10_mr="fates_q10_mr" character(len=param_string_length),parameter :: fates_name_q10_froz="fates_q10_froz" @@ -170,7 +174,7 @@ subroutine FatesParamsInit() ED_val_cohort_fusion_tol = nan ED_val_patch_fusion_tol = nan ED_val_canopy_closure_thresh = nan - + active_crown_fire = nan hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan @@ -333,6 +337,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_history_height_bin_edges, dimension_shape=dimension_shape_1d, & dimension_names=dim_names_height) + call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names_scalar) + end subroutine FatesRegisterParams @@ -466,6 +473,9 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameterAllocate(name=ED_name_history_height_bin_edges, & data=ED_val_history_height_bin_edges) + call fates_params%RetreiveParameterAllocate(name=fates_name_active_crown_fire, & + data=active_crown_fire) + end subroutine FatesReceiveParams @@ -517,6 +527,7 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'logging_dbhmax_infra = ',logging_dbhmax_infra write(fates_log(),fmt0) 'q10_mr = ',q10_mr write(fates_log(),fmt0) 'q10_froz = ',q10_froz + write(fates_log(),fmt0) 'active_crown_fire = ',active_crown_fire write(fates_log(),*) '------------------------------------------------------' end if diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index bcbbfb4e24..2326b3b9ce 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -49,7 +49,6 @@ module EDPftvarcon ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_kill(:) ! scaler on fire death. For fire model. - real(r8), allocatable :: active_crown_fire(:) ! Is plant susceptible to active crown fire? 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 @@ -429,10 +428,6 @@ 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_fire_active_crown_fire' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -918,10 +913,6 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) - name = 'fates_fire_active_crown_fire' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%active_crown_fire) - name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -1899,7 +1890,6 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill - write(fates_log(),fmt0) 'active_crown_fire = ',EDPftvarcon_inst%active_crown_fire 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 diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 6e0006ff6e..03da1735d5 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -153,9 +153,6 @@ 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_active_crown_fire(fates_pft) ; - fates_fire_active_crown_fire:units = "fraction" ; - fates_fire_active_crown_fire:long_name = "resistance to active crown fire (1=none)" ; 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" ; @@ -528,6 +525,9 @@ variables: 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 = "fraction" ; + fates_fire_active_crown_fire:long_name = "resistance to active crown fire (1=none)" ; 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" ; @@ -782,8 +782,6 @@ data: fates_eca_vmax_ptase = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_fire_active_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ; @@ -1199,6 +1197,8 @@ data: fates_cwd_flig = 0.24 ; + fates_fire_active_crown_fire = 0 ; + fates_fire_drying_ratio = 66000 ; fates_fire_durat_slope = -11.06 ; From face185f35f12688524f92ab6a4996005fda9582 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 13 Dec 2019 11:07:57 -0800 Subject: [PATCH 10/29] Fixed comment that had turnover timescale instead of rate --- biogeochem/EDPhysiologyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 2104d52794..971eb48e9e 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -1276,7 +1276,7 @@ subroutine SeedGermination( litt, cold_stat, drought_stat ) ! germination_rate is being pulled to PFT parameter; units are 1/yr ! thus the mortality rate of seed -> recruit (in units of carbon) - ! is seed_decay_turnover(p)/germination_rate(p) + ! is seed_decay_rate(p)/germination_rate(p) ! and thus the mortality rate (in units of individuals) is the product of ! that times the ratio of (hypothetical) seed mass to recruit biomass From b0f666a197db736ffd497352e5b7a6b151ce6138 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Fri, 13 Dec 2019 11:31:42 -0800 Subject: [PATCH 11/29] Added the read-in calls on nfix1 and nfix2, even though they aren't used, these calls enforce that the parameter file has these names current. --- main/EDPftvarcon.F90 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 2326b3b9ce..ced1e5294d 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -235,9 +235,9 @@ module EDPftvarcon ! biochemical production, fraction based how much ! more in need a plant is for P versus N [/] - !real(r8), allocatable :: nfix1(:) ! nitrogen fixation parameter 1 (in file, but not used yet) - !real(r8), allocatable :: nfix2(:) ! nitrogen fixation parameter 2 (in file, but not used yet) - + + real(r8), allocatable :: nfix1(:) ! nitrogen fixation parameter 1 (in file, but not used yet) + real(r8), allocatable :: nfix2(:) ! nitrogen fixation parameter 2 (in file, but not used yet) ! Turnover related things @@ -859,6 +859,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_nfix1' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_nfix2' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + end subroutine Register_PFT !----------------------------------------------------------------------- @@ -1341,6 +1350,15 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%eca_lambda_ptase) + name = 'fates_nfix1' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%nfix1) + + name = 'fates_nfix2' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%nfix2) + + end subroutine Receive_PFT !----------------------------------------------------------------------- From 446e9396ea53ba9e174824fbc92b3e8d46dcedef Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Sat, 14 Dec 2019 14:35:35 -0700 Subject: [PATCH 12/29] bug fixes on new parameter dimensions --- main/EDParamsMod.F90 | 8 ++++---- main/EDPftvarcon.F90 | 47 ++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 3d29eabb41..14aa4ca3ef 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -337,7 +337,7 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_history_height_bin_edges, dimension_shape=dimension_shape_1d, & dimension_names=dim_names_height) - call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_1d, & + call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) end subroutine FatesRegisterParams @@ -463,6 +463,9 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=fates_name_q10_froz, & data=q10_froz) + call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & + data=active_crown_fire) + ! parameters that are arrays of size defined within the params file and thus need allocating as well call fates_params%RetreiveParameterAllocate(name=ED_name_history_sizeclass_bin_edges, & data=ED_val_history_sizeclass_bin_edges) @@ -472,9 +475,6 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameterAllocate(name=ED_name_history_height_bin_edges, & data=ED_val_history_height_bin_edges) - - call fates_params%RetreiveParameterAllocate(name=fates_name_active_crown_fire, & - data=active_crown_fire) end subroutine FatesReceiveParams diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index ced1e5294d..7a2fe0ef3a 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -210,7 +210,7 @@ module EDPftvarcon ! (NONE OF THESE ARE ACTIVE YET - PLACEHOLDERS ONLY!!!!!) ! Nutrient Aquisition (ECA & RD) - real(r8), allocatable :: decompmicc(:) ! microbial decomposer biomass gC/m3 +! real(r8), allocatable :: decompmicc(:) ! microbial decomposer biomass gC/m3 ! on root surface ! ECA Parameters: See Zhu et al. Multiple soil nutrient competition between plants, @@ -815,9 +815,9 @@ subroutine Register_PFT(this, fates_params) ! Nutrient competition parameters - name = 'fates_eca_decompmicc' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) +! name = 'fates_eca_decompmicc' +! call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & +! dimension_names=dim_names, lower_bounds=dim_lower_bound) name = 'fates_eca_km_nh4' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & @@ -867,7 +867,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_prescribed_nuptake' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + + name = 'fates_prescribed_puptake' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + end subroutine Register_PFT !----------------------------------------------------------------------- @@ -1306,9 +1313,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%phen_stem_drop_fraction) - name = 'fates_eca_decompmicc' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%eca_decompmicc) +! name = 'fates_eca_decompmicc' +! call fates_params%RetreiveParameterAllocate(name=name, & +! data=this%eca_decompmicc) name = 'fates_eca_km_nh4' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1357,6 +1364,14 @@ subroutine Receive_PFT(this, fates_params) name = 'fates_nfix2' call fates_params%RetreiveParameterAllocate(name=name, & data=this%nfix2) + + name = 'fates_prescribed_nuptake' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%prescribed_nuptake) + + name = 'fates_prescribed_puptake' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%prescribed_puptake) end subroutine Receive_PFT @@ -1679,14 +1694,6 @@ subroutine Register_PFT_prt_organs(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_prescribed_nuptake' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) - - name = 'fates_prescribed_puptake' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_turnover_carb_retrans' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -1736,14 +1743,6 @@ subroutine Receive_PFT_prt_organs(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%prt_alloc_priority) - name = 'fates_prescribed_nuptake' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%prescribed_nuptake) - - name = 'fates_prescribed_puptake' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%prescribed_puptake) - name = 'fates_turnover_carb_retrans' call fates_params%RetreiveParameterAllocate(name=name, & data=this%turnover_carb_retrans) From 6e905890bc25c6825619bef02beb4d5fb6c295da Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 16 Dec 2019 13:04:59 -0800 Subject: [PATCH 13/29] Updated active_crown_fire flag to logical --- main/EDParamsMod.F90 | 13 +++++++++---- parameter_files/fates_params_default.cdl | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 14aa4ca3ef..7c57f3534f 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -41,7 +41,7 @@ module EDParamsMod 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 :: active_crown_fire + logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire real(r8),protected,public :: q10_mr ! Q10 for respiration rate (for soil fragmenation and plant respiration) (unitless) real(r8),protected,public :: q10_froz ! Q10 for frozen-soil respiration rates (for soil fragmentation) (unitless) @@ -174,7 +174,7 @@ subroutine FatesParamsInit() ED_val_cohort_fusion_tol = nan ED_val_patch_fusion_tol = nan ED_val_canopy_closure_thresh = nan - active_crown_fire = nan + active_crown_fire = .true. hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan @@ -352,6 +352,9 @@ subroutine FatesReceiveParams(fates_params) class(fates_parameters_type), intent(inout) :: fates_params + real(r8) :: active_crown_fire_real !Local temp to transfer real data in file, into + + call fates_params%RetreiveParameter(name=ED_name_mort_disturb_frac, & data=fates_mortality_disturbance_fraction) @@ -464,7 +467,9 @@ subroutine FatesReceiveParams(fates_params) data=q10_froz) call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & - data=active_crown_fire) + data=active_crown_fire_real) + active_crown_fire = (abs(active_crown_fire_real-1.0_r8) Date: Mon, 16 Dec 2019 13:07:50 -0800 Subject: [PATCH 14/29] removed initialization of fates_fire_flag, fixed comment. --- main/EDParamsMod.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 7c57f3534f..5231e4c6d3 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -174,7 +174,6 @@ subroutine FatesParamsInit() ED_val_cohort_fusion_tol = nan ED_val_patch_fusion_tol = nan ED_val_canopy_closure_thresh = nan - active_crown_fire = .true. hydr_kmax_rsurf1 = nan hydr_kmax_rsurf2 = nan @@ -352,7 +351,7 @@ subroutine FatesReceiveParams(fates_params) class(fates_parameters_type), intent(inout) :: fates_params - real(r8) :: active_crown_fire_real !Local temp to transfer real data in file, into + real(r8) :: active_crown_fire_real !Local temp to transfer real data in file call fates_params%RetreiveParameter(name=ED_name_mort_disturb_frac, & From 22647828d1e0f35072ba2132ed8d69f9e60d068d Mon Sep 17 00:00:00 2001 From: Jessica Needham Date: Mon, 16 Dec 2019 13:08:58 -0800 Subject: [PATCH 15/29] [Size and age dependent mortality parameters into default param file ] [Set of changes to follow with size- and age-dependent mortality modelled as increases in mortality rate with cohort size/age. Here just adding the parameters for these functions to the default param file. There is a rate of change and inflection point for size and age. Cohort age fusion parameter is also included - in age dependent mortality we track cohort age - cohorts cannot be fused if they are too different in age. ] Fixes: [NGT-ED Github issue #] User interface changes?: [Yes - users will have to specify these parameters] Code review: [Names] Test suite: [suite name, machine, compilers] Test baseline: Test namelist changes: Test answer changes: [bit for bit, roundoff, climate changing] Test summary: No testing. --- parameter_files/fates_params_default.cdl | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index b66ea3c0b1..92b49329ae 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -4,6 +4,7 @@ dimensions: fates_history_age_bins = 7 ; fates_history_height_bins = 6 ; fates_history_size_bins = 13 ; + fates_history_coage_bins = - ; fates_hydr_organs = 4 ; fates_leafage_class = 1 ; fates_litterclass = 6 ; @@ -21,6 +22,9 @@ variables: 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_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" ; char fates_pftname(fates_pft, fates_string_length) ; fates_pftname:units = "unitless - string" ; fates_pftname:long_name = "Description of plant type" ; @@ -297,6 +301,18 @@ variables: double fates_mort_bmort(fates_pft) ; fates_mort_bmort:units = "1/yr" ; fates_mort_bmort:long_name = "background mortality rate" ; + double fates_mort_ip_senescence(fates_pft); + fates_mort_ip_senescence:units = "dbh cm"; + fates_mort_ip_senescence:long_name ="Mortality dbh senescence inflection point"; + double fates_mort_r_senescence(fates_pft); + fates_mort_r_senescence:units = "mortality rate dbh^-1"; + fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change"; + 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"; + 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"; double fates_mort_freezetol(fates_pft) ; fates_mort_freezetol:units = "NA" ; fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; @@ -516,6 +532,9 @@ variables: double fates_cohort_fusion_tol ; fates_cohort_fusion_tol:units = "unitless" ; fates_cohort_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + 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_comp_excln ; fates_comp_excln:units = "none" ; fates_comp_excln:long_name = "weighting factor (exponent on dbh) for canopy layer exclusion and promotion" ; @@ -657,6 +676,8 @@ data: fates_history_sizeclass_bin_edges = 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100 ; +fates_history_coageclass_bin_edges = - ; + fates_pftname = "broadleaf_evergreen_tropical_tree ", "needleleaf_evergreen_extratrop_tree ", @@ -957,6 +978,14 @@ data: 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_ip_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; + + fates_mort_r_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; + + fates_mort_ip_age_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; + + fates_mort_r_age_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; + fates_mort_freezetol = 2.5, -55, -80, -30, 2.5, -30, -60, -10, -80, -80, -20, 2.5 ; @@ -1191,6 +1220,8 @@ data: fates_cohort_fusion_tol = 0.08 ; + fates_cohort_age_fusion_tol = - ; + fates_comp_excln = 3 ; fates_cwd_fcel = 0.76 ; From 46e51ecd97e60b775faab7f4217f029b40e26749 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 16 Dec 2019 14:16:07 -0800 Subject: [PATCH 16/29] Minor formatting updates to default parameter file, updated sorting tool to accept new ageco history dimension. --- parameter_files/fates_params_default.cdl | 62 ++++++++++++------------ tools/ncvarsort.py | 25 +++++----- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 92b49329ae..d3322c9c69 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -4,7 +4,7 @@ dimensions: fates_history_age_bins = 7 ; fates_history_height_bins = 6 ; fates_history_size_bins = 13 ; - fates_history_coage_bins = - ; + fates_history_coage_bins = 1 ; fates_hydr_organs = 4 ; fates_leafage_class = 1 ; fates_litterclass = 6 ; @@ -16,15 +16,15 @@ 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" ; - 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" ; char fates_pftname(fates_pft, fates_string_length) ; fates_pftname:units = "unitless - string" ; fates_pftname:long_name = "Description of plant type" ; @@ -301,18 +301,6 @@ variables: double fates_mort_bmort(fates_pft) ; fates_mort_bmort:units = "1/yr" ; fates_mort_bmort:long_name = "background mortality rate" ; - double fates_mort_ip_senescence(fates_pft); - fates_mort_ip_senescence:units = "dbh cm"; - fates_mort_ip_senescence:long_name ="Mortality dbh senescence inflection point"; - double fates_mort_r_senescence(fates_pft); - fates_mort_r_senescence:units = "mortality rate dbh^-1"; - fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change"; - 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"; - 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"; double fates_mort_freezetol(fates_pft) ; fates_mort_freezetol:units = "NA" ; fates_mort_freezetol:long_name = "minimum temperature tolerance (NOT USED)" ; @@ -322,6 +310,18 @@ variables: double fates_mort_hf_sm_threshold(fates_pft) ; fates_mort_hf_sm_threshold:units = "unitless" ; 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" ; + double fates_mort_ip_senescence(fates_pft) ; + fates_mort_ip_senescence:units = "dbh cm" ; + fates_mort_ip_senescence:long_name = "Mortality dbh senescence inflection point" ; + 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" ; + double fates_mort_r_senescence(fates_pft) ; + fates_mort_r_senescence:units = "mortality rate dbh^-1" ; + fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change" ; 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" ; @@ -529,12 +529,12 @@ variables: 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_fusion_tol ; fates_cohort_fusion_tol:units = "unitless" ; fates_cohort_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; - 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_comp_excln ; fates_comp_excln:units = "none" ; fates_comp_excln:long_name = "weighting factor (exponent on dbh) for canopy layer exclusion and promotion" ; @@ -671,13 +671,13 @@ 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_history_coageclass_bin_edges = - ; - fates_pftname = "broadleaf_evergreen_tropical_tree ", "needleleaf_evergreen_extratrop_tree ", @@ -978,14 +978,6 @@ fates_history_coageclass_bin_edges = - ; 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_ip_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; - - fates_mort_r_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; - - fates_mort_ip_age_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; - - fates_mort_r_age_senescence = -, -, -, -, -, -, -, -, -, -, -, - ; - fates_mort_freezetol = 2.5, -55, -80, -30, 2.5, -30, -60, -10, -80, -80, -20, 2.5 ; @@ -995,6 +987,14 @@ fates_history_coageclass_bin_edges = - ; fates_mort_hf_sm_threshold = 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06 ; + fates_mort_ip_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_mort_ip_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_mort_r_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + + fates_mort_r_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_mort_scalar_coldstress = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ; fates_mort_scalar_cstarvation = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, @@ -1218,9 +1218,9 @@ fates_history_coageclass_bin_edges = - ; fates_canopy_closure_thresh = 0.8 ; - fates_cohort_fusion_tol = 0.08 ; + fates_cohort_age_fusion_tol = _ ; - fates_cohort_age_fusion_tol = - ; + fates_cohort_fusion_tol = 0.08 ; fates_comp_excln = 3 ; diff --git a/tools/ncvarsort.py b/tools/ncvarsort.py index 8bacdf0132..3f0f3a3a47 100755 --- a/tools/ncvarsort.py +++ b/tools/ncvarsort.py @@ -35,18 +35,19 @@ def main(): # sort the variables by dimensionality, but mix the PFT x other dimension in with the regular PFT-indexed variables dimtype_sortorder_dict = { (u'fates_history_age_bins',):0, - (u'fates_history_height_bins',):1, - (u'fates_history_size_bins',):2, - (u'fates_pft', u'fates_string_length'):3, - (u'fates_prt_organs', u'fates_string_length'):4, - (u'fates_pft',):5, - (u'fates_variants', u'fates_pft'):5, - (u'fates_hydr_organs', u'fates_pft'):5, - (u'fates_leafage_class', u'fates_pft'):5, - (u'fates_prt_organs', u'fates_pft'):5, - (u'fates_litterclass',):6, - (u'fates_NCWD',):7, - ():8} + (u'fates_history_coage_bins',):1, + (u'fates_history_height_bins',):2, + (u'fates_history_size_bins',):3, + (u'fates_pft', u'fates_string_length'):4, + (u'fates_prt_organs', u'fates_string_length'):5, + (u'fates_pft',):6, + (u'fates_variants', u'fates_pft'):6, + (u'fates_hydr_organs', u'fates_pft'):6, + (u'fates_leafage_class', u'fates_pft'):6, + (u'fates_prt_organs', u'fates_pft'):6, + (u'fates_litterclass',):7, + (u'fates_NCWD',):8, + ():9} # # go through each of the variables and assign it to one of the sub-lists based on its dimensionality for v_name, varin in dsin.variables.iteritems(): From b080b80f1592a2ed9a663db02965cb421a19ed93 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 16 Dec 2019 14:24:04 -0800 Subject: [PATCH 17/29] tweaked some age parameter metadata and naming conventions --- parameter_files/fates_params_default.cdl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index d3322c9c69..a4ceb301fc 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -531,10 +531,10 @@ variables: 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_fusion_tol ; - fates_cohort_fusion_tol:units = "unitless" ; - fates_cohort_fusion_tol:long_name = "minimum fraction in difference in dbh between cohorts" ; + 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 = "weighting factor (exponent on dbh) for canopy layer exclusion and promotion" ; From a121a6531d80e86ed96bc920a3edb94201311b78 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 16 Dec 2019 14:25:23 -0800 Subject: [PATCH 18/29] fixed omission of name change of fates_cohort_size_fusion_tol --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index a4ceb301fc..a48f511bc5 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1220,7 +1220,7 @@ data: fates_cohort_age_fusion_tol = _ ; - fates_cohort_fusion_tol = 0.08 ; + fates_cohort_size_fusion_tol = 0.08 ; fates_comp_excln = 3 ; From 2dadd0e09fd03cd9f2b986b736b3c4a62c972c03 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 16 Dec 2019 15:44:56 -0700 Subject: [PATCH 19/29] definition for nearzero --- main/EDParamsMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 5231e4c6d3..1e0269c189 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -4,6 +4,7 @@ module EDParamsMod ! use FatesConstantsMod, only : r8 => fates_r8 + use FatesConstantsMod, only : nearzero use FatesParametersInterface, only : param_string_length use FatesGlobals , only : fates_log use FatesGlobals , only : endrun => fates_endrun From fb8db5425e2abaec3283103fc82e84aeed9d7c62 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 17 Dec 2019 11:19:05 -0700 Subject: [PATCH 20/29] Updated name of fates_cohort_size_fusion_tol in EDParamsMod. --- main/EDParamsMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 1e0269c189..8f97d03064 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -1,4 +1,5 @@ module EDParamsMod + ! ! module that deals with reading the ED parameter file ! @@ -72,7 +73,7 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_phen_mindayson= "fates_phen_mindayson" character(len=param_string_length),parameter,public :: ED_name_phen_ncolddayslim= "fates_phen_ncolddayslim" character(len=param_string_length),parameter,public :: ED_name_phen_coldtemp= "fates_phen_coldtemp" - character(len=param_string_length),parameter,public :: ED_name_cohort_fusion_tol= "fates_cohort_fusion_tol" + 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" From 26ab287596c10cdbbd21ae8f704c81f3ab8a1652 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 17 Dec 2019 16:34:18 -0800 Subject: [PATCH 21/29] Added cg strikes parameter to the default file --- main/EDParamsMod.F90 | 17 +++++++++++++++-- parameter_files/fates_params_default.cdl | 10 +++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 8f97d03064..986151a8fe 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -43,8 +43,14 @@ module EDParamsMod 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 - logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire + + logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire + character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" + + real(r8), protected, public :: cg_strikes ! fraction of cloud to ground lightning strikes (0-1) + character(len=param_string_length),parameter :: fates_name_cg_strikes="fates_fire_cg_strikes" + real(r8),protected,public :: q10_mr ! Q10 for respiration rate (for soil fragmenation and plant respiration) (unitless) real(r8),protected,public :: q10_froz ! Q10 for frozen-soil respiration rates (for soil fragmentation) (unitless) @@ -78,7 +84,8 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_canopy_closure_thresh= "fates_canopy_closure_thresh" ! Resistance to active crown fire - character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" + + character(len=param_string_length),parameter :: fates_name_q10_mr="fates_q10_mr" character(len=param_string_length),parameter :: fates_name_q10_froz="fates_q10_froz" @@ -341,6 +348,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=fates_name_cg_strikes, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + end subroutine FatesRegisterParams @@ -471,6 +481,8 @@ subroutine FatesReceiveParams(fates_params) data=active_crown_fire_real) active_crown_fire = (abs(active_crown_fire_real-1.0_r8) Date: Wed, 18 Dec 2019 12:01:37 -0800 Subject: [PATCH 22/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index a32263026f..2be3b9f5ab 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -313,7 +313,7 @@ variables: 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" ; - double fates_mort_ip_senescence(fates_pft) ; + double fates_mort_ip_size_senescence(fates_pft) ; fates_mort_ip_senescence:units = "dbh cm" ; fates_mort_ip_senescence:long_name = "Mortality dbh senescence inflection point" ; double fates_mort_r_age_senescence(fates_pft) ; From 5633ce9ec43ae41f97c17d95958b2a07851ac7cb Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:01:48 -0800 Subject: [PATCH 23/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 2be3b9f5ab..f60ea32bd3 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -319,7 +319,7 @@ variables: 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" ; - double fates_mort_r_senescence(fates_pft) ; + double fates_mort_r_size_senescence(fates_pft) ; fates_mort_r_senescence:units = "mortality rate dbh^-1" ; fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change" ; double fates_mort_scalar_coldstress(fates_pft) ; From ceb94db67fd345deaf3265f4024d84ad9a01a607 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:02:09 -0800 Subject: [PATCH 24/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index f60ea32bd3..4c09640eb4 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -995,7 +995,7 @@ data: fates_mort_ip_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_mort_ip_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_mort_ip_size_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_mort_r_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; From 24824f5af99afb3872b75bb4fa13f706c8b4136a Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:02:17 -0800 Subject: [PATCH 25/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 4c09640eb4..705c741844 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -314,7 +314,7 @@ variables: fates_mort_ip_age_senescence:units = "years" ; fates_mort_ip_age_senescence:long_name = "Mortality cohort age senescence inflection point" ; double fates_mort_ip_size_senescence(fates_pft) ; - fates_mort_ip_senescence:units = "dbh cm" ; + fates_mort_ip_size_senescence:units = "dbh cm" ; fates_mort_ip_senescence:long_name = "Mortality dbh senescence inflection point" ; double fates_mort_r_age_senescence(fates_pft) ; fates_mort_r_age_senescence:units = "mortality rate year^-1" ; From ce4c4f83089525edab4c42a8dbb29a8755ec1296 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:02:24 -0800 Subject: [PATCH 26/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 705c741844..b247e38d19 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -320,7 +320,7 @@ variables: fates_mort_r_age_senescence:units = "mortality rate year^-1" ; fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change" ; double fates_mort_r_size_senescence(fates_pft) ; - fates_mort_r_senescence:units = "mortality rate dbh^-1" ; + fates_mort_r_size_senescence:units = "mortality rate dbh^-1" ; fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change" ; double fates_mort_scalar_coldstress(fates_pft) ; fates_mort_scalar_coldstress:units = "1/yr" ; From 1358282354a1b978eb64551e2d0ce07ecd2e50c6 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:02:34 -0800 Subject: [PATCH 27/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index b247e38d19..fbe56deefd 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -321,7 +321,7 @@ variables: fates_mort_r_age_senescence:long_name = "Mortality age senescence rate of change" ; double fates_mort_r_size_senescence(fates_pft) ; fates_mort_r_size_senescence:units = "mortality rate dbh^-1" ; - fates_mort_r_senescence:long_name = "Mortality dbh senescence rate of change" ; + fates_mort_r_size_senescence:long_name = "Mortality dbh senescence rate of change" ; 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" ; From 37f5735c28f3882cf3ed20551266c3a04cb48462 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:02:43 -0800 Subject: [PATCH 28/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index fbe56deefd..3f6fe86d07 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -315,7 +315,7 @@ variables: fates_mort_ip_age_senescence:long_name = "Mortality cohort age senescence inflection point" ; double fates_mort_ip_size_senescence(fates_pft) ; fates_mort_ip_size_senescence:units = "dbh cm" ; - fates_mort_ip_senescence:long_name = "Mortality dbh senescence inflection point" ; + fates_mort_ip_size_senescence:long_name = "Mortality dbh senescence inflection point" ; 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" ; From 25ff0f6ead05316bfacc1c3831104bb703244452 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 18 Dec 2019 12:03:08 -0800 Subject: [PATCH 29/29] Update parameter_files/fates_params_default.cdl Co-Authored-By: Charlie Koven --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 3f6fe86d07..3573dd4feb 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -999,7 +999,7 @@ data: fates_mort_r_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_mort_r_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_mort_r_size_senescence = _, _, _, _, _, _, _, _, _, _, _, _ ; fates_mort_scalar_coldstress = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ;