Skip to content

Commit

Permalink
Merge branch 'lnd/fates-api37' (PR E3SM-Project#6762)
Browse files Browse the repository at this point in the history
Updates fates to API37 per a fates-side fire refactor which renames and moves `nfsc`.
This updates the fates tag with a number of fates-side fixes and feature updates so
fates tests will be answer changing.

Fixes E3SM-Project#6806
[non-B4B] for fates tests
  • Loading branch information
bishtgautam committed Jan 10, 2025
2 parents 91c0d47 + f7267be commit 13abf59
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/elm/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ Allowed values are:
5 : use gross domestic production and population datasets to simulate anthropogenic fire supression
</entry>

<entry id="fates_harvest_mode" type="char*18" category="physics"
<entry id="fates_harvest_mode" type="char*256" category="physics"
group="elm_inparm"
valid_values="no_harvest,event_code,landuse_timeseries,luhdata_area,luhdata_mass" >
Set FATES harvesting mode by setting fates_harvest_mode
Expand Down
2 changes: 1 addition & 1 deletion components/elm/src/external_models/fates
Submodule fates updated 57 files
+13 −0 .gitmodules
+9 −8 biogeochem/EDCohortDynamicsMod.F90
+23 −20 biogeochem/EDLoggingMortalityMod.F90
+138 −183 biogeochem/EDPatchDynamicsMod.F90
+70 −62 biogeochem/EDPhysiologyMod.F90
+0 −12 biogeochem/FatesLitterMod.F90
+58 −41 biogeochem/FatesPatchMod.F90
+2 −1 biogeochem/FatesSoilBGCFluxMod.F90
+2 −0 fire/CMakeLists.txt
+63 −0 fire/FatesFuelClassesMod.F90
+379 −0 fire/FatesFuelMod.F90
+2 −1 fire/SFFireWeatherMod.F90
+161 −295 fire/SFMainMod.F90
+3 −2 fire/SFNesterovMod.F90
+20 −25 fire/SFParamsMod.F90
+135 −2 main/ChecksBalancesMod.F90
+31 −15 main/EDInitMod.F90
+18 −2 main/EDMainMod.F90
+132 −19 main/EDTypesMod.F90
+86 −55 main/FatesHistoryInterfaceMod.F90
+6 −6 main/FatesInterfaceMod.F90
+4 −4 main/FatesInventoryInitMod.F90
+54 −13 main/FatesRestartInterfaceMod.F90
+1 −1 parameter_files/patch_default_bciopt224.xml
+3 −1 testing/CMakeLists.txt
+97 −0 testing/README.testing.md
+115 −108 testing/build_fortran_tests.py
+122 −0 testing/cime_setup.md
+20 −0 testing/functional_class.py
+4 −13 testing/functional_testing/allometry/FatesTestAllometry.F90
+0 −187 testing/functional_testing/allometry/allometry_plotting.py
+195 −0 testing/functional_testing/allometry/allometry_test.py
+28 −0 testing/functional_testing/fire/CMakeLists.txt
+274 −0 testing/functional_testing/fire/FatesTestFireMod.F90
+123 −0 testing/functional_testing/fire/FatesTestFuel.F90
+413 −0 testing/functional_testing/fire/SyntheticFuelModels.F90
+187 −0 testing/functional_testing/fire/fuel_test.py
+0 −52 testing/functional_testing/math_utils/math_plotting.py
+75 −0 testing/functional_testing/math_utils/math_utils_test.py
+20 −0 testing/functional_tests.cfg
+38 −25 testing/path_utils.py
+269 −288 testing/run_functional_tests.py
+143 −0 testing/run_unit_tests.py
+14 −0 testing/testing.yml
+1 −0 testing/testing_shr/CMakeLists.txt
+36 −0 testing/testing_shr/FatesArgumentUtils.F90
+40 −1 testing/testing_shr/FatesUnitTestIOMod.F90
+6 −0 testing/unit_testing/fire_fuel_test/CMakeLists.txt
+100 −0 testing/unit_testing/fire_fuel_test/test_FireFuel.pf
+5 −0 testing/unit_tests.cfg
+197 −32 testing/utils.py
+1 −0 tools/landusedata
+0 −55 tools/luh2/README.md
+0 −11 tools/luh2/conda-luh2.yml
+0 −146 tools/luh2/luh2.py
+0 −57 tools/luh2/luh2.sh
+0 −254 tools/luh2/luh2mod.py
2 changes: 1 addition & 1 deletion components/elm/src/main/elm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ module elm_varctl

logical, public :: use_fates = .false. ! true => use ED
integer, public :: fates_spitfire_mode = 0 ! 0 for no fire; 1 for constant ignitions
character(len=13), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist_definitions
character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist_definitions
logical, public :: use_fates_fixed_biogeog = .false. ! true => use fixed biogeography mode
logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro
logical, public :: use_fates_cohort_age_tracking = .false. ! true => turn on cohort age tracking
Expand Down
6 changes: 3 additions & 3 deletions components/elm/src/main/elmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3517,7 +3517,7 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)
use FatesInterfaceTypesMod, only : nlevage_fates => nlevage
use FatesInterfaceTypesMod, only : nlevheight_fates => nlevheight
use FatesInterfaceTypesMod, only : nlevdamage_fates => nlevdamage
use FatesLitterMod, only : nfsc_fates => nfsc
use FatesFuelClassesMod, only : nfc_fates => num_fuel_classes
use FatesLitterMod, only : ncwd_fates => ncwd
use EDParamsMod, only : nlevleaf_fates => nlevleaf
use EDParamsMod, only : nclmax_fates => nclmax
Expand Down Expand Up @@ -3555,7 +3555,7 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)
fates%sizeage_class_end = nlevsclass_fates * nlevage_fates

fates%fuel_begin = 1
fates%fuel_end = nfsc_fates
fates%fuel_end = nfc_fates

fates%cdpf_begin = 1
fates%cdpf_end = nlevdamage_fates * numpft_fates * nlevsclass_fates
Expand Down Expand Up @@ -3606,7 +3606,7 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)
fates%coage_class_end = nlevcoage

fates%agefuel_begin = 1
fates%agefuel_end = nlevage_fates * nfsc_fates
fates%agefuel_end = nlevage_fates * nfc_fates

fates%landuse_begin = 1
fates%landuse_end = n_landuse_cats
Expand Down
10 changes: 5 additions & 5 deletions components/elm/src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module histFileMod
use FatesInterfaceTypesMod , only : nlevheight_fates => nlevheight
use FatesInterfaceTypesMod , only : nlevdamage_fates => nlevdamage
use FatesInterfaceTypesMod , only : nlevcoage
use FatesLitterMod , only : nfsc_fates => nfsc
use FatesFuelClassesMod , only : nfc_fates => num_fuel_classes
use FatesConstantsMod , only : n_landuse_cats
use FatesLitterMod , only : ncwd_fates => ncwd
use FatesInterfaceTypesMod , only : numpft_fates => numpft
Expand Down Expand Up @@ -1933,7 +1933,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_fates, dimid)
call ncd_defdim(lnfid, 'fates_levfuel', nfsc_fates, dimid)
call ncd_defdim(lnfid, 'fates_levfuel', nfc_fates, dimid)
call ncd_defdim(lnfid, 'fates_levcwdsc', ncwd_fates, dimid)
call ncd_defdim(lnfid, 'fates_levscpf', nlevsclass_fates*numpft_fates, dimid)
call ncd_defdim(lnfid, 'fates_levcapf', nlevcoage*numpft_fates, dimid)
Expand All @@ -1951,7 +1951,7 @@ subroutine htape_create (t, histrest)
call ncd_defdim(lnfid, 'fates_levelpft', nelements_fates * numpft_fates, dimid)
call ncd_defdim(lnfid, 'fates_levelcwd', nelements_fates * ncwd_fates, dimid)
call ncd_defdim(lnfid, 'fates_levelage', nelements_fates * nlevage_fates, dimid)
call ncd_defdim(lnfid, 'fates_levagefuel', nlevage_fates * nfsc_fates, dimid)
call ncd_defdim(lnfid, 'fates_levagefuel', nlevage_fates * nfc_fates, dimid)
call ncd_defdim(lnfid, 'fates_levlanduse', n_landuse_cats, dimid)
call ncd_defdim(lnfid, 'fates_levlulu', n_landuse_cats * n_landuse_cats, dimid)
end if
Expand Down Expand Up @@ -4796,7 +4796,7 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out,
case ('fates_levelage')
num2d = nelements_fates*nlevage_fates
case ('fates_levagefuel')
num2d = nlevage_fates*nfsc_fates
num2d = nlevage_fates*nfc_fates
case('cft')
if (cft_size > 0) then
num2d = cft_size
Expand Down Expand Up @@ -4842,7 +4842,7 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out,
case ('fates_levage')
num2d = nlevage_fates
case ('fates_levfuel')
num2d = nfsc_fates
num2d = nfc_fates
case ('fates_levcwdsc')
num2d = ncwd_fates
case ('fates_levscpf')
Expand Down

0 comments on commit 13abf59

Please sign in to comment.