Skip to content

Commit 20cf01f

Browse files
authored
Merge pull request #3777 from slevis-lmwg/merge-b4bdev-20260219
Merge b4bdev 20260219
2 parents 90bbcdb + 549d8fc commit 20cf01f

18 files changed

+635
-264
lines changed

bld/namelist_files/namelist_defaults_ctsm.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,11 +2497,11 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.4.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
24972497
<stream_fldfilename_urbantv phys="clm6_0" hgrid="0.9x1.25" urban_explicit_ac=".false."
24982498
>lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc</stream_fldfilename_urbantv>
24992499
<stream_fldfilename_urbantv phys="clm6_0" hgrid="0.9x1.25" urban_explicit_ac=".true."
2500-
>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc</stream_fldfilename_urbantv>
2500+
>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20260217.nc</stream_fldfilename_urbantv>
25012501
<stream_fldfilename_urbantv phys="clm5_0" hgrid="0.9x1.25" urban_explicit_ac=".false."
25022502
>lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc</stream_fldfilename_urbantv>
25032503
<stream_fldfilename_urbantv phys="clm5_0" hgrid="0.9x1.25" urban_explicit_ac=".true."
2504-
>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc</stream_fldfilename_urbantv>
2504+
>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20260217.nc</stream_fldfilename_urbantv>
25052505
<stream_fldfilename_urbantv phys="clm4_5" hgrid="0.9x1.25"
25062506
>lnd/clm2/urbandata/CLM45_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc</stream_fldfilename_urbantv>
25072507

@@ -2649,7 +2649,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.4.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
26492649
<use_prigent_roughness dust_emis_method="Leung_2023">.true.</use_prigent_roughness>
26502650
<use_prigent_roughness >.false.</use_prigent_roughness>
26512651
<stream_fldfilename_prigentroughness
2652-
>lnd/clm2/dustemisdata/Prigent_2005_roughness_0.25x0.25_cdf5_c240127.nc</stream_fldfilename_prigentroughness>
2652+
>lnd/clm2/dustemisdata/Prigent_2005_roughness_0.25x0.25_cdf5_c260218.nc</stream_fldfilename_prigentroughness>
26532653
<stream_meshfile_prigentroughness
26542654
>lnd/clm2/dustemisdata/dust_0.25x0.25_ESMFmesh_cdf5_c240222.nc</stream_meshfile_prigentroughness>
26552655

cime_config/config_archive.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
<rest_file_extension>r</rest_file_extension>
44
<rest_file_extension>rh\da</rest_file_extension>
55
<rest_file_extension>rh\di</rest_file_extension>
6-
<hist_file_extension>h\d*.*\.nc$</hist_file_extension>
7-
<hist_file_extension>lilac_hi.*\.nc$</hist_file_extension>
8-
<hist_file_extension>lilac_atm_driver_h\d*.*\.nc$</hist_file_extension>
6+
<!-- History files including those for LILAC, optionally include gzipped files which is needed for DART -->
7+
<hist_file_extension>h\d*.*\.nc(\.gz)?$</hist_file_extension>
8+
<hist_file_extension>lilac_hi.*\.nc(\.gz)?$</hist_file_extension>
9+
<hist_file_extension>lilac_atm_driver_h\d*.*\.nc(\.gz)?$</hist_file_extension>
910
<hist_file_extension>e</hist_file_extension>
1011
<rest_history_varname>locfnh</rest_history_varname>
1112
<rpointer>

doc/ChangeLog

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,114 @@
11
===============================================================
2+
Tag name: ctsm5.4.021
3+
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
4+
Date: Fri Feb 20 08:19:42 PM MST 2026
5+
One-line Summary: Bring b4b-dev to master
6+
7+
Purpose and description of changes
8+
----------------------------------
9+
10+
Some fixes to use the ifx compiler. Added handling of gzipped files in the short term archiver
11+
needed for DART. Use a CMake funciton for the PfUnit build. Make sure mksurfdata_esmf PIO library is
12+
used as shared in the build. Fix to a typo in the Technical Note.
13+
14+
Use pytest instead of unittest in our python unit test framework, which allows many modern features.
15+
One test file, test_unit_longitude.py, has been modified to use pytest's "parametrize" functionality as an example. Most of the changed lines in that file are just whitespace differences.
16+
17+
Existing run_ctsm_py_tests arguments have been ported to replicate the same functionality in pytest. Unknown arguments will be passed to pytest directly.
18+
19+
Also: Made it so that the tests can be called from anywhere in the checkout, instead of only python/.
20+
21+
Significant changes to scientifically-supported configurations
22+
--------------------------------------------------------------
23+
24+
Does this tag change answers significantly for any of the following physics configurations?
25+
(Details of any changes will be given in the "Answer changes" section below.)
26+
27+
[Put an [X] in the box for any configuration with significant answer changes.]
28+
29+
[ ] clm6_0
30+
31+
[ ] clm5_0
32+
33+
[ ] ctsm5_0-nwp
34+
35+
[ ] clm4_5
36+
37+
38+
Bugs fixed
39+
----------
40+
41+
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
42+
43+
Resolves #3762 by Bill Sacks ifx issues
44+
Resolves #3763 by Bill Sacks Floating invalid with ifx
45+
Resolves #3774 by Erik Kluzek NaN's in Prigent and urbantv streams
46+
Resolves #3082 by Kevin Raeder st_archive for DART
47+
Resolves #3616 by Sam Rabin convert python unittests to pytest
48+
Resolves #3035 by Keith Oleson typo in LW documentation in tech. note
49+
50+
Notes of particular relevance for users
51+
---------------------------------------
52+
53+
Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables):
54+
The Short Term archiver can now also save files that are g-zipped
55+
This is something that is needed for DART
56+
57+
Changes to the datasets (e.g., streams, surface or initial files):
58+
New Prigent and urbantv streams datasets with NaN's removed
59+
60+
Changes to documentation: Fix issue in tech. note
61+
62+
Notes of particular relevance for developers: regular
63+
---------------------------------------------
64+
65+
Caveats for developers (e.g., code that is duplicated that requires double maintenance):
66+
The ctsm_pylib conda environment changed! Rerun py_env_create to update it
67+
68+
Changes to tests or testing:
69+
Python unit test framework changed from unittest to pytest. So now pytest functionality can be used
70+
in tests
71+
72+
Testing summary: regular
73+
----------------
74+
[PASS means all tests PASS; OK means tests PASS other than expected fails.]
75+
76+
build-namelist tests (if CLMBuildNamelist.pm has changed):
77+
78+
derecho - OK
79+
80+
python testing (if python code has changed; see instructions in python/README.md; document testing done):
81+
82+
derecho - PASS
83+
84+
regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
85+
86+
derecho ----- OK
87+
izumi ------- OK
88+
89+
If the tag used for baseline comparisons was NOT the previous tag, note that here:
90+
91+
92+
Answer changes
93+
--------------
94+
95+
Changes answers relative to baseline: No bit-for-bit
96+
97+
Other details
98+
-------------
99+
100+
Pull Requests that document the changes (include PR ids):
101+
(https://github.com/ESCOMP/ctsm/pull)
102+
103+
#3765 Fixes for ifx, from Bill Sacks
104+
#3084 Added code to make st-archive handle DART files, from Kevin Raeder
105+
#3761 Use pytest instead of unittest in run_ctsm_py_tests, from Sam Rabin
106+
#3582 Use a CMake function provided by CIME, from Bill Sacks
107+
#3700 Fix mksurfdata CMakeLists.txt: use SHARED for .so PIO libraries, from Cooper DeVane-Prugh
108+
#3220 Tech Note: Distinguish between time step and iteration level in vegetation longwave and fluxes, from Keith Oleson
109+
110+
===============================================================
111+
===============================================================
2112
Tag name: ctsm5.4.020
3113
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
4114
Date: Thu Feb 19 08:28:59 AM MST 2026

doc/ChangeSum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Tag Who Date Summary
22
============================================================================================================================
3+
ctsm5.4.021 erik 02/20/2026 Bring b4b-dev to master
34
ctsm5.4.020 slevis 02/19/2026 Address carbon cycle and fire biases in CESM3 development runs by updating namelist defaults
45
ctsm5.4.019 samrabin 02/12/2026 Fix years used by generate_gdds
56
ctsm5.4.018 erik 02/12/2026 Quick fix so that we can use Nitrogen Deposition sent from the ATM model

doc/source/tech_note/Fluxes/CLM50_Tech_Note_Fluxes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ where :math:`\overrightarrow{S}_{v}` is the solar radiation absorbed by the vege
11471147
11481148
\Delta T_{v} =\frac{\overrightarrow{S}_{v} -\overrightarrow{L}_{v} -H_{v} -\lambda E_{v} }{\frac{\partial \overrightarrow{L}_{v} }{\partial T_{v} } +\frac{\partial H_{v} }{\partial T_{v} } +\frac{\partial \lambda E_{v} }{\partial T_{v} } }
11491149
1150-
where :math:`\Delta T_{v} =T_{v}^{n+1} -T_{v}^{n}` and the subscript "n" indicates the iteration.
1150+
where :math:`\Delta T_{v} =T_{v}^{k+1} -T_{v}^{k}` and the subscript "k" indicates the iteration.
11511151

11521152
The partial derivatives are
11531153

@@ -1227,9 +1227,9 @@ The numerical solution for vegetation temperature and the fluxes of momentum, se
12271227

12281228
#. Latent heat flux from vegetation :math:`\lambda E_{v}` (:eq:`5.101` )
12291229

1230-
#. If the latent heat flux has changed sign from the latent heat flux computed at the previous iteration (:math:`\lambda E_{v} ^{n+1} \times \lambda E_{v} ^{n} <0`), the latent heat flux is constrained to be 10% of the computed value. The difference between the constrained and computed value (:math:`\Delta _{1} =0.1\lambda E_{v} ^{n+1} -\lambda E_{v} ^{n+1}` ) is added to the sensible heat flux later.
1230+
#. If the latent heat flux has changed sign from the latent heat flux computed at the previous iteration (:math:`\lambda E_{v} ^{k+1} \times \lambda E_{v} ^{k} <0`), the latent heat flux is constrained to be 10% of the computed value. The difference between the constrained and computed value (:math:`\Delta _{1} =0.1\lambda E_{v} ^{k+1} -\lambda E_{v} ^{k+1}` ) is added to the sensible heat flux later.
12311231

1232-
#. Change in vegetation temperature :math:`\Delta T_{v}` (:eq:`5.129` ) and update the vegetation temperature as :math:`T_{v}^{n+1} =T_{v}^{n} +\Delta T_{v}`. :math:`T_{v}` is constrained to change by no more than 1°K in one iteration. If this limit is exceeded, the energy error is
1232+
#. Change in vegetation temperature :math:`\Delta T_{v}` (:eq:`5.129` ) and update the vegetation temperature as :math:`T_{v}^{k+1} =T_{v}^{k} +\Delta T_{v}`. :math:`T_{v}` is constrained to change by no more than 1°K in one iteration. If this limit is exceeded, the energy error is
12331233

12341234
.. math::
12351235
:label: 5.138
@@ -1269,7 +1269,7 @@ The error :math:`\lambda \Delta _{3}` is added to the sensible heat flux later.
12691269

12701270
#. Monin-Obukhov length :math:`L` (:eq:`5.49` )
12711271

1272-
#. The iteration is stopped after two or more steps if :math:`\tilde{\Delta }T_{v} <0.01` and :math:`\left|\lambda E_{v}^{n+1} -\lambda E_{v}^{n} \right|<0.1` where :math:`\tilde{\Delta }T_{v} =\max \left(\left|T_{v}^{n+1} -T_{v}^{n} \right|,\, \left|T_{v}^{n} -T_{v}^{n-1} \right|\right)`, or after forty iterations have been carried out.
1272+
#. The iteration is stopped after two or more steps if :math:`\tilde{\Delta }T_{v} <0.01` and :math:`\left|\lambda E_{v}^{k+1} -\lambda E_{v}^{k} \right|<0.1` where :math:`\tilde{\Delta }T_{v} =\max \left(\left|T_{v}^{k+1} -T_{v}^{k} \right|,\, \left|T_{v}^{k} -T_{v}^{k-1} \right|\right)`, or after forty iterations have been carried out.
12731273

12741274
#. Momentum fluxes :math:`\tau _{x}`, :math:`\tau _{y}` (:eq:`5.5`, :eq:`5.6`)
12751275

doc/source/tech_note/Radiative_Fluxes/CLM50_Tech_Note_Radiative_Fluxes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ where
141141
.. math::
142142
:label: 4.14
143143
144-
\begin{array}{l} {L_{vg} \, \uparrow =\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow } \\ {\qquad \qquad +\varepsilon _{v} \left[1+\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\right]\sigma \left(T_{v}^{n} \right)^{3} \left[T_{v}^{n} +4\left(T_{v}^{n+1} -T_{v}^{n} \right)\right]} \\ {\qquad \qquad +\varepsilon _{g} \left(1-\varepsilon _{v} \right)\sigma \left(T_{g}^{n} \right)^{4} } \\ {\qquad =\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow } \\ {\qquad \qquad +\varepsilon _{v} \sigma \left(T_{v}^{n} \right)^{4} } \\ {\qquad \qquad +\varepsilon _{v} \left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\sigma \left(T_{v}^{n} \right)^{4} } \\ {\qquad \qquad +4\varepsilon _{v} \sigma \left(T_{v}^{n} \right)^{3} \left(T_{v}^{n+1} -T_{v}^{n} \right)} \\ {\qquad \qquad +4\varepsilon _{v} \left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\sigma \left(T_{v}^{n} \right)^{3} \left(T_{v}^{n+1} -T_{v}^{n} \right)} \\ {\qquad \qquad +\varepsilon _{g} \left(1-\varepsilon _{v} \right)\sigma \left(T_{g}^{n} \right)^{4} } \end{array}
144+
\begin{array}{l} {L_{vg} \, \uparrow =\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow } \\ {\qquad \qquad +\varepsilon _{v} \left[1+\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\right]\sigma \left(T_{v}^{n+1,k} \right)^{3} \left[T_{v}^{n+1,k} +4\left(T_{v}^{n+1,k+1} -T_{v}^{n+1,k} \right)\right]} \\ {\qquad \qquad +\varepsilon _{g} \left(1-\varepsilon _{v} \right)\sigma \left(T_{g}^{n} \right)^{4} } \\ {\qquad =\left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow } \\ {\qquad \qquad +\varepsilon _{v} \sigma \left(T_{v}^{n+1,k} \right)^{4} } \\ {\qquad \qquad +\varepsilon _{v} \left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\sigma \left(T_{v}^{n+1,k} \right)^{4} } \\ {\qquad \qquad +4\varepsilon _{v} \sigma \left(T_{v}^{n+1,k} \right)^{3} \left(T_{v}^{n+1,k+1} -T_{v}^{n+1,k} \right)} \\ {\qquad \qquad +4\varepsilon _{v} \left(1-\varepsilon _{g} \right)\left(1-\varepsilon _{v} \right)\sigma \left(T_{v}^{n+1,k} \right)^{3} \left(T_{v}^{n+1,k+1} -T_{v}^{n+1,k} \right)} \\ {\qquad \qquad +\varepsilon _{g} \left(1-\varepsilon _{v} \right)\sigma \left(T_{g}^{n} \right)^{4} } \end{array}
145145
146-
where :math:`\varepsilon _{v}` is the vegetation emissivity and :math:`T_{v}^{n+1}` and :math:`T_{v}^{n}` are the vegetation temperatures at the current and previous time steps, respectively (:ref:`rst_Momentum, Sensible Heat, and Latent Heat Fluxes`). The first term in the equation above is the atmospheric longwave radiation that is transmitted through the canopy, reflected by the ground, and transmitted through the canopy to the atmosphere. The second term is the longwave radiation emitted by the canopy directly to the atmosphere. The third term is the longwave radiation emitted downward from the canopy, reflected by the ground, and transmitted through the canopy to the atmosphere. The fourth term is the increase (decrease) in longwave radiation due to an increase (decrease) in canopy temperature that is emitted by the canopy directly to the atmosphere. The fifth term is the increase (decrease) in longwave radiation due to an increase (decrease) in canopy temperature that is emitted downward from the canopy, reflected from the ground, and transmitted through the canopy to the atmosphere. The last term is the longwave radiation emitted by the ground and transmitted through the canopy to the atmosphere.
146+
where :math:`\varepsilon _{v}` is the vegetation emissivity, :math:`T_{v}^{n+1,k+1}` and :math:`T_{v}^{n+1,k}` are the vegetation temperatures at the current time step and current and previous iteration, respectively, where :math:`k` is the iteration level (:ref:`rst_Momentum, Sensible Heat, and Latent Heat Fluxes`). The first term in the equation above is the atmospheric longwave radiation that is transmitted through the canopy, reflected by the ground, and transmitted through the canopy to the atmosphere. The second term is the longwave radiation emitted by the canopy directly to the atmosphere. The third term is the longwave radiation emitted downward from the canopy, reflected by the ground, and transmitted through the canopy to the atmosphere. The fourth term is the increase (decrease) in longwave radiation due to an increase (decrease) in canopy temperature that is emitted by the canopy directly to the atmosphere. The fifth term is the increase (decrease) in longwave radiation due to an increase (decrease) in canopy temperature that is emitted downward from the canopy, reflected from the ground, and transmitted through the canopy to the atmosphere. The last term is the longwave radiation emitted by the ground and transmitted through the canopy to the atmosphere.
147147
148148
The upward longwave radiation from the ground is
149149

@@ -157,7 +157,7 @@ where :math:`L_{v} \, \downarrow` is the downward longwave radiation below the v
157157
.. math::
158158
:label: 4.16
159159
160-
L_{v} \, \downarrow =\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow +\varepsilon _{v} \sigma \left(T_{v}^{n} \right)^{4} +4\varepsilon _{v} \sigma \left(T_{v}^{n} \right)^{3} \left(T_{v}^{n+1} -T_{v}^{n} \right).
160+
L_{v} \, \downarrow =\left(1-\varepsilon _{v} \right)L_{atm} \, \downarrow +\varepsilon _{v} \sigma \left(T_{v}^{n+1,k} \right)^{4} +4\varepsilon _{v} \sigma \left(T_{v}^{n+1,k} \right)^{3} \left(T_{v}^{n+1,k+1} -T_{v}^{n+1,k} \right).
161161
162162
The net longwave radiation flux for the ground is (positive toward the atmosphere)
163163

python/Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ PYLINT_SRC = \
2828
# ../cime_config/buildnml
2929

3030
all: test black lint
31-
# ----------------------------------------------------------------
32-
# See the stest target about this issue
33-
@echo "Run './run_ctsm_py_tests --sys' by hand afterwards"
34-
# ----------------------------------------------------------------
3531
@echo
3632
@echo
3733
@echo "Successfully ran all standard tests"
@@ -45,13 +41,7 @@ utest: FORCE
4541
.PHONY: stest
4642
stest: FORCE
4743
# ----------------------------------------------------------------
48-
# EBK 2024-03-19: Comment out running here because of this issue:
49-
# https://github.com/ESCOMP/CTSM/pull/2363#issuecomment-1967884908
50-
#$(PYTHON) ./run_ctsm_py_tests $(TEST_ARGS) --sys
51-
# Instead run by hand which seems to be working for now...
52-
# ----------------------------------------------------------------
53-
@echo "System tests currently don't run under Make so..."
54-
@echo "Run './run_ctsm_py_tests --sys' by hand afterwards"
44+
$(PYTHON) ./run_ctsm_py_tests $(TEST_ARGS) --sys
5545

5646
.PHONY: lint
5747
lint: FORCE

0 commit comments

Comments
 (0)