From 38347d3b4e063d8fa10e18e4505855924cae43ff Mon Sep 17 00:00:00 2001 From: rosiealice Date: Sun, 22 Mar 2026 15:47:05 +0100 Subject: [PATCH 01/43] bug fix to the land use driver inputs --- src/utils/clmfates_interfaceMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 19b247218e..75c02c05f0 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -3938,7 +3938,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' From 5e76c2544a190cd00103dc984063925cc4c62c6a Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 9 Apr 2026 20:45:19 -0600 Subject: [PATCH 02/43] Update doc-builder to v3.1.0: Simplify messaging, hiding behind new --verbose option. --- .gitmodules | 2 +- doc/doc-builder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6ee715fad3..794fabfa3a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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/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 From afd317bf6dafab56b87d1f76d628da369b043f0d Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 9 Apr 2026 16:47:20 -0700 Subject: [PATCH 03/43] Suppress bash wrapper echo lines unless --verbose is passed Co-Authored-By: Claude Haiku 4.5 --- doc/build_docs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) 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 From 2bc6ee19c54bd5e120d3cf08e126125cf5ff7af8 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 10 Apr 2026 09:26:57 -0600 Subject: [PATCH 04/43] build_docs_to_publish now respects --verbose too. --- doc/build_docs_to_publish | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) 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 From 33a15ea8ce41b1101466356191eabd4af1bc298d Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 10 Apr 2026 11:22:43 -0600 Subject: [PATCH 05/43] Update Changelog/Changesum. --- doc/ChangeLog | 28 ++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 29 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index e4d8aee7a0..ea01aa727b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,32 @@ =============================================================== +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): +- https://github.com/ESCOMP/CTSM/pull/3920 + +=============================================================== +=============================================================== 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..8e3997ad7c 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + 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 From 94dc3c6b83562c596e132b5cb21811358436b052 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 10 Apr 2026 11:25:01 -0600 Subject: [PATCH 06/43] Update PR links in ChangeLog. --- doc/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index ea01aa727b..5095d0a988 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -23,7 +23,8 @@ 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): -- https://github.com/ESCOMP/CTSM/pull/3920 +- [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) =============================================================== =============================================================== From 8ca31902e816ac4a7ae018c201d7b6db2d071e13 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 13 Apr 2026 11:45:53 -0600 Subject: [PATCH 07/43] update .gitmodules fates tag --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 794fabfa3a..81873b7867 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 From 4c111803010623a8cdeafcb5c208f37d3aaa6891 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 13 Apr 2026 11:46:26 -0600 Subject: [PATCH 08/43] remove #3789 issue tests from expected fails --- cime_config/testdefs/ExpectedTestFails.xml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 5440b16eab..3166d75277 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -261,13 +261,6 @@ - - - FAIL - #3789 - - - FAIL @@ -282,20 +275,6 @@ - - - FAIL - #3789 - - - - - - FAIL - #3789 - - - From db0faba7c48c2c46e4cfdf3516eea62bbb897692 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 16 Apr 2026 08:59:13 -0600 Subject: [PATCH 09/43] update fates commit --- src/fates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From de3ae51810d2ae1fec44e2e08ffe1425c1878e96 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 16 Apr 2026 10:21:16 -0700 Subject: [PATCH 10/43] update changelog This still needs test results updated --- doc/ChangeLog | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 82 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5095d0a988..e04c11d84a 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,85 @@ =============================================================== +Tag name: ctsm5.4.033 +Originator(s): glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov) +Date: Thu Apr 16 09:25:55 AM PDT 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. + + +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 ----- + izumi ------- + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- + izumi ------- + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: + + [ If a tag changes answers relative to baseline comparison the + following should be filled in (otherwise remove this section). + And always remove these three lines and parts that don't apply. ] + + Summarize any changes to answers, i.e., + - what code configurations: + - what platforms/compilers: + - nature of change (roundoff; larger than roundoff/same climate; new climate): + + If bitwise differences were observed, how did you show they were no worse + than roundoff? Roundoff differences means one or more lines of code change results + only by roundoff level (because order of operation changes for example). Roundoff + changes to state fields usually grow to greater than roundoff as the simulation progresses. + + If this tag changes climate list the run(s) done to evaluate the new + climate. Preferably in https://github.com/NCAR/LMWG_dev (or give details below) + - LMWG_dev issue number(s): + + - details (casename, machine, user, link to plots etc.) [if not in LMWG_dev] + +Other details +------------- +[Remove any lines that don't apply. Remove entire section if nothing applies.] + +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 + +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 + +=============================================================== +=============================================================== Tag name: ctsm5.4.032 Originator(s): samrabin (Sam Rabin, UCAR/TSS) Date: Fri Apr 10 11:19:34 MDT 2026 diff --git a/doc/ChangeSum b/doc/ChangeSum index 8e3997ad7c..0040d384ee 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.4.033 glemieux 04/16/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 From 16d2a66c7222a76ec4f43afe4a1a95a06602e39f Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 16 Apr 2026 10:29:03 -0700 Subject: [PATCH 11/43] add landuse data tool pull request update --- doc/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index e04c11d84a..5e7bdc7256 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -77,6 +77,7 @@ Pull Requests that document the changes (include PR ids): https://github.com/ESCOMP/CTSM/pull/3926 https://github.com/NGEET/fates/pull/1555 +https://github.com/NGEET/tools-fates-landusedata/pull/41 =============================================================== =============================================================== From 9c0755d59696bbe27be37bcf8bcc94d27beac192 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 16 Apr 2026 10:33:38 -0700 Subject: [PATCH 12/43] add language to ChangeLog about the fates land use data tool update --- doc/ChangeLog | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5e7bdc7256..b26d8bba77 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -8,7 +8,10 @@ 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. +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 @@ -67,10 +70,10 @@ Changes answers relative to baseline: Other details ------------- -[Remove any lines that don't apply. Remove entire section if nothing applies.] 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: 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) From 9ff6cc921b5c47950e42f490c9177f4c742affbd Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 16 Apr 2026 20:38:21 -0700 Subject: [PATCH 13/43] update test results --- doc/ChangeLog | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index b26d8bba77..497efce493 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.4.033 Originator(s): glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov) -Date: Thu Apr 16 09:25:55 AM PDT 2026 +Date: Thu Apr 16 21:40:00 MDT 2026 One-line Summary: Update fates tag with missing land use data check fix Purpose and description of changes @@ -33,40 +33,18 @@ Testing summary: regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- - izumi ------- + derecho ----- OK + izumi ------- OK fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) - derecho ----- - izumi ------- - -If the tag used for baseline comparisons was NOT the previous tag, note that here: + derecho ----- OK + izumi ------- OK Answer changes -------------- -Changes answers relative to baseline: - - [ If a tag changes answers relative to baseline comparison the - following should be filled in (otherwise remove this section). - And always remove these three lines and parts that don't apply. ] - - Summarize any changes to answers, i.e., - - what code configurations: - - what platforms/compilers: - - nature of change (roundoff; larger than roundoff/same climate; new climate): - - If bitwise differences were observed, how did you show they were no worse - than roundoff? Roundoff differences means one or more lines of code change results - only by roundoff level (because order of operation changes for example). Roundoff - changes to state fields usually grow to greater than roundoff as the simulation progresses. - - If this tag changes climate list the run(s) done to evaluate the new - climate. Preferably in https://github.com/NCAR/LMWG_dev (or give details below) - - LMWG_dev issue number(s): - - - details (casename, machine, user, link to plots etc.) [if not in LMWG_dev] +Changes answers relative to baseline: B4B, except for FATES Other details ------------- From 788ad05def772247cae35adc427022d691c992fe Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 17 Apr 2026 10:39:30 -0600 Subject: [PATCH 14/43] Update dates --- doc/ChangeLog | 2 +- doc/ChangeSum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 497efce493..24f91fd147 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.4.033 Originator(s): glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov) -Date: Thu Apr 16 21:40:00 MDT 2026 +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 diff --git a/doc/ChangeSum b/doc/ChangeSum index 0040d384ee..b2d267ad13 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.4.033 glemieux 04/16/2026 Update fates tag with missing land use data check fix + 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 From 073f0984fa33cb53a96cfc6905fd9a7cd8aaef6a Mon Sep 17 00:00:00 2001 From: Adrianna Foster Date: Tue, 21 Apr 2026 18:31:59 -0600 Subject: [PATCH 15/43] expected fails and changelog --- cime_config/testdefs/ExpectedTestFails.xml | 14 +++++++ doc/ChangeLog | 43 ++++++++++++++++++++++ doc/ChangeSum | 1 + 3 files changed, 58 insertions(+) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 3166d75277..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 + + diff --git a/doc/ChangeLog b/doc/ChangeLog index 24f91fd147..1cabf0a7de 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,47 @@ =============================================================== +Tag name: ctsm5.4.034 +Originator(s): afoster (Adrianna Foster,UCAR/TSS,303-497-1728) +Date: Mon Apr 20 11:20:44 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 diff --git a/doc/ChangeSum b/doc/ChangeSum index b2d267ad13..39ae03756e 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.4.034 afoster 04/20/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 From 7fb7a15f8824366c3997c3abc29a971f7e7e1f94 Mon Sep 17 00:00:00 2001 From: Adrianna Foster Date: Wed, 22 Apr 2026 11:02:32 -0600 Subject: [PATCH 16/43] date update --- doc/ChangeLog | 2 +- doc/ChangeSum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 1cabf0a7de..2d367f8a85 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.4.034 Originator(s): afoster (Adrianna Foster,UCAR/TSS,303-497-1728) -Date: Mon Apr 20 11:20:44 AM MDT 2026 +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 diff --git a/doc/ChangeSum b/doc/ChangeSum index 39ae03756e..eefd3e03b8 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.4.034 afoster 04/20/2026 bug fix to the FATES land use driver input code + 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 From 68718251b6443e70a70196b2f85c9796298cba7b Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 14:45:51 -0600 Subject: [PATCH 17/43] TEMPORARY change a word in a .rst file. --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index ec43a50cd8..6ade93beaa 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -12,7 +12,7 @@ We describe here the complete crop and irrigation parameterizations that appear CLM5.0 includes the following new updates to the CROP option, where CROP refers to the interactive crop management model and is included as an option with the BGC configuration: -- New crop functional types +- Additional crop functional types - All crop areas are actively managed From 153c35b79e9571446b85333704ef04e2e862eb16 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 14:54:44 -0600 Subject: [PATCH 18/43] Docs build workflow: Upload logs on failure. --- .github/workflows/docs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 780ba31b64..2eaf809b4c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -62,3 +62,10 @@ jobs: id: build-docs run: | cd doc && ./build_docs -b ${PWD}/_build -c -d + + - 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/build.log From 117b0fe4a8e3b566fa6820175451251a909481f6 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:10:27 -0600 Subject: [PATCH 19/43] Add "Post PR comment with doc-build failure log" workflow. --- .../docs-pr-failure-post-comment.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/docs-pr-failure-post-comment.yml 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..5b9fccd82b --- /dev/null +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -0,0 +1,56 @@ +name: Post PR comment with doc-build failure log + +env: + DOCS_FAILURE_ARTIFACT: docs-build-failed + +jobs: + comment: + if: github.event.workflow_run.event == 'pull_request' + 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 }} + 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=$(gh api \ + repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/pull_requests \ + --jq '.[0].number') + + gh pr comment $PR_NUMBER --repo $REPO --body "## ❌ Docs build failed + +
+ Build logs + + \`\`\` + $(cat ${{ env.DOCS_FAILURE_ARTIFACT }}/build.log) + \`\`\` + +
" \ No newline at end of file From 76d0773fb4e4b79f1c2a2e1ebdff037b8b87de23 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:12:27 -0600 Subject: [PATCH 20/43] Introduce a doc syntax error --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 6ade93beaa..f0055f855f 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ------------------------------------------------- +----------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 7c07a3df139a9ce8a09400330d5209ba1844b1bb Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:18:18 -0600 Subject: [PATCH 21/43] Add trigger for new workflow file. --- .github/workflows/docs-pr-failure-post-comment.yml | 5 +++++ .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 5b9fccd82b..5699aaa095 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -3,6 +3,11 @@ name: Post PR comment with doc-build failure log env: DOCS_FAILURE_ARTIFACT: docs-build-failed +on: + workflow_run: + workflows: ["Test building docs when they're updated"] + types: [completed] + jobs: comment: if: github.event.workflow_run.event == 'pull_request' diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index f0055f855f..c1cfde689b 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ------------------------------------------ +---------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 01f41b78c7d0385e0cba95d9e41f75048756149a Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:27:11 -0600 Subject: [PATCH 22/43] TEMPORARY remove docs-pr-failure-post-comment.yml --- .../docs-pr-failure-post-comment.yml | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 .github/workflows/docs-pr-failure-post-comment.yml diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml deleted file mode 100644 index 5699aaa095..0000000000 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Post PR comment with doc-build failure log - -env: - DOCS_FAILURE_ARTIFACT: docs-build-failed - -on: - workflow_run: - workflows: ["Test building docs when they're updated"] - types: [completed] - -jobs: - comment: - if: github.event.workflow_run.event == 'pull_request' - 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 }} - 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=$(gh api \ - repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/pull_requests \ - --jq '.[0].number') - - gh pr comment $PR_NUMBER --repo $REPO --body "## ❌ Docs build failed - -
- Build logs - - \`\`\` - $(cat ${{ env.DOCS_FAILURE_ARTIFACT }}/build.log) - \`\`\` - -
" \ No newline at end of file From 305ff9857ca7cae65fa7fd2c794903a4f73e97dc Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:28:19 -0600 Subject: [PATCH 23/43] Restore docs-pr-failure-post-comment.yml --- .../docs-pr-failure-post-comment.yml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/docs-pr-failure-post-comment.yml 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..5699aaa095 --- /dev/null +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -0,0 +1,61 @@ +name: Post PR comment with doc-build failure log + +env: + DOCS_FAILURE_ARTIFACT: docs-build-failed + +on: + workflow_run: + workflows: ["Test building docs when they're updated"] + types: [completed] + +jobs: + comment: + if: github.event.workflow_run.event == 'pull_request' + 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 }} + 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=$(gh api \ + repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/pull_requests \ + --jq '.[0].number') + + gh pr comment $PR_NUMBER --repo $REPO --body "## ❌ Docs build failed + +
+ Build logs + + \`\`\` + $(cat ${{ env.DOCS_FAILURE_ARTIFACT }}/build.log) + \`\`\` + +
" \ No newline at end of file From 0b83eeabd36a728e6d9adb2eec3a3458b85a56d4 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:49:03 -0600 Subject: [PATCH 24/43] Fix artifact name in docs-pr-failure-post-comment workflow. The workflow looked for artifact 'docs-build-failed', but docs.yml uploads it as 'test-build-docs-container_failed'. The artifact was never found, so no comment was ever posted. Match the consumer to the producer's name. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-pr-failure-post-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 5699aaa095..5f9ca7ad40 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -1,7 +1,7 @@ name: Post PR comment with doc-build failure log env: - DOCS_FAILURE_ARTIFACT: docs-build-failed + DOCS_FAILURE_ARTIFACT: test-build-docs-container_failed on: workflow_run: From 0674495be23ddb50501a5a35f6d84048bdc7bae1 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:51:47 -0600 Subject: [PATCH 25/43] Skip comment job when triggering docs run did not fail. The job previously ran on every completed docs workflow run (including successes), did an artifacts API call, and then exited. Gate on workflow_run.conclusion == 'failure' so successful runs don't spin up a runner at all. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-pr-failure-post-comment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 5f9ca7ad40..05f94fdd54 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -10,7 +10,9 @@ on: jobs: comment: - if: github.event.workflow_run.event == 'pull_request' + if: >- + github.event.workflow_run.event == 'pull_request' + && github.event.workflow_run.conclusion == 'failure' runs-on: ubuntu-latest permissions: pull-requests: write From ada1f313094b7d5b30a8b4ba8d3c037b5af359af Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:52:24 -0600 Subject: [PATCH 26/43] Build comment body in a file, post with gh pr comment --body-file. The previous approach inlined log contents inside a triple-backtick fence via bash command substitution. A line in the log containing triple-backticks would break the outer fence and mangle rendering. Writing to a file side-steps re-expansion concerns and tightens quoting on the PR number and repo vars. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../docs-pr-failure-post-comment.yml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 05f94fdd54..c26010efd2 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -51,13 +51,17 @@ jobs: repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/pull_requests \ --jq '.[0].number') - gh pr comment $PR_NUMBER --repo $REPO --body "## ❌ Docs build failed + { + echo "## ❌ Docs build failed" + echo + echo "
" + echo "Build logs" + echo + echo '```' + cat "${DOCS_FAILURE_ARTIFACT}/build.log" + echo '```' + echo + echo "
" + } > comment-body.md -
- Build logs - - \`\`\` - $(cat ${{ env.DOCS_FAILURE_ARTIFACT }}/build.log) - \`\`\` - -
" \ No newline at end of file + gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file comment-body.md \ No newline at end of file From e3d381ed75110bc78314712b4d3ff4709c50199b Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:55:59 -0600 Subject: [PATCH 27/43] Download artifact into a named subdirectory. actions/download-artifact@v4 extracts single-artifact downloads directly into the current working directory when `path:` is omitted, so the post- comment step's reference to \${DOCS_FAILURE_ARTIFACT}/build.log pointed at a path that would not exist. Give the download step an explicit path matching the env var so the downstream references resolve. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-pr-failure-post-comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index c26010efd2..45d6ce7283 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -38,6 +38,7 @@ jobs: 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 }} From 618341387730717f4659267ffe58252bea7af9a7 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:56:43 -0600 Subject: [PATCH 28/43] Carry PR number through the failure artifact. For PRs opened from forks, the runs.../pull_requests API returns an empty array, so the previous PR_NUMBER lookup resolved to literal "null" and the subsequent gh pr comment call failed. Have the producer write the PR number into the failure artifact and the consumer read it from there. The upload path widens from build-logs/build.log to build-logs/ so that pr_number.txt rides along; artifact layout is preserved on download. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-pr-failure-post-comment.yml | 4 +--- .github/workflows/docs.yml | 8 +++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 45d6ce7283..316f6e21aa 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -48,9 +48,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} run: | - PR_NUMBER=$(gh api \ - repos/$REPO/actions/runs/${{ github.event.workflow_run.id }}/pull_requests \ - --jq '.[0].number') + PR_NUMBER=$(cat "${DOCS_FAILURE_ARTIFACT}/pr_number.txt") { echo "## ❌ Docs build failed" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2eaf809b4c..2bda7f2886 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,9 +63,15 @@ jobs: run: | cd doc && ./build_docs -b ${PWD}/_build -c -d + - name: Record PR number + 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/build.log + path: build-logs/ From 6bd425208eb7e6470436e46b2fcf351c21659b04 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 15:57:30 -0600 Subject: [PATCH 29/43] Another doc syntax change. --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index c1cfde689b..3d1443df1e 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ----------------------------------------- +--------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 8cf2ae550893df42b128d996026d29c018484e19 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 16:08:31 -0600 Subject: [PATCH 30/43] Another syntax break --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 3d1443df1e..cf43b0cabc 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ---------------------------------------- +-------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 445123c409a94144fa6b300cd763e2b755965d73 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 16:16:42 -0600 Subject: [PATCH 31/43] Capture build_docs output to build-logs/build.log. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Upload logs on failure' step has been uploading the path build-logs/build.log since it was added, but nothing in the repo ever wrote that file — ./build_docs prints to stdout only. The artifact was effectively empty, which only became visible once the consumer workflow actually ran. Tee the build step's combined output into the log file. Actions' default Linux shell runs with -eo pipefail, so the build's non-zero exit still propagates through the pipe. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2bda7f2886..abebec528d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,7 +61,8 @@ 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 + mkdir -p build-logs + cd doc && ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" - name: Record PR number if: failure() && steps.build-docs.outcome == 'failure' && github.event_name == 'pull_request' From 381a5e056b147ed607db584a2f0c8c69ad0f1f73 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 16:18:40 -0600 Subject: [PATCH 32/43] Another syntax break --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index cf43b0cabc..4a30fc8083 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 --------------------------------------- +------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 34999957d618fa2eb3915f46baa15565449298a6 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 16:24:40 -0600 Subject: [PATCH 33/43] Propagate build_docs failure through the tee pipe. The previous commit assumed Actions' default Linux shell ran with -o pipefail, but the runner logs show 'bash -e {0}' (pipefail off). As a result, teeing build_docs output caused tee's zero exit to mask the build failure, so the job was marked as passing even when the docs build failed. Set pipefail explicitly in the run block. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index abebec528d..039cbd589a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,6 +61,7 @@ jobs: - name: Build docs using Docker (Podman has trouble on GitHub runners) id: build-docs run: | + set -o pipefail mkdir -p build-logs cd doc && ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" From cc38361a9efcac88735ecdc1818efa004a6fde88 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:02:57 -0600 Subject: [PATCH 34/43] Preserve stdout/stderr ordering in captured build log. Piping through tee switches Python's stdout from line-buffered to block- buffered, while stderr remains unbuffered. Merging 2>&1 after the fact doesn't fix it: stderr flushes immediately, stdout dumps only at process exit, so the teed log showed warnings before the "Cleaning..." / "Building..." header lines they followed in the original output. Set PYTHONUNBUFFERED=1 to disable Python stdio buffering for the build_docs invocation and any Python children it spawns. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 039cbd589a..1416e0c402 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,7 +63,7 @@ jobs: run: | set -o pipefail mkdir -p build-logs - cd doc && ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" + cd doc && PYTHONUNBUFFERED=1 ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" - name: Record PR number if: failure() && steps.build-docs.outcome == 'failure' && github.event_name == 'pull_request' From 2bb249de7883d492e038f5108425847f7f88fce9 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:09:05 -0600 Subject: [PATCH 35/43] Suppress ANSI color codes in captured build log. GitHub Actions sets FORCE_COLOR in the environment, so Sphinx and other Python tooling emit ANSI escapes even when stdout is a pipe. The PR comment renders those as literal garbage (an ESC glyph followed by sequences like [91m). Set NO_COLOR=1 to ask well-behaved tools to drop color output across the build. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1416e0c402..36f38805c2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,7 +63,10 @@ jobs: run: | set -o pipefail mkdir -p build-logs - cd doc && PYTHONUNBUFFERED=1 ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" + cd doc && NO_COLOR=1 PYTHONUNBUFFERED=1 ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" + # 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" to produce a log file that will get posted in the PR comment from docs-pr-failure-post-comment.yml + # NO_COLOR=1 because otherwise the log will get rendered weird in the PR comment + # PYTHONUNBUFFERED=1 because otherwise the teed log will be out of order - name: Record PR number if: failure() && steps.build-docs.outcome == 'failure' && github.event_name == 'pull_request' From 2d2ca0250dc6d3f3b60f66379bde4b4ef4e15ed0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:14:53 -0600 Subject: [PATCH 36/43] Add some workflow comments. --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 36f38805c2..0ad9e14c36 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -68,7 +68,10 @@ jobs: # NO_COLOR=1 because otherwise the log will get rendered weird in the PR comment # PYTHONUNBUFFERED=1 because otherwise the teed log will be out of order - - name: Record PR number + # 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 From a967527de3d7e30d8bc2af29cb1164c7814d65d3 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:16:40 -0600 Subject: [PATCH 37/43] Strip ANSI color codes in the PR-comment log only. NO_COLOR=1 wasn't honored by every tool in the build chain, so escape sequences still reached the log and rendered as garbage in the PR comment. Replace it with a process-substituted sed that strips ANSI before writing build.log, which keeps colored output intact on the live Actions console while giving the PR comment a clean log. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0ad9e14c36..6c211d2a3c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,9 +63,8 @@ jobs: run: | set -o pipefail mkdir -p build-logs - cd doc && NO_COLOR=1 PYTHONUNBUFFERED=1 ./build_docs -b ${PWD}/_build -c -d 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" - # 2>&1 | tee "${GITHUB_WORKSPACE}/build-logs/build.log" to produce a log file that will get posted in the PR comment from docs-pr-failure-post-comment.yml - # NO_COLOR=1 because otherwise the log will get rendered weird in the PR comment + 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. From 788dcc0a7fdae3b4f659edbdb46c0b9ec7002900 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:20:36 -0600 Subject: [PATCH 38/43] Fix doc syntax --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 4a30fc8083..6ade93beaa 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 -------------------------------------- +------------------------------------------------ We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 2e5b10befc57f7cfc7a18539bed592737e5db6f0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:24:26 -0600 Subject: [PATCH 39/43] Slightly change auto comment. --- .github/workflows/docs-pr-failure-post-comment.yml | 4 ++-- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 316f6e21aa..39ae2966c4 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -51,9 +51,9 @@ jobs: PR_NUMBER=$(cat "${DOCS_FAILURE_ARTIFACT}/pr_number.txt") { - echo "## ❌ Docs build failed" + echo "### ❌ Docs build failed" echo - echo "
" + echo "
" echo "Build logs" echo echo '```' diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 6ade93beaa..68e40e8c2b 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ------------------------------------------------- +--------------------------------------------- We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From bf870bbb5b43473c0285cdbfa652ddb5acc8ccc5 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:29:31 -0600 Subject: [PATCH 40/43] Render build-log details as expanded by default. GitHub's HTML sanitizer strips the bare boolean attribute in
, leaving the element collapsed. Use the explicit
form, which the sanitizer preserves. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-pr-failure-post-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 39ae2966c4..743ab16f1e 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -53,7 +53,7 @@ jobs: { echo "### ❌ Docs build failed" echo - echo "
" + echo '
' echo "Build logs" echo echo '```' From aad851af3e76ace1cd3099243c97460280fefd63 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:36:07 -0600 Subject: [PATCH 41/43] Fix doc syntax --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 68e40e8c2b..6ade93beaa 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -6,7 +6,7 @@ Crops and Irrigation .. _Summary of CLM5.0 updates relative to the CLM4.5: Summary of CLM5.0 updates relative to the CLM4.5 ---------------------------------------------- +------------------------------------------------ We describe here the complete crop and irrigation parameterizations that appear in CLM5.0. Corresponding information for CLM4.5 appeared in the CLM4.5 Technical Note (:ref:`Oleson et al. 2013 `). From 5ce1eff7823983802579a2201ddde5ce3b845af5 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:37:18 -0600 Subject: [PATCH 42/43] Add missing EOF newline --- .github/workflows/docs-pr-failure-post-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-pr-failure-post-comment.yml b/.github/workflows/docs-pr-failure-post-comment.yml index 743ab16f1e..2a8928b28c 100644 --- a/.github/workflows/docs-pr-failure-post-comment.yml +++ b/.github/workflows/docs-pr-failure-post-comment.yml @@ -63,4 +63,4 @@ jobs: echo "
" } > comment-body.md - gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file comment-body.md \ No newline at end of file + gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file comment-body.md From 1fbe07c7a4756bb2115d1df82b5f683d6b371bab Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 23 Apr 2026 17:38:12 -0600 Subject: [PATCH 43/43] Revert another docs test change. --- .../Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst index 6ade93beaa..ec43a50cd8 100755 --- a/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst +++ b/doc/source/tech_note/Crop_Irrigation/CLM50_Tech_Note_Crop_Irrigation.rst @@ -12,7 +12,7 @@ We describe here the complete crop and irrigation parameterizations that appear CLM5.0 includes the following new updates to the CROP option, where CROP refers to the interactive crop management model and is included as an option with the BGC configuration: -- Additional crop functional types +- New crop functional types - All crop areas are actively managed