diff --git a/.gitmodules b/.gitmodules index 1571044487..25aedc1d40 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,7 +28,7 @@ [submodule "fates"] path = src/fates url = https://github.com/samsrabin/fates -fxtag = 60191cf4e5db9bea30170c35eb2f7ea1a6b90439 # isforest-20241016: Combine isforest functions into one. +fxtag = aa3b3b931bbb8199c21dd175fe2b2c9ddbf67d09 # edge-area-202410: Fix and rename edge forest bin variables. fxrequired = AlwaysRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/fates-release diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 24346a1f39..5982767e37 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -499,7 +499,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -/glade/u/home/samrabin/ctsm_fates-isforest/src/fates/parameter_files/fates_params_default.cdd58546a.nc +/glade/u/home/samrabin/ctsm_fates-isforest/src/fates/parameter_files/fates_params_default.5abc67356.nc diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm index 7ce530ca5d..c529e86927 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm @@ -63,4 +63,4 @@ hist_fincl1 = 'FATES_TLONGTERM', 'FATES_IS_FOREST_PCT10', 'FATES_IS_FOREST_PCT10_0GRASS', 'FATES_IS_FOREST_PCT25', 'FATES_IS_FOREST_PCT25_0GRASS', 'FATES_IS_FOREST_PCT50', 'FATES_IS_FOREST_PCT50_0GRASS', 'FATES_IS_FOREST_PCT75', 'FATES_IS_FOREST_PCT75_0GRASS', 'FATES_IS_FOREST_PCT90', -'FATES_IS_FOREST_PCT90_0GRASS' +'FATES_IS_FOREST_PCT90_0GRASS', 'FATES_FOREST_AREA_EB' diff --git a/src/fates b/src/fates index 60191cf4e5..aa3b3b931b 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit 60191cf4e5db9bea30170c35eb2f7ea1a6b90439 +Subproject commit aa3b3b931bbb8199c21dd175fe2b2c9ddbf67d09 diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 8ae4ace7e3..30c55f29be 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -25,6 +25,7 @@ module histFileMod use EDParamsMod , only : nclmax use EDParamsMod , only : nlevleaf use FatesInterfaceTypesMod , only : nlevsclass, nlevage, nlevcoage + use FatesInterfaceTypesMod , only : nlevedgeforest use FatesInterfaceTypesMod , only : nlevheight use FatesInterfaceTypesMod , only : nlevdamage use FatesConstantsMod , only : n_landuse_cats @@ -2500,6 +2501,7 @@ subroutine htape_create (t, histrest) call ncd_defdim(lnfid, 'fates_levcacls', nlevcoage, dimid) call ncd_defdim(lnfid, 'fates_levpft', numpft_fates, dimid) call ncd_defdim(lnfid, 'fates_levage', nlevage, dimid) + call ncd_defdim(lnfid, 'fates_levedge', nlevedgeforest, dimid) call ncd_defdim(lnfid, 'fates_levheight', nlevheight, dimid) call ncd_defdim(lnfid, 'fates_levfuel', nfsc, dimid) call ncd_defdim(lnfid, 'fates_levcwdsc', ncwd, dimid) @@ -3041,6 +3043,7 @@ subroutine htape_timeconst(t, mode) use FatesInterfaceTypesMod, only : fates_hdim_pfmap_levcapf use FatesInterfaceTypesMod, only : fates_hdim_camap_levcapf use FatesInterfaceTypesMod, only : fates_hdim_levage + use FatesInterfaceTypesMod, only : fates_hdim_levedge use FatesInterfaceTypesMod, only : fates_hdim_levheight use FatesInterfaceTypesMod, only : fates_hdim_levpft use FatesInterfaceTypesMod, only : fates_hdim_scmap_levscag @@ -3191,6 +3194,8 @@ subroutine htape_timeconst(t, mode) long_name='FATES cohort age index of the combined pft-cohort age dimension', units='-', ncid=nfid(t)) call ncd_defvar(varname='fates_levage',xtype=tape(t)%ncprec, dim1name='fates_levage', & long_name='FATES patch age (yr)', ncid=nfid(t)) + call ncd_defvar(varname='fates_levedge',xtype=tape(t)%ncprec, dim1name='fates_levedge', & + long_name='FATES edge number', ncid=nfid(t)) call ncd_defvar(varname='fates_levheight',xtype=tape(t)%ncprec, dim1name='fates_levheight', & long_name='FATES height (m)', ncid=nfid(t)) call ncd_defvar(varname='fates_levpft',xtype=ncd_int, dim1name='fates_levpft', & @@ -3304,6 +3309,7 @@ subroutine htape_timeconst(t, mode) call ncd_io(varname='fates_pftmap_levcapf',data=fates_hdim_pfmap_levcapf, ncid=nfid(t), flag='write') call ncd_io(varname='fates_camap_levcapf',data=fates_hdim_camap_levcapf, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levage',data=fates_hdim_levage, ncid=nfid(t), flag='write') + call ncd_io(varname='fates_levedge',data=fates_hdim_levedge, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levheight',data=fates_hdim_levheight, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levpft',data=fates_hdim_levpft, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levfuel',data=fates_hdim_levfuel, ncid=nfid(t), flag='write') @@ -5589,6 +5595,8 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out, num2d = numpft_fates case ('fates_levage') num2d = nlevage + case ('fates_levedge') + num2d = nlevedgeforest case ('fates_levheight') num2d = nlevheight case ('fates_levfuel') diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index e3e7644b90..b714dcd897 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -3284,6 +3284,7 @@ subroutine init_history_io(this,bounds_proc) use FatesIOVariableKindMod, only : site_elcwd_r8, site_elage_r8, site_agefuel_r8 use FatesIOVariableKindMod, only : site_cdpf_r8, site_cdsc_r8, site_clscpf_r8 use FatesIOVariableKindMod, only : site_landuse_r8, site_lulu_r8 + use FatesIOVariableKindMod, only : site_edgebin_r8 use FatesIODimensionsMod, only : fates_bounds_type @@ -3389,7 +3390,7 @@ subroutine init_history_io(this,bounds_proc) site_scagpft_r8, site_agepft_r8, site_elem_r8, site_elpft_r8, & site_elcwd_r8, site_elage_r8, site_agefuel_r8, & site_cdsc_r8, site_cdpf_r8, & - site_landuse_r8, site_lulu_r8) + site_landuse_r8, site_lulu_r8, site_edgebin_r8) d_index = fates_hist%dim_kinds(dk_index)%dim2_index @@ -3646,6 +3647,7 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates) use FatesIODimensionsMod, only : fates_bounds_type use FatesInterfaceTypesMod, only : nlevsclass, nlevage, nlevcoage + use FatesInterfaceTypesMod, only : nlevedgeforest use FatesInterfaceTypesMod, only : nlevheight use FatesInterfaceTypesMod, only : nlevdamage use FatesLitterMod, only : nfsc @@ -3687,6 +3689,9 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates) fates%age_class_begin = 1 fates%age_class_end = nlevage + fates%edgeforest_class_begin = 1 + fates%edgeforest_class_end = nlevedgeforest + fates%height_begin = 1 fates%height_end = nlevheight