Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
38347d3
bug fix to the land use driver inputs
rosiealice Mar 22, 2026
3a46f83
Merge branch 'master' into landuse_driver_bugfix
adrifoster Apr 8, 2026
5e76c25
Update doc-builder to v3.1.0: Simplify messaging, hiding behind new -…
samsrabin Apr 10, 2026
afd317b
Suppress bash wrapper echo lines unless --verbose is passed
samsrabin Apr 9, 2026
2bc6ee1
build_docs_to_publish now respects --verbose too.
samsrabin Apr 10, 2026
7e9b49a
Merge pull request #3920 from samsrabin/doc-builder-simplify-messaging
samsrabin Apr 10, 2026
33a15ea
Update Changelog/Changesum.
samsrabin Apr 10, 2026
94dc3c6
Update PR links in ChangeLog.
samsrabin Apr 10, 2026
6256957
Merge pull request #3921 from samsrabin/doc-builder-simplify-messagin…
samsrabin Apr 10, 2026
8ca3190
update .gitmodules fates tag
glemieux Apr 13, 2026
4c11180
remove #3789 issue tests from expected fails
glemieux Apr 13, 2026
db0faba
update fates commit
glemieux Apr 16, 2026
de3ae51
update changelog
glemieux Apr 16, 2026
16d2a66
add landuse data tool pull request update
glemieux Apr 16, 2026
9c0755d
add language to ChangeLog about the fates land use data tool update
glemieux Apr 16, 2026
9ff6cc9
update test results
glemieux Apr 17, 2026
788ad05
Update dates
ekluzek Apr 17, 2026
1fc4af4
Merge pull request #3926 from glemieux/fates-luh-isnan-fix
ekluzek Apr 17, 2026
ee27f85
Merge branch 'master' into landuse_driver_bugfix
adrifoster Apr 20, 2026
073f098
expected fails and changelog
adrifoster Apr 22, 2026
7fb7a15
date update
adrifoster Apr 22, 2026
f426849
Merge pull request #3902 from adrifoster/landuse_driver_bugfix
adrifoster Apr 22, 2026
723b3fe
Merge tag 'ctsm5.4.034' into b4b-dev
samsrabin Apr 23, 2026
6871825
TEMPORARY change a word in a .rst file.
samsrabin Apr 23, 2026
153c35b
Docs build workflow: Upload logs on failure.
samsrabin Apr 23, 2026
117b0fe
Add "Post PR comment with doc-build failure log" workflow.
samsrabin Apr 23, 2026
76d0773
Introduce a doc syntax error
samsrabin Apr 23, 2026
7c07a3d
Add trigger for new workflow file.
samsrabin Apr 23, 2026
01f41b7
TEMPORARY remove docs-pr-failure-post-comment.yml
samsrabin Apr 23, 2026
305ff98
Restore docs-pr-failure-post-comment.yml
samsrabin Apr 23, 2026
0b83eea
Fix artifact name in docs-pr-failure-post-comment workflow.
samsrabin Apr 23, 2026
0674495
Skip comment job when triggering docs run did not fail.
samsrabin Apr 23, 2026
ada1f31
Build comment body in a file, post with gh pr comment --body-file.
samsrabin Apr 23, 2026
e3d381e
Download artifact into a named subdirectory.
samsrabin Apr 23, 2026
6183413
Carry PR number through the failure artifact.
samsrabin Apr 23, 2026
6bd4252
Another doc syntax change.
samsrabin Apr 23, 2026
8cf2ae5
Another syntax break
samsrabin Apr 23, 2026
445123c
Capture build_docs output to build-logs/build.log.
samsrabin Apr 23, 2026
381a5e0
Another syntax break
samsrabin Apr 23, 2026
3499995
Propagate build_docs failure through the tee pipe.
samsrabin Apr 23, 2026
cc38361
Preserve stdout/stderr ordering in captured build log.
samsrabin Apr 23, 2026
2bb249d
Suppress ANSI color codes in captured build log.
samsrabin Apr 23, 2026
2d2ca02
Add some workflow comments.
samsrabin Apr 23, 2026
a967527
Strip ANSI color codes in the PR-comment log only.
samsrabin Apr 23, 2026
788dcc0
Fix doc syntax
samsrabin Apr 23, 2026
2e5b10b
Slightly change auto comment.
samsrabin Apr 23, 2026
bf870bb
Render build-log details as expanded by default.
samsrabin Apr 23, 2026
aad851a
Fix doc syntax
samsrabin Apr 23, 2026
5ce1eff
Add missing EOF newline
samsrabin Apr 23, 2026
1fbe07c
Revert another docs test change.
samsrabin Apr 23, 2026
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
66 changes: 66 additions & 0 deletions .github/workflows/docs-pr-failure-post-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Post PR comment with doc-build failure log

env:
DOCS_FAILURE_ARTIFACT: test-build-docs-container_failed

on:
workflow_run:
workflows: ["Test building docs when they're updated"]
types: [completed]

jobs:
comment:
if: >-
github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.conclusion == 'failure'
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: read
steps:
- name: Check for failure artifact
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
run: |
gh api repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/artifacts \
--jq '.artifacts[] | select(.name == "${{ env.DOCS_FAILURE_ARTIFACT }}") | .id' > artifact_id.txt

if [ -s artifact_id.txt ]; then
echo "found=true" >> $GITHUB_OUTPUT
else
echo "found=false" >> $GITHUB_OUTPUT
fi

- name: Download logs
if: steps.check.outputs.found == 'true'
uses: actions/download-artifact@v4
with:
name: ${{ env.DOCS_FAILURE_ARTIFACT }}
path: ${{ env.DOCS_FAILURE_ARTIFACT }}
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Post comment
if: steps.check.outputs.found == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
run: |
PR_NUMBER=$(cat "${DOCS_FAILURE_ARTIFACT}/pr_number.txt")

{
echo "### ❌ Docs build failed"
echo
echo '<details open="true">'
echo "<summary>Build logs</summary>"
echo
echo '```'
cat "${DOCS_FAILURE_ARTIFACT}/build.log"
echo '```'
echo
echo "</details>"
} > comment-body.md

gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file comment-body.md
22 changes: 21 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,24 @@ jobs:
- name: Build docs using Docker (Podman has trouble on GitHub runners)
id: build-docs
run: |
cd doc && ./build_docs -b ${PWD}/_build -c -d
set -o pipefail
mkdir -p build-logs
cd doc && PYTHONUNBUFFERED=1 ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee >(sed -E $'s/\x1b\\[[0-9;]*[a-zA-Z]//g' > "${GITHUB_WORKSPACE}/build-logs/build.log")
# The tee writes build.log for the PR comment (posted by docs-pr-failure-post-comment.yml); the inner sed strips ANSI color codes that would otherwise render as garbage in the comment.
# PYTHONUNBUFFERED=1 because otherwise the teed log will be out of order

# The rest of the steps only trigger on failure of above build-docs step.
# They upload logs that will be used by the docs-pr-failure-post-comment.yml workflow.

- name: Record PR number on failure
if: failure() && steps.build-docs.outcome == 'failure' && github.event_name == 'pull_request'
run: |
mkdir -p build-logs
echo "${{ github.event.pull_request.number }}" > build-logs/pr_number.txt

- name: Upload logs on failure
if: failure() && steps.build-docs.outcome == 'failure'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-build-docs-container_failed
path: build-logs/
4 changes: 2 additions & 2 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.92.0_api.44.0.0
fxtag = sci.1.92.1_api.44.1.0
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NGEET/fates
Expand Down Expand Up @@ -124,7 +124,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial
[submodule "doc-builder"]
path = doc/doc-builder
url = https://github.com/ESMCI/doc-builder
fxtag = v3.0.1
fxtag = v3.1.0
fxrequired = ToplevelOptional
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/doc-builder
35 changes: 14 additions & 21 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@
<issue>ESCOMP/mizuRoute#613</issue>
</phase>
</test>

<test name="SMS_D_Ld5.5x5_amazon_rHDMA.I2000Clm60SpMizGs.derecho_gnu.mizuroute-default">
<phase name="NLCOMP">
<status>FAIL</status>
<issue>ESMCI/cime#4966</issue>
</phase>
</test>

<test name="SMS_D_Ld5.5x5_amazon_rHDMA.I2000Clm60SpMizGs.derecho_intel.mizuroute-default">
<phase name="NLCOMP">
<status>FAIL</status>
<issue>ESMCI/cime#4966</issue>
</phase>
</test>

<test name="SMS_D_Ld5.5x5_amazon_rHDMA.I2000Clm60SpMizGs.izumi_nag.mizuroute-default">
<phase name="MODEL_BUILD">
Expand Down Expand Up @@ -261,13 +275,6 @@
</phase>
</test>

<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2">
<phase name="RUN">
<status>FAIL</status>
<issue>#3789</issue>
</phase>
</test>

<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdLUH2">
<phase name="RUN">
<status>FAIL</status>
Expand All @@ -282,20 +289,6 @@
</phase>
</test>

<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2HarvestArea">
<phase name="RUN">
<status>FAIL</status>
<issue>#3789</issue>
</phase>
</test>

<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2HarvestMass">
<phase name="RUN">
<status>FAIL</status>
<issue>#3789</issue>
</phase>
</test>

<!-- Other submodule test list failures (MOSART, RTM, etc. -->

<test name="SMS_Lh3.f10_f10_mg37.I2000Clm60Sp.derecho_intel.mosart-clmAccelSpinupIgnoreWarn">
Expand Down
135 changes: 135 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,139 @@
===============================================================
Tag name: ctsm5.4.034
Originator(s): afoster (Adrianna Foster,UCAR/TSS,303-497-1728)
Date: Wed Apr 22 11:02:13 AM MDT 2026
One-line Summary: bug fix to the FATES land use driver input code

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

This PR includes a cherry-picked fix from NorESMhub/CTSM#209 to address swap in the
order of rangeland and pasture in the reading of the landuse drivers


Bugs fixed
----------

List of CTSM issues fixed (include CTSM Issue # and description):
Resolves FATES https://github.com/NGEET/fates/issues/1551


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: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
derecho ----- OK
izumi ------- OK

Added 2 new expected fails for mizuroute NLCOMP DIFFs.


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

Changes answers relative to baseline:

Landuse tests are not B4B, otherwise B4B

===============================================================
===============================================================
Tag name: ctsm5.4.033
Originator(s): glemieux (Gregory Lemieux, LBNL, [email protected])
Date: Fri Apr 17 10:39:02 AM MDT 2026
One-line Summary: Update fates tag with missing land use data check fix

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

This update brings in fates-side changes which allow for checking of
fates land use data that uses either NaN or non-nan fill values. This
also updates the fates land use data tool tag which captures the
associated netcdf write encoding changes to ensure that the land use
data will use non-nan values consistent with the latest default datasets.


Bugs fixed
----------
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
Resolves #3789

Notes of particular relevance for developers:
---------------------------------------------
NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide

Changes to tests or testing:
- Removes the FatesColdLUH testmods from the expected failures list

Contributors:

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: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
derecho ----- OK
izumi ------- OK


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

Changes answers relative to baseline: B4B, except for FATES

Other details
-------------

List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
fates: sci.1.92.0_api.44.0.0 --> sci.1.92.1_api.44.1.0
fates/tools/landusedata: v0.1.1 --> v0.4.1

Pull Requests that document the changes (include PR ids):
(https://github.com/ESCOMP/ctsm/pull)

https://github.com/ESCOMP/CTSM/pull/3926
https://github.com/NGEET/fates/pull/1555
https://github.com/NGEET/tools-fates-landusedata/pull/41

===============================================================
===============================================================
Tag name: ctsm5.4.032
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
Date: Fri Apr 10 11:19:34 MDT 2026
One-line Summary: Simplify doc build messaging.

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

Updates doc-builder and related scripts to reduce noise during documentation build. Adds --verbose|-V option to print complete output.


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

Only documentation tests were needed. Baselines for this tag are just softlinks to ctsm5.4.031.


Other details
-------------

List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
- doc-builder updated from v3.0.1 to v3.1.0.

Pull Requests that document the changes (include PR ids):
- [ESCOMP/CTSM Pull Request #3920: ctsm5.4.032: Simplify messaging during docs build by samsrabin](https://github.com/ESCOMP/CTSM/pull/3920)
- [ESCOMP/CTSM Pull Request #3921: ctsm5.4.032: Simplify messaging during docs build [update Changelog/Changesum] by samsrabin](https://github.com/ESCOMP/CTSM/pull/3921)

===============================================================
===============================================================
Tag name: ctsm5.4.031
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
Date: Thu Apr 9 13:30:18 MDT 2026
Expand Down
3 changes: 3 additions & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.4.034 afoster 04/22/2026 bug fix to the FATES land use driver input code
ctsm5.4.033 glemieux 04/17/2026 Update fates tag with missing land use data check fix
ctsm5.4.032 samrabin 04/10/2026 Simplify doc build messaging.
ctsm5.4.031 samrabin 04/09/2026 b4b-dev merge 2026-04-09
ctsm5.4.030 glemieux 04/03/2026 Add FATES namelist option for land use transition logic
ctsm5.4.029 slevis 03/30/2026 Merge b4b-dev to master
Expand Down
22 changes: 18 additions & 4 deletions doc/build_docs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ if [ ! -f doc-builder/build_docs ]; then
${script_dir}/../bin/git-fleximod update doc-builder
fi

echo "Running: make fetch-images"
make fetch-images
# Check if --verbose or -V was passed
verbose=false
for arg in "$@"; do
case "$arg" in
--verbose|-V) verbose=true; break ;;
esac
done

echo "Running: ./doc-builder/build_docs $@"
if $verbose; then
echo "Running: make fetch-images"
make fetch-images
else
make fetch-images > /dev/null 2>&1
fi

if $verbose; then
echo "Running: ./doc-builder/build_docs $@"
fi
./doc-builder/build_docs "$@"

exit 0
exit 0
24 changes: 19 additions & 5 deletions doc/build_docs_to_publish
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ if [ ! -f doc-builder/build_docs_to_publish ]; then
"${script_dir}"/../bin/git-fleximod update doc-builder
fi

# Check if --verbose or -V was passed
verbose=false
for arg in "$@"; do
case "$arg" in
--verbose|-V) verbose=true; break ;;
esac
done

cd "${script_dir}"

echo "Running: make fetch-images"
make fetch-images
if $verbose; then
echo "Running: make fetch-images"
make fetch-images
else
make fetch-images > /dev/null 2>&1
fi

echo "Running: ./doc-builder/build_docs_to_publish $@"
pwd
if $verbose; then
echo "Running: ./doc-builder/build_docs_to_publish $@"
pwd
fi
./doc-builder/build_docs_to_publish "$@"

exit 0
exit 0
2 changes: 1 addition & 1 deletion src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3939,7 +3939,7 @@ subroutine GetLandusePFTData(bounds, landuse_pft_file, landuse_pft_map, landuse_

! Land use name arrays
character(len=10), parameter :: landuse_pft_map_varnames(num_landuse_pft_vars) = &
[character(len=10) :: 'frac_primr','frac_secnd','frac_pastr','frac_range'] !need to move 'frac_surf' to a different variable
[character(len=10) :: 'frac_primr','frac_secnd','frac_range','frac_pastr'] !need to move 'frac_surf' to a different variable

character(len=*), parameter :: subname = 'GetLandusePFTData'

Expand Down
Loading