From e5cd91bb7e17e98fc1f6c09e5af844dd4c05efe8 Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Thu, 19 Sep 2024 10:59:02 +0200 Subject: [PATCH 01/13] merge conflicts on pftvarcon file --- main/EDPftvarcon.F90 | 12 ++++++++++++ parameter_files/fates_params_default.cdl | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 07c7922751..84f204d67c 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -287,6 +287,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) + real(r8), allocatable :: wesley_pft_index_fordrydep + + contains procedure, public :: Init => EDpftconInit procedure, public :: Register @@ -828,6 +831,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_wesley_pft_index_fordrydep' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + ! adding the hlm_pft_map variable with two dimensions - FATES PFTno and HLM PFTno pftmap_dim_names(1) = dimension_name_pft pftmap_dim_names(2) = dimension_name_hlm_pftno @@ -1292,6 +1299,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetrieveParameterAllocate(name=name, & data=this%eca_lambda_ptase) + name = 'fates_wesley_pft_index_fordrydep' + call fates_params%RetrieveParameterAllocate(name=name, & + data=this%wesley_pft_index_fordrydep) + name = 'fates_hlm_pft_map' call fates_params%RetrieveParameterAllocate(name=name, & data=this%hlm_pft_map) @@ -1805,6 +1816,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'hydro_pinot_node = ',EDPftvarcon_inst%hydr_pinot_node write(fates_log(),fmt0) 'hydro_kmax_node = ',EDPftvarcon_inst%hydr_kmax_node write(fates_log(),fmt0) 'hlm_pft_map = ', EDPftvarcon_inst%hlm_pft_map + write(fates_log(),fmt0) 'wesley_pft_index_fordrydep = ', EDPftvarcon_inst%wesley_pft_index_fordrydep write(fates_log(),fmt0) 'hydro_vg_alpha_node = ',EDPftvarcon_inst%hydr_vg_alpha_node write(fates_log(),fmt0) 'hydro_vg_m_node = ',EDPftvarcon_inst%hydr_vg_m_node write(fates_log(),fmt0) 'hydro_vg_n_node = ',EDPftvarcon_inst%hydr_vg_n_node diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 90a2e3f3cb..d51253bf95 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -678,6 +678,9 @@ variables: double fates_hlm_pft_map(fates_hlm_pftno, fates_pft) ; fates_hlm_pft_map:units = "area fraction" ; fates_hlm_pft_map:long_name = "In fixed biogeog mode, fraction of HLM area associated with each FATES PFT" ; + double fates_wesley_pft_index_fordrydep(fates_pft) ; + fates_wesley_pft_index_fordrydep:units = 'integer index' + fates_wesley_pft_index_fordrydep:long_name = "index to map from fates pfts into the wesley pft space used to determing dry deposition veolcity. double fates_fire_FBD(fates_litterclass) ; fates_fire_FBD:units = "kg Biomass/m3" ; fates_fire_FBD:long_name = "fuel bulk density" ; @@ -1692,6 +1695,8 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; + fates_wesley_pft_index_fordrydep = 1, 2, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12 ; + fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; From ed1c87da963b08c005271391d3c12a7fb29bc165 Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Thu, 19 Sep 2024 11:21:00 +0200 Subject: [PATCH 02/13] merge conflicts in main/FatesInterfaceMod.F90 --- main/FatesInterfaceMod.F90 | 4 ++-- main/FatesInterfaceTypesMod.F90 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 7e2e017d87..1f5d706650 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -393,8 +393,7 @@ subroutine zero_bcs(fates,s) fates%bc_out(s)%dleaf_pa(:) = 0.0_r8 fates%bc_out(s)%nocomp_pft_label_pa(:) = 0 fates%bc_out(s)%nocomp_MEGAN_pft_label_pa(:) = 0 - - + fates%bc_out(s)%wesley_pft_label_pa(:) = 0 fates%bc_out(s)%canopy_fraction_pa(:) = 0.0_r8 fates%bc_out(s)%frac_veg_nosno_alb_pa(:) = 0.0_r8 @@ -723,6 +722,7 @@ subroutine allocate_bcout(bc_out, nlevsoil_in, nlevdecomp_in) allocate(bc_out%nocomp_pft_label_pa(maxpatch_total)) allocate(bc_out%nocomp_MEGAN_pft_label_pa(maxpatch_total)) + allocate(bc_out%wesley_pft_label_pa(maxpatch_total)) ! Plant-Hydro BC's if (hlm_use_planthydro.eq.itrue) then diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index 0b84d89605..61ee49d428 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -753,6 +753,8 @@ module FatesInterfaceTypesMod ! [0,1] integer, allocatable :: nocomp_pft_label_pa(:) ! in nocomp and SP mode, each patch has a PFT identity. + integer, allocatable :: wesley_pft_label_pa(:) ! For dry deposition, each FATES PFT needs to correspond to a PFT from the 'wesley 1989' scheme + integer, allocatable :: nocomp_MEGAN_pft_label_pa(:) ! Index to map from FATES NOCOMP PFT identity into MEGAN PFT space. From 0923df3ffb297662ed2b2b35aed5f19afd9c8402 Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Thu, 19 Sep 2024 11:58:43 +0200 Subject: [PATCH 03/13] set the boundary conditions --- biogeochem/EDCanopyStructureMod.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index d41a4b98b4..a27c39ca8f 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -2002,6 +2002,8 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) total_canopy_area = total_canopy_area + bc_out(s)%canopy_fraction_pa(ifp) bc_out(s)%nocomp_pft_label_pa(ifp) = currentPatch%nocomp_pft_label + bc_out(s)%wesley_pft_label_pa(ifp) = currentPatch%EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) + if(currentPatch%nocomp_pft_label.gt.0)then bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = EDPftvarcon_inst%voc_pftindex(currentPatch%nocomp_pft_label) From 9e86f45db156cc13ad241c3af12afb2c86114773 Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Thu, 19 Sep 2024 16:12:53 +0200 Subject: [PATCH 04/13] more merge conflicts in main/EDPftvarcon.F90 --- biogeochem/EDCanopyStructureMod.F90 | 4 ++-- main/EDPftvarcon.F90 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index a27c39ca8f..f6da0b88ed 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -2002,8 +2002,8 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) total_canopy_area = total_canopy_area + bc_out(s)%canopy_fraction_pa(ifp) bc_out(s)%nocomp_pft_label_pa(ifp) = currentPatch%nocomp_pft_label - bc_out(s)%wesley_pft_label_pa(ifp) = currentPatch%EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) - + bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) + bc_out(s)%drydep_season_pa(ifp) = currentPatch%drydep_season if(currentPatch%nocomp_pft_label.gt.0)then bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = EDPftvarcon_inst%voc_pftindex(currentPatch%nocomp_pft_label) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 84f204d67c..794d628f67 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -287,7 +287,7 @@ 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) - real(r8), allocatable :: wesley_pft_index_fordrydep + real(r8), allocatable :: wesley_pft_index_fordrydep(:) contains From 6ed133e7b880fc39563e4f16bd918c2cd5e652a4 Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Fri, 20 Sep 2024 10:12:26 +0200 Subject: [PATCH 05/13] more merge conflicts in biogeochem/FatesPatchMod.F90 --- biogeochem/EDCanopyStructureMod.F90 | 3 +++ biogeochem/FatesPatchMod.F90 | 3 +++ main/EDTypesMod.F90 | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index f6da0b88ed..cf31eb66fd 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -2003,6 +2003,9 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) bc_out(s)%nocomp_pft_label_pa(ifp) = currentPatch%nocomp_pft_label bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) + ! THIS IS A PLACEHOLDE + currentPatch%drydep_season = 1 + bc_out(s)%drydep_season_pa(ifp) = currentPatch%drydep_season if(currentPatch%nocomp_pft_label.gt.0)then diff --git a/biogeochem/FatesPatchMod.F90 b/biogeochem/FatesPatchMod.F90 index 999bd73228..34ea6faf01 100644 --- a/biogeochem/FatesPatchMod.F90 +++ b/biogeochem/FatesPatchMod.F90 @@ -69,6 +69,7 @@ module FatesPatchMod integer :: land_use_label ! patch label for land use classification (primaryland, secondaryland, etc) real(r8) :: age_since_anthro_disturbance ! average age for secondary forest since last anthropogenic disturbance [years] logical :: changed_landuse_this_ts ! logical flag to track patches that have just undergone land use change [only used with nocomp and land use change] + integer :: drydep_season ! marker for the season according to the dry deposition code definitions. !--------------------------------------------------------------------------- @@ -447,6 +448,7 @@ subroutine NanValues(this) this%age_class = fates_unset_int this%area = nan this%countcohorts = fates_unset_int + this%drydep_season = fates_unset_int this%ncl_p = fates_unset_int this%land_use_label = fates_unset_int this%age_since_anthro_disturbance = nan @@ -949,6 +951,7 @@ subroutine Dump(this) write(fates_log(),*) 'pa%age_class = ',this%age_class write(fates_log(),*) 'pa%area = ',this%area write(fates_log(),*) 'pa%countcohorts = ',this%countcohorts + write(fates_log(),*) 'pa%drydep_season = ',this%drydep_season write(fates_log(),*) 'pa%ncl_p = ',this%ncl_p write(fates_log(),*) 'pa%total_canopy_area = ',this%total_canopy_area write(fates_log(),*) 'pa%total_tree_area = ',this%total_tree_area diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 10ef14734c..efeeefc047 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -1,4 +1,4 @@ -module EDTypesMod +smodule EDTypesMod use FatesConstantsMod, only : r8 => fates_r8 use FatesGlobals, only : endrun => fates_endrun From 18d5f12e0dffb254220fa8589a8127e9dfe6fe3f Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Fri, 20 Sep 2024 23:34:47 +0200 Subject: [PATCH 06/13] add drydep_season_pa to the fates interface, plus bugfixes --- main/EDTypesMod.F90 | 2 +- main/FatesInterfaceMod.F90 | 2 ++ main/FatesInterfaceTypesMod.F90 | 2 +- parameter_files/fates_params_default.cdl | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index efeeefc047..10ef14734c 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -1,4 +1,4 @@ -smodule EDTypesMod +module EDTypesMod use FatesConstantsMod, only : r8 => fates_r8 use FatesGlobals, only : endrun => fates_endrun diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 1f5d706650..27145d803f 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -394,6 +394,7 @@ subroutine zero_bcs(fates,s) fates%bc_out(s)%nocomp_pft_label_pa(:) = 0 fates%bc_out(s)%nocomp_MEGAN_pft_label_pa(:) = 0 fates%bc_out(s)%wesley_pft_label_pa(:) = 0 + fates%bc_out(s)%drydep_season_pa(:) = 0 fates%bc_out(s)%canopy_fraction_pa(:) = 0.0_r8 fates%bc_out(s)%frac_veg_nosno_alb_pa(:) = 0.0_r8 @@ -723,6 +724,7 @@ subroutine allocate_bcout(bc_out, nlevsoil_in, nlevdecomp_in) allocate(bc_out%nocomp_pft_label_pa(maxpatch_total)) allocate(bc_out%nocomp_MEGAN_pft_label_pa(maxpatch_total)) allocate(bc_out%wesley_pft_label_pa(maxpatch_total)) + allocate(bc_out%drydep_season_pa(maxpatch_total)) ! Plant-Hydro BC's if (hlm_use_planthydro.eq.itrue) then diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index 61ee49d428..e9ee32686a 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -754,7 +754,7 @@ module FatesInterfaceTypesMod integer, allocatable :: nocomp_pft_label_pa(:) ! in nocomp and SP mode, each patch has a PFT identity. integer, allocatable :: wesley_pft_label_pa(:) ! For dry deposition, each FATES PFT needs to correspond to a PFT from the 'wesley 1989' scheme - + integer, allocatable :: drydep_season_pa(:) ! For dry deposition, we need to define the season index, from 1-5, for the purposes of detrmining the deposition velocity parameters. See drydep code for details of season indices. integer, allocatable :: nocomp_MEGAN_pft_label_pa(:) ! Index to map from FATES NOCOMP PFT identity into MEGAN PFT space. diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index d51253bf95..63776f8e58 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -679,8 +679,8 @@ variables: fates_hlm_pft_map:units = "area fraction" ; fates_hlm_pft_map:long_name = "In fixed biogeog mode, fraction of HLM area associated with each FATES PFT" ; double fates_wesley_pft_index_fordrydep(fates_pft) ; - fates_wesley_pft_index_fordrydep:units = 'integer index' - fates_wesley_pft_index_fordrydep:long_name = "index to map from fates pfts into the wesley pft space used to determing dry deposition veolcity. + fates_wesley_pft_index_fordrydep:units = "integer index"; + fates_wesley_pft_index_fordrydep:long_name = "index to map from fates pfts into the wesley pft space used to determing dry deposition veolcity." ; double fates_fire_FBD(fates_litterclass) ; fates_fire_FBD:units = "kg Biomass/m3" ; fates_fire_FBD:long_name = "fuel bulk density" ; From 1972039b49c2f96eedb968dd26e76af7274a852f Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Thu, 3 Oct 2024 14:50:26 +0200 Subject: [PATCH 07/13] add new mapping for Wesley PFTs --- 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 63776f8e58..8337d5f9f8 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1695,7 +1695,7 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; - fates_wesley_pft_index_fordrydep = 1, 2, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12 ; + fates_wesley_pft_index_fordrydep = 4, 5, 5, 4, 4, 4, 11, 11, 11 ,3, 3, 3 ; fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; From 1cbf1767ba3180b8fd7f09a28d5a26add88c85b4 Mon Sep 17 00:00:00 2001 From: rosiealice Date: Thu, 10 Oct 2024 14:08:37 +0200 Subject: [PATCH 08/13] add initial value for drydep_season --- biogeochem/FatesPatchMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/biogeochem/FatesPatchMod.F90 b/biogeochem/FatesPatchMod.F90 index 34ea6faf01..af47c89372 100644 --- a/biogeochem/FatesPatchMod.F90 +++ b/biogeochem/FatesPatchMod.F90 @@ -757,7 +757,8 @@ subroutine Create(this, age, area, land_use_label, nocomp_pft, num_swb, num_pft, this%age_since_anthro_disturbance = fates_unset_r8 endif this%nocomp_pft_label = nocomp_pft - + this%drydep_season = 1 ! initialize season at summer time. + this%tr_soil_dir(:) = 1.0_r8 this%tr_soil_dif(:) = 1.0_r8 this%NCL_p = 1 From d91166081e23bd69e490b93f06537dc2ec9fafa2 Mon Sep 17 00:00:00 2001 From: rosiealice Date: Fri, 11 Oct 2024 17:16:03 +0200 Subject: [PATCH 09/13] modifictions to EDCanopyStructure to update drydep properties for all patches --- biogeochem/EDCanopyStructureMod.F90 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index cf31eb66fd..08c95e4b0f 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -1894,7 +1894,7 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) real(r8) :: total_canopy_area real(r8) :: total_patch_leaf_stem_area real(r8) :: weight ! Weighting for cohort variables in patch - + do s = 1,nsites ifp = 0 @@ -1904,7 +1904,8 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) bc_out(s)%dleaf_pa(:) = 0._r8 bc_out(s)%z0m_pa(:) = 0._r8 bc_out(s)%displa_pa(:) = 0._r8 - + bc_out(s)%drydep_season_pa(:) = 0 + bc_out(s)%wesley_pft_label_pa(:)=8 !for no vegetation. currentPatch => sites(s)%oldest_patch c = fcolumn(s) do while(associated(currentPatch)) @@ -1979,6 +1980,13 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) bc_out(s)%dleaf_pa(ifp) = EDPftvarcon_inst%dleaf(1) bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = 1 endif + + bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) + + ! THIS IS A PLACEHOLDER + currentPatch%drydep_season = 1 + bc_out(s)%drydep_season_pa(ifp) = 4 + ! ----------------------------------------------------------------------------- ! We are assuming here that grass is all located underneath tree canopies. @@ -2001,12 +2009,6 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) total_canopy_area = total_canopy_area + bc_out(s)%canopy_fraction_pa(ifp) - bc_out(s)%nocomp_pft_label_pa(ifp) = currentPatch%nocomp_pft_label - bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) - ! THIS IS A PLACEHOLDE - currentPatch%drydep_season = 1 - - bc_out(s)%drydep_season_pa(ifp) = currentPatch%drydep_season if(currentPatch%nocomp_pft_label.gt.0)then bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = EDPftvarcon_inst%voc_pftindex(currentPatch%nocomp_pft_label) @@ -2066,8 +2068,9 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) if(currentPatch%nocomp_pft_label.ne.nocomp_bareground)then ! for vegetated patches only ifp = ifp+1 bc_out(s)%canopy_fraction_pa(ifp) = bc_out(s)%canopy_fraction_pa(ifp)/total_patch_area - endif ! veg patch - + bc_out(s)%wesley_pft_label_pa(ifp)=8 + bc_out(s)%drydep_season_pa(ifp)=4 !winter season where there is bare ground + endif ! veg patch currentPatch => currentPatch%younger end do @@ -2087,7 +2090,6 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) ! Pass FATES Harvested C to bc_out. call UpdateHarvestC(sites(s),bc_out(s)) - end do ! This call to RecruitWaterStorage() makes an accounting of From cd793edc07bb5a090d73818a937c9ebe535e0be6 Mon Sep 17 00:00:00 2001 From: rosiealice Date: Fri, 11 Oct 2024 17:23:11 +0200 Subject: [PATCH 10/13] parameter file change --- 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 8337d5f9f8..4a3cf0be5d 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1695,7 +1695,7 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; - fates_wesley_pft_index_fordrydep = 4, 5, 5, 4, 4, 4, 11, 11, 11 ,3, 3, 3 ; + fates_wesley_pft_index_fordrydep = 4, 5, 5, 4, 4, 4, 11, 11, 11 ,3, 3, 3, 3, 3; fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; From b52edcfed5a6673f969769c17142dbd073804bb9 Mon Sep 17 00:00:00 2001 From: rosiealice Date: Wed, 16 Oct 2024 08:39:44 +0200 Subject: [PATCH 11/13] merge conflicts in biogeochem/FatesPatchMod.F90 --- biogeochem/FatesPatchMod.F90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/biogeochem/FatesPatchMod.F90 b/biogeochem/FatesPatchMod.F90 index af47c89372..05dfa6e2c7 100644 --- a/biogeochem/FatesPatchMod.F90 +++ b/biogeochem/FatesPatchMod.F90 @@ -69,7 +69,8 @@ module FatesPatchMod integer :: land_use_label ! patch label for land use classification (primaryland, secondaryland, etc) real(r8) :: age_since_anthro_disturbance ! average age for secondary forest since last anthropogenic disturbance [years] logical :: changed_landuse_this_ts ! logical flag to track patches that have just undergone land use change [only used with nocomp and land use change] - integer :: drydep_season ! marker for the season according to the dry deposition code definitions. + + !--------------------------------------------------------------------------- @@ -448,7 +449,6 @@ subroutine NanValues(this) this%age_class = fates_unset_int this%area = nan this%countcohorts = fates_unset_int - this%drydep_season = fates_unset_int this%ncl_p = fates_unset_int this%land_use_label = fates_unset_int this%age_since_anthro_disturbance = nan @@ -757,7 +757,6 @@ subroutine Create(this, age, area, land_use_label, nocomp_pft, num_swb, num_pft, this%age_since_anthro_disturbance = fates_unset_r8 endif this%nocomp_pft_label = nocomp_pft - this%drydep_season = 1 ! initialize season at summer time. this%tr_soil_dir(:) = 1.0_r8 this%tr_soil_dif(:) = 1.0_r8 @@ -952,7 +951,6 @@ subroutine Dump(this) write(fates_log(),*) 'pa%age_class = ',this%age_class write(fates_log(),*) 'pa%area = ',this%area write(fates_log(),*) 'pa%countcohorts = ',this%countcohorts - write(fates_log(),*) 'pa%drydep_season = ',this%drydep_season write(fates_log(),*) 'pa%ncl_p = ',this%ncl_p write(fates_log(),*) 'pa%total_canopy_area = ',this%total_canopy_area write(fates_log(),*) 'pa%total_tree_area = ',this%total_tree_area From 9e049a5fd533386ceab4efcb1896e037d7a588a9 Mon Sep 17 00:00:00 2001 From: rosiealice Date: Wed, 27 Nov 2024 14:10:50 +0100 Subject: [PATCH 12/13] added calculation of drydep season into FATES --- biogeochem/EDCanopyStructureMod.F90 | 43 +++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index 08c95e4b0f..4995b5d0ac 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -1877,7 +1877,7 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) use EDTypesMod , only : ed_site_type, AREA use FatesPatchMod, only : fates_patch_type use FatesInterfaceTypesMod , only : bc_out_type - + use FatesInterfaceTypesMod , only : hlm_day_of_year ! ! !ARGUMENTS integer, intent(in) :: nsites @@ -1981,12 +1981,45 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out) bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = 1 endif + ! Set patch properties for the HLM dry depositioin model + ! This wants to know the PFT according to the 'wesley' classification scheme + ! and the season according to the same scheme. bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) - - ! THIS IS A PLACEHOLDER - currentPatch%drydep_season = 1 - bc_out(s)%drydep_season_pa(ifp) = 4 + !wesely seasonal "index_season" + ! 1 - midsummer with lush vegetation + ! 2 - Autumn with unharvested cropland + ! 3 - Late autumn after frost, no snow + ! 4 - Winter, snow on ground and subfreezing + ! 5 - Transitional spring with partially green short annuals + if(bc_out(s)%tlai_pa(ifp) .gt. 2.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 1 ! Summer, or something like it. + else ! NOT SUMMER + if(sites(s)%lat>0)then ! Northern HS + if(hlm_day_of_year .lt. 180)then ! DOY + bc_out(s)%drydep_season_pa(ifp) = 5 ! NH spring + else ! autumn + if(bc_out(s)%tlai_pa(ifp) .gt. 1.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 2 ! NH early autumn + else + bc_out(s)%drydep_season_pa(ifp) = 3 ! NH late autumn + endif + endif ! DOY + else !Southern HS + if(hlm_day_of_year .gt. 180)then ! spring + bc_out(s)%drydep_season_pa(ifp) = 5 ! SH spring + else ! SH autumn + if(bc_out(s)%tlai_pa(ifp) .gt. 1.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 2 ! SH early autumn + else + bc_out(s)%drydep_season_pa(ifp) = 3 ! SH late autumn + endif ! autumn + endif ! DOY + endif ! Hemisphere + endif ! summer? + + + ! ----------------------------------------------------------------------------- ! We are assuming here that grass is all located underneath tree canopies. From 96c14dceb7ed714c3912e4241841385f427db4ab Mon Sep 17 00:00:00 2001 From: Rosie Fisher Date: Fri, 31 Jan 2025 12:22:07 +0100 Subject: [PATCH 13/13] Update z0mr parameters to CLM5vdefault values and add temporary increase to fluxes for BETs --- parameter_files/fates_params_default.cdl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 4a3cf0be5d..e1d6f9b905 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1371,16 +1371,16 @@ data: fates_leaf_slatop = 0.012, 0.005, 0.024, 0.009, 0.03, 0.03, 0.012, 0.03, 0.03, 0.01, 0.032, 0.027, 0.05, 0.05 ; - fates_leaf_stomatal_intercept = 10000, 10000, 10000, 10000, 10000, 10000, + fates_leaf_stomatal_intercept = 50000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 40000 ; - fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + fates_leaf_stomatal_slope_ballberry = 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, 4.7, 4.7, 4.7, 2.2, 5.3, 1.6 ; fates_leaf_vcmax25top = - 50, 62, 39, 61, 58, 58, 62, 54, 54, 38, 54, 86, 78, 78 ; + 60, 62, 39, 61, 58, 58, 62, 54, 54, 38, 54, 86, 78, 78 ; fates_leaf_vcmaxha = 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330 ; @@ -1656,8 +1656,8 @@ data: fates_turb_leaf_diameter = 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04 ; - fates_turb_z0mr = 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, 0.055, - 0.055, 0.055, 0.055, 0.055, 0.055, 0.055 ; + fates_turb_z0mr = 0.075, 0.055, 0.055, 0.075, 0.055, 0.055, 0.12, 0.12, + 0.12, 0.12, 0.12, 0.12, 0.12, 0.12 ; fates_turnover_branch = 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0 ;