Skip to content

Commit

Permalink
Merge branch 'hist_time_mid_of_time_bounds' into zerothtstep
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Nov 15, 2024
2 parents c7e1366 + ea91981 commit f85104b
Show file tree
Hide file tree
Showing 13 changed files with 292 additions and 46 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ d866510188d26d51bcd6d37239283db690af7e82
e096358c832ab292ddfd22dd5878826c7c788968
475831f0fb0e31e97f630eac4e078c886558b61c
fd5f177131d63d39e79a13918390bdfb642d781e
a51816e0de380300b69db9fc3e2c7fa83b267b64
# Ran SystemTests and python/ctsm through black python formatter
5364ad66eaceb55dde2d3d598fe4ce37ac83a93c
8056ae649c1b37f5e10aaaac79005d6e3a8b2380
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
fxtag = sci.1.78.3_api.36.1.0
fxtag = sci.1.79.3_api.37.0.0
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
Expand All @@ -44,15 +44,15 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
[submodule "rtm"]
path = components/rtm
url = https://github.com/ESCOMP/RTM
fxtag = rtm1_0_80
fxtag = rtm1_0_82
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/RTM

[submodule "mosart"]
path = components/mosart
url = https://github.com/ESCOMP/MOSART
fxtag = mosart1.1.02
fxtag = mosart1.1.04
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
Expand Down
45 changes: 33 additions & 12 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@
<status>FAIL</status>
<issue>#2454</issue>
</phase>
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>

<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_intel.clm-FatesColdHydro">
Expand All @@ -188,6 +192,13 @@
<issue>#2454</issue>
</phase>
</test>

<test name="ERS_Ld60.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdST3">
<phase name="RUN">
<status>FAIL</status>
<issue>#2867</issue>
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.izumi_nag.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
Expand Down Expand Up @@ -270,21 +281,22 @@
</phase>
</test>

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.izumi_nag.clm-FatesColdTwoStream">
<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdTwoStreamNoCompFixedBioGeo">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>

<!-- izumi nag failures -->

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdTwoStreamNoCompFixedBioGeo">
<phase name="COMPARE_base_rest">
<test name="SMS_D.f10_f10_mg37.I1850Clm60BgcCrop.izumi_nag.clm-ciso_soil_matrixcn_only">
<phase name="RUN">
<status>FAIL</status>
<issue>#2325</issue>
<issue>#2861</issue>
</phase>
</test>

<!-- izumi nag failures -->
<test name="ERS_D_Ld5_Mmpi-serial.1x1_vancouverCAN.I1PtClm50SpRs.izumi_nag.clm-CLM1PTStartDate">
<phase name="RUN">
<status>FAIL</status>
Expand Down Expand Up @@ -334,13 +346,6 @@
</phase>
</test>

<test name="ERS_D_Mmpi-serial_Ld5.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesCold">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>

<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdHydro">
<phase name="RUN">
<status>FAIL</status>
Expand All @@ -361,6 +366,22 @@
<issue>#2810</issue>
</phase>
</test>

<test name="ERS_D_Mmpi-serial_Ld5.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesCold">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>


<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.izumi_nag.clm-FatesPRISM--clm-NEON-FATES-YELLO">
<phase name="RUN">
<status>FAIL</status>
<issue>#2861</issue>
</phase>
</test>


<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdLandUse">
<phase name="SHAREDLIB_BUILD">
Expand Down
4 changes: 2 additions & 2 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,7 @@
<option name="comment" >5x5_amazon grid with FATES and latest CLM</option>
</options>
</test>
<test name="ERS_D_Ld15" grid="f10_f10_mg37" compset="I2000Clm50FatesRs" testmods="clm/FatesColdSeedDisp">
<test name="ERS_D_Ld15" grid="5x5_amazon" compset="I2000Clm50FatesRs" testmods="clm/FatesColdSeedDisp">
<machines>
<machine name="derecho" compiler="gnu" category="fates"/>
</machines>
Expand All @@ -2688,7 +2688,7 @@
<option name="comment" >This test should be converted to an ERP test once the PEM version of this test is passing COMPARE_base_modpes. Also change to 5x5_amazon once ccs_config updated to allow it</option>
</options>
</test>
<test name="PEM_D_Ld15" grid="f10_f10_mg37" compset="I2000Clm50FatesRs" testmods="clm/FatesColdSeedDisp">
<test name="PEM_D_Ld15" grid="5x5_amazon" compset="I2000Clm50FatesRs" testmods="clm/FatesColdSeedDisp">
<machines>
<machine name="derecho" compiler="gnu" category="fates"/>
</machines>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
use_fates_ed_st3= .true.
hist_fexcl1 = 'FATES_ERROR_EL'
2 changes: 1 addition & 1 deletion components/rtm
162 changes: 162 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,166 @@
===============================================================
Tag name: ctsm5.3.014
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Fri 15 Nov 2024 01:24:45 PM MST
One-line Summary: Change history time to be the middle of the time bounds

Purpose and description of changes
----------------------------------

Making the change in order to be consistent with CAM and to make history output more intuitive.


Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm6_0

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed
----------
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
Partly addresses issue #1059

Notes of particular relevance for users
---------------------------------------
Caveats for users (e.g., need to interpolate initial conditions):
The history time variable now equals the middle of the time bounds.
Instantaneous history tapes now do not include time bounds.
Mixed history tapes do not change the treatment of instantaneous fields or move them to separate tapes, yet.


Notes of particular relevance for developers:
---------------------------------------------
Caveats for developers (e.g., code that is duplicated that requires double maintenance):

Changes to tests or testing:
This tag introduces changes to the mosart/rtm testlists.

Testing summary:
----------------

[PASS means all tests PASS; OK means tests PASS other than expected fails.]

python testing (if python code has changed; see instructions in python/README.md; document testing done):

derecho -

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

mosart
derecho ----- OK
izumi ------- OK

rtm
derecho ----- OK

any other testing (give details below):

ctsm_sci
derecho ----

If the tag used for baseline comparisons was NOT the previous tag, note that here:


Answer changes
--------------

Changes answers relative to baseline: Only time variable

Summarize any changes to answers, i.e.,
- what code configurations: all
- what platforms/compilers: all
- nature of change: only the time variable


Other details
-------------
List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
rtm, mosart

Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2838
https://github.com/ESCOMP/MOSART/pull/70
https://github.com/ESCOMP/RTM/issues/54
https://github.com/ESCOMP/MOSART/pull/106
https://github.com/ESCOMP/RTM/pull/39

===============================================================
===============================================================
Tag name: ctsm5.3.012
Originator(s): afoster (Adrianna Foster,UCAR/TSS,303-497-1728)
Date: Wed 13 Nov 2024 09:53:51 AM MST
One-line Summary: update fates tag

Purpose and description of changes
----------------------------------

Updates FATES tag to latest fates main (sci.1.79.3_api.37.0.0), and updates API to go
along with latest FATES update to refactor it's fire equations


Significant changes to scientifically-supported configurations
--------------------------------------------------------------


[ ] clm6_0

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5






Testing summary:
----------------

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

fates tests:
derecho ----- OK
izumi ------- OK


Answer changes
--------------

Changes answers relative to baseline:

Round-off differences for FATES compsets where fire is active.
NLCOMP differences for some FATES compsets


Pull Requests that document the changes (include PR ids):
- ESCOMP/CTSM#2782: Fates fuel refactor (https://github.com/ESCOMP/CTSM/pull/2782)

===============================================================
===============================================================
Tag name: ctsm5.3.011
Originator(s): samrabin (Sam Rabin, UCAR/TSS, [email protected])
Date: Mon Nov 11 17:55:57 MST 2024
Expand Down
2 changes: 2 additions & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.3.014 slevis 11/18/2024 Change history time to be the middle of the time bounds
ctsm5.3.012 afoster 11/13/2024 update fates tag
ctsm5.3.011 samrabin 11/11/2024 Improve handling of cold-start finidat
ctsm5.3.010 afoster 11/09/2024 Merge b4b-dev
ctsm5.3.009 samrabin 10/15/2024 Reduce outputs from matrixcnOn tests
Expand Down
34 changes: 30 additions & 4 deletions python/ctsm/crop_calendars/cropcal_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,7 @@ def import_output(
)

# Convert time axis to integer year, saving original as 'cftime'
this_ds_gs = this_ds_gs.assign_coords(
{"cftime": this_ds["time_bounds"].isel({"hist_interval": 0})}
)
this_ds_gs = this_ds_gs.assign_coords({"time": [t.year for t in this_ds_gs["cftime"].values]})
this_ds_gs = convert_time_to_int_year(filename, this_ds, this_ds_gs)

# Get number of harvests
this_ds_gs["NHARVESTS"] = (this_ds_gs["GDDHARV_PERHARV"] > 0).sum(dim="mxharvests")
Expand All @@ -458,6 +455,35 @@ def import_output(
return this_ds_gs, any_bad


def convert_time_to_int_year(filename, this_ds, this_ds_gs):
"""
Convert time axis to integer year, saving original as 'cftime'
"""
if "time_bounds" in this_ds:
# Always true before PR #2838, when even files with all instantaneous variables got
# time_bounds saved. After that PR (and before the segregation of instantaneous and other
# variables onto separate files), files with an instantaneous variable first in their list
# do not get time_bounds saved.
this_ds_gs = this_ds_gs.assign_coords(
{"cftime": this_ds["time_bounds"].isel({"hist_interval": 0})}
)
this_ds_gs = this_ds_gs.assign_coords(
{"time": [t.year for t in this_ds_gs["cftime"].values]}
)
elif this_ds["time"].attrs["long_name"] == "time at end of time step":
# This is an "instantaneous file."
this_ds_gs = this_ds_gs.assign_coords({"cftime": this_ds["time"]})
this_ds_gs = this_ds_gs.assign_coords(
{"time": [t.year - 1 for t in this_ds_gs["cftime"].values]}
)
else:
raise RuntimeError(
f"{filename} is neither an instantaneous nor a combined/non-instantaneous file."
)

return this_ds_gs


def handle_zombie_crops(this_ds):
"""
When doing transient runs, it's somehow possible for crops in newly-active patches to be
Expand Down
2 changes: 1 addition & 1 deletion src/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
Loading

0 comments on commit f85104b

Please sign in to comment.