From 636e003a602c01d63e98d1c37cb57dfcb2f4af73 Mon Sep 17 00:00:00 2001 From: Charles D Koven Date: Fri, 19 Jul 2024 14:32:09 -0700 Subject: [PATCH] read the grazing parameters --- main/EDParamsMod.F90 | 65 +++++++++++++++++++++++++++++++++++++++----- main/EDPftvarcon.F90 | 13 ++++++++- 2 files changed, 70 insertions(+), 8 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index b0763bbbde..d9d118183a 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -117,6 +117,13 @@ module EDParamsMod 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) + ! grazing parameters + real(r8),protected,public :: landuse_grazing_carbon_use_eff + real(r8),protected,public :: landuse_grazing_maxheight + real(r8),protected,public :: landuse_grazing_nitrogen_use_eff + real(r8),protected,public :: landuse_grazing_phosphorus_use_eff + real(r8),protected,public :: landuse_grazing_rate(n_landuse_cats) + ! Unassociated pft dimensioned free parameter that developers can use for testing arbitrary new hypotheses ! (THIS PARAMETER IS UNUSED, FEEL FREE TO USE IT FOR WHATEVER PURPOSE YOU LIKE. WE CAN ! HELP MIGRATE YOUR USAGE OF THE PARMETER TO A PERMANENT HOME LATER) @@ -287,12 +294,11 @@ module EDParamsMod character(len=param_string_length),parameter,public :: logging_name_export_frac ="fates_landuse_logging_export_frac" ! grazing-related parameters - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_palatability = "fates_landuse_grazing_palatability" - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_rate = "fates_landuse_grazing_rate" - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_carbon_use_eff = "fates_landuse_grazing_carbon_use_eff" - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_maxheight = "fates_landuse_grazing_maxheight" - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_nitrogen_use_eff = "fates_landuse_grazing_nitrogen_use_eff" - character(len=param_string_length),parameter,public :: ED_name_landuse_grazing_phosphorus_use_eff = "fates_landuse_grazing_phosphorus_use_eff" + character(len=param_string_length),parameter,public :: name_landuse_grazing_rate = "fates_landuse_grazing_rate" + character(len=param_string_length),parameter,public :: name_landuse_grazing_carbon_use_eff = "fates_landuse_grazing_carbon_use_eff" + character(len=param_string_length),parameter,public :: name_landuse_grazing_maxheight = "fates_landuse_grazing_maxheight" + character(len=param_string_length),parameter,public :: name_landuse_grazing_nitrogen_use_eff = "fates_landuse_grazing_nitrogen_use_eff" + character(len=param_string_length),parameter,public :: name_landuse_grazing_phosphorus_use_eff = "fates_landuse_grazing_phosphorus_use_eff" real(r8),protected,public :: eca_plant_escalar ! scaling factor for plant fine root biomass to ! calculate nutrient carrier enzyme abundance (ECA) @@ -377,6 +383,12 @@ subroutine FatesParamsInit() dev_arbitrary = nan damage_event_code = -9 damage_canopy_layer_code = -9 + landuse_grazing_carbon_use_eff = nan + landuse_grazing_nitrogen_use_eff = nan + landuse_grazing_phosphorus_use_eff = nan + landuse_grazing_maxheight = nan + landuse_grazing_rate(:) = nan + end subroutine FatesParamsInit !----------------------------------------------------------------------- @@ -580,7 +592,19 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=damage_name_canopy_layer_code, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) - + + call fates_params%RegisterParameter(name=name_landuse_grazing_carbon_use_eff, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + + call fates_params%RegisterParameter(name=name_landuse_grazing_maxheight, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + + call fates_params%RegisterParameter(name=name_landuse_grazing_nitrogen_use_eff, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + + call fates_params%RegisterParameter(name=name_landuse_grazing_phosporus_use_eff, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + ! non-scalar parameters call fates_params%RegisterParameter(name=ED_name_hydr_htftype_node, dimension_shape=dimension_shape_1d, & @@ -616,6 +640,8 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_max_nocomp_pfts_by_landuse, dimension_shape=dimension_shape_1d, & dimension_names=dim_names_landuse) + call fates_params%RegisterParameter(name=name_landuse_grazing_rate, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names_landuse) end subroutine FatesRegisterParams @@ -634,6 +660,7 @@ subroutine FatesReceiveParams(fates_params) real(r8), allocatable :: tmp_vector_by_landuse1(:) ! local real vector for changing type on read real(r8), allocatable :: tmp_vector_by_landuse2(:) ! local real vector for changing type on read real(r8), allocatable :: tmp_vector_by_landuse3(:) ! local real vector for changing type on read + real(r8), allocatable :: tmp_vector_by_landuse4(:) ! local real vector for changing type on read call fates_params%RetrieveParameter(name=ED_name_photo_temp_acclim_timescale, & data=photo_temp_acclim_timescale) @@ -869,6 +896,25 @@ subroutine FatesReceiveParams(fates_params) hydr_htftype_node(:) = nint(hydr_htftype_real(:)) deallocate(hydr_htftype_real) + call fates_params%RetrieveParameter(name=name_landuse_grazing_carbon_use_eff, & + data=landuse_grazing_carbon_use_eff) + + call fates_params%RetrieveParameter(name=name_landuse_grazing_nitrogen_use_eff, & + data=landuse_grazing_nitrogen_use_eff) + + call fates_params%RetrieveParameter(name=name_landuse_grazing_phosphorus_use_eff, & + data=landuse_grazing_phosphorus_use_eff) + + call fates_params%RetrieveParameter(name=name_landuse_grazing_maxheight, & + data=landuse_grazing_maxheight) + + call fates_params%RetrieveParameterAllocate(name=name_landuse_grazing_rate, & + data=tmp_vector_by_landuse4) + + landuse_grazing_rate(:) = tmp_vector_by_landuse4(:) + + deallocate(tmp_vector_by_landuse4) + end subroutine FatesReceiveParams ! ===================================================================================== @@ -939,6 +985,11 @@ subroutine FatesReportParams(is_master) write(fates_log(),'(a,L2)') 'active_crown_fire = ',active_crown_fire write(fates_log(),fmt0) 'damage_event_code = ',damage_event_code write(fates_log(),fmt0) 'damage_canopy_layer_code = ', damage_canopy_layer_code + write(fates_log(),fmt0) 'landuse_grazing_carbon_use_eff = ', landuse_grazing_carbon_use_eff + write(fates_log(),fmt0) 'name_landuse_grazing_nitrogen_use_eff = ', name_landuse_grazing_nitrogen_use_eff + write(fates_log(),fmt0) 'name_landuse_grazing_phosphorus_use_eff = ', name_landuse_grazing_phosphorus_use_eff + write(fates_log(),fmt0) 'name_landuse_grazing_maxheight = ', name_landuse_grazing_maxheight + write(fates_log(),fmt0) 'name_landuse_grazing_rate(:) = ', name_landuse_grazing_rate(:) write(fates_log(),*) '------------------------------------------------------' end if diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 8e10ebdcf7..4e7d267c95 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -286,6 +286,9 @@ module EDPftvarcon real(r8), allocatable :: landusechange_frac_exported(:) ! fraction of land use change-generated wood material that is exported to wood product (the remainder is either burned or goes to litter) real(r8), allocatable :: landusechange_pprod10(:) ! fraction of land use change wood product that goes to 10-year product pool (remainder goes to 100-year pool) + ! Grazing + real(r8), allocatable :: landuse_grazing_palatability(:) ! Relative intensity of leaf grazing/browsing per PFT (unitless 0-1) + contains procedure, public :: Init => EDpftconInit procedure, public :: Register @@ -818,7 +821,11 @@ subroutine Register_PFT(this, fates_params) name = 'fates_landuse_luc_pprod10' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - + + name = 'fates_landuse_grazing_palatability' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_dev_arbitrary_pft' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -1303,6 +1310,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetrieveParameterAllocate(name=name, & data=this%landusechange_pprod10) + name = 'fates_landuse_grazing_palatability' + call fates_params%RetrieveParameterAllocate(name=name, & + data=this%landuse_grazing_palatability) + end subroutine Receive_PFT !-----------------------------------------------------------------------