Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATES API update for SPITFIRE refactor #6762

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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