diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml new file mode 100644 index 0000000000..2a8928b28c --- /dev/null +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -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 '
' + echo "Build logs" + echo + echo '```' + cat "${DOCS_FAILURE_ARTIFACT}/build.log" + echo '```' + echo + echo "
" + } > comment-body.md + + gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file comment-body.md diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 780ba31b64..6c211d2a3c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/ diff --git a/.gitmodules b/.gitmodules index 889c1efcb2..734aecca0c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -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 diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 5440b16eab..321dfa34a3 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -191,6 +191,20 @@ ESCOMP/mizuRoute#613 + + + + FAIL + ESMCI/cime#4966 + + + + + + FAIL + ESMCI/cime#4966 + + @@ -261,13 +275,6 @@ - - - FAIL - #3789 - - - FAIL @@ -282,20 +289,6 @@ - - - FAIL - #3789 - - - - - - FAIL - #3789 - - - diff --git a/doc/ChangeLog b/doc/ChangeLog index e4d8aee7a0..2d367f8a85 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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--) + 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, glemieux@lbl.gov) +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--) + 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 diff --git a/doc/ChangeSum b/doc/ChangeSum index 36c56ec24d..eefd3e03b8 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -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 diff --git a/doc/build_docs b/doc/build_docs index 89434622a6..99415e15c4 100755 --- a/doc/build_docs +++ b/doc/build_docs @@ -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 \ No newline at end of file +exit 0 diff --git a/doc/build_docs_to_publish b/doc/build_docs_to_publish index 6804311c64..bc4075c964 100755 --- a/doc/build_docs_to_publish +++ b/doc/build_docs_to_publish @@ -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 \ No newline at end of file +exit 0 diff --git a/doc/doc-builder b/doc/doc-builder index 1eb3ebf46d..243025ac2b 160000 --- a/doc/doc-builder +++ b/doc/doc-builder @@ -1 +1 @@ -Subproject commit 1eb3ebf46d0d6e2a2cb2eb1ce9c25d21142634a5 +Subproject commit 243025ac2bb2050f0b2088b21351cca212248648 diff --git a/src/fates b/src/fates index 50eb5348b4..1399b6135a 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit 50eb5348b432ffb1b655a12cffba68ef57d8bdc2 +Subproject commit 1399b6135aadef221a4f28186cde75b7f12a35c1 diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index c0374e4f9b..c8e98604f5 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -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'