Skip to content

Commit 607b96b

Browse files
committed
Merge tag 'ctsm5.3.053' into fire_emis
Fix and improve anomaly forcings for ISSP cases Conflicts: bld/unit_testers/build-namelist_test.pl src/biogeochem/SatellitePhenologyMod.F90
2 parents 38798b0 + 4434801 commit 607b96b

File tree

116 files changed

+3498
-1317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+3498
-1317
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ e8fc526e0d7818d45f171488c78392c4ff63902a
6464
cdf40d265cc82775607a1bf25f5f527bacc97405
6565
251e389b361ba673b508e07d04ddcc06b2681989
6666
8ec50135eca1b99c8b903ecdaa1bd436644688bd
67+
3b7a2876933263f8986e4069f5d23bd45635756f
68+
3dd489af7ebe06566e2c6a1c7ade18550f1eb4ba
69+
742cfa606039ab89602fde5fef46458516f56fd4
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Documentation
3+
about: Something should be added to or fixed in the documentation
4+
5+
---
6+
7+
8+
### What sort(s) of documentation issue is this?
9+
- [ ] Something is missing.
10+
- [ ] Something is (or might be) incorrect or outdated.
11+
- [ ] Something is confusing.
12+
- [ ] Something is broken.
13+
14+
### What part(s) of the documentation does this concern?
15+
- [ ] [Technical Note](https://escomp.github.io/CTSM/tech_note/index.html) (science and design of the model)
16+
- [ ] [User's Guide](https://escomp.github.io/CTSM/users_guide/index.html) (using the model and related tools)
17+
- [ ] Somewhere else (e.g., README file, tool help text, or code comment): _Please specify_
18+
- [ ] I don't know
19+
20+
### Describe the issue
21+
A clear and concise description of what is missing or wrong.
22+
23+
### Additional context (optional)
24+
Add any other context or screenshots about the issue here.

.github/ISSUE_TEMPLATE/03_other.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/04_other.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Other
3+
about: Other issues (enhancement, cleanup, etc.)
4+
5+
---
6+
7+

.github/workflows/docker-image-build-publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name: Build and publish ctsm-docs Docker image
33

44
on:
5-
# Run this whenever something gets pushed to master
5+
# Run this whenever a change to certain files gets pushed to master
66
push:
77
branches: ['master']
88
paths:
9-
- 'doc/ctsm-docs_container/Dockerfile'
10-
- 'doc/ctsm-docs_container/requirements.txt'
9+
- 'doc/ctsm-docs_container/**'
10+
- '!doc/ctsm-docs_container/README.md'
1111

1212
# Run this whenever it's manually called
1313
workflow_dispatch:
@@ -31,7 +31,7 @@ jobs:
3131
env:
3232
REGISTRY: ${{ needs.build-image-and-test-docs.outputs.REGISTRY }}
3333
IMAGE_NAME: ${{ needs.build-image-and-test-docs.outputs.IMAGE_NAME }}
34-
IMAGE_TAG: ${{ needs.build-image-and-test-docs.outputs.image_tag }}
34+
VERSION_TAG: ${{ needs.build-image-and-test-docs.outputs.version_tag }}
3535

3636
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
3737
permissions:
@@ -61,6 +61,7 @@ jobs:
6161
# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
6262
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
6363
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
64+
# Note that we should avoid relying on the "latest" tag for anything, but it's good practice to have one.
6465
# v6.15.0
6566
- name: Push Docker image
6667
id: push
@@ -70,7 +71,9 @@ jobs:
7071
platforms: linux/amd64,linux/arm64
7172
push: true
7273
load: false
73-
tags: ${{ env.IMAGE_TAG }}
74+
tags: |
75+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
76+
${{ env.VERSION_TAG }}
7477
labels: ""
7578

7679
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

.github/workflows/docker-image-build.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# Modified from https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#publishing-a-package-using-an-action (last accessed 2025-05-09)
22
name: Test building ctsm-docs Docker image and using it to build the docs
33

4-
# Configures this workflow to run every time a change in the Docker container setup is pushed to the master branch
4+
# Configures this workflow to run every time a change in the Docker container setup is pushed or included in a PR
55
on:
66
push:
7+
# Run when a change to these files is pushed to any branch. Without the "branches:" line, for some reason this will be run whenever a tag is pushed, even if the listed files aren't changed.
8+
branches: ['*']
79
paths:
810
- 'doc/ctsm-docs_container/**'
11+
- '!doc/ctsm-docs_container/README.md'
912
- '.github/workflows/docker-image-ctsm-docs-build.yml'
10-
- '.github/workflows/docker-image-build-common.yml'
13+
- '.github/workflows/docker-image-common.yml'
1114

1215
pull_request:
16+
# Run on pull requests that change the listed files
1317
paths:
1418
- 'doc/ctsm-docs_container/**'
19+
- '!doc/ctsm-docs_container/README.md'
1520
- '.github/workflows/docker-image-ctsm-docs-build.yml'
16-
- '.github/workflows/docker-image-build-common.yml'
21+
- '.github/workflows/docker-image-common.yml'
1722

1823
workflow_dispatch:
1924

.github/workflows/docker-image-common.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ on:
99
IMAGE_NAME:
1010
description: "Docker image name"
1111
value: ${{ jobs.build-image-and-test-docs.outputs.IMAGE_NAME }}
12-
image_tag:
13-
description: "First image tag"
14-
value: ${{ jobs.build-image-and-test-docs.outputs.image_tag }}
12+
version_tag:
13+
description: "Version tag from Dockerfile"
14+
value: ${{ jobs.check-version.outputs.VERSION_TAG }}
1515

16-
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
16+
# Defines custom environment variables for the workflow.
1717
env:
1818
REGISTRY: ghcr.io
19-
IMAGE_NAME: ${{ github.repository }}/ctsm-docs
19+
IMAGE_BASENAME: ctsm-docs
20+
REPO: ${{ github.repository }}
2021

2122
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
2223
jobs:
@@ -25,8 +26,7 @@ jobs:
2526
# Variables that might be needed by the calling workflow
2627
outputs:
2728
REGISTRY: ${{ env.REGISTRY }}
28-
IMAGE_NAME: ${{ env.IMAGE_NAME }}
29-
image_tag: ${{ steps.set-image-tag.outputs.IMAGE_TAG }}
29+
IMAGE_NAME: ${{ steps.set-image-name.outputs.IMAGE_NAME }}
3030
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
3131
permissions:
3232
contents: read
@@ -39,6 +39,14 @@ jobs:
3939
- name: Checkout repository
4040
uses: actions/checkout@v4
4141

42+
# Ensure that the repository part of IMAGE_NAME is lowercase. This is needed because Docker requires image names to be entirely lowercase. Note that the *image name* part, set as IMAGE_BASENAME in the env block above, is *not* converted. This will cause the check-version job to fail if the IMAGE_BASENAME contains capitals. We don't want to silently fix that here; rather, we require the user to specify a lowercase IMAGE_BASENAME.
43+
- name: Get image name with lowercase repo
44+
id: set-image-name
45+
run: |
46+
lowercase_repo=$(echo $REPO | tr '[:upper:]' '[:lower:]')
47+
echo "IMAGE_NAME=${lowercase_repo}/${IMAGE_BASENAME}" >> $GITHUB_ENV
48+
echo "IMAGE_NAME=${lowercase_repo}/${IMAGE_BASENAME}" >> $GITHUB_OUTPUT
49+
4250
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
4351
- name: Log in to the Container registry
4452
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@@ -52,7 +60,7 @@ jobs:
5260
id: meta
5361
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
5462
with:
55-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
63+
images: ${{ env.REGISTRY }}/${{ steps.set-image-name.outputs.IMAGE_NAME }}
5664

5765
# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
5866
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
@@ -75,9 +83,16 @@ jobs:
7583
- name: Set image tag for docs build
7684
id: set-image-tag
7785
run: |
78-
echo "IMAGE_TAG=$(echo '${{ steps.meta.outputs.tags }}' | cut -d',' -f1)" >> $GITHUB_ENV
79-
echo "IMAGE_TAG=$(echo '${{ steps.meta.outputs.tags }}' | cut -d',' -f1)" >> $GITHUB_OUTPUT
80-
- name: Build docs using container
86+
echo "IMAGE_TAG=$(echo '${{ steps.meta.outputs.tags }}' | head -n 1 | cut -d',' -f1)" >> $GITHUB_ENV
87+
- name: Build docs using Docker (Podman has trouble on GitHub runners)
8188
id: build-docs
8289
run: |
8390
cd doc && ./build_docs -b ${PWD}/_build -c -d -i $IMAGE_TAG
91+
92+
93+
check-version:
94+
needs: build-image-and-test-docs
95+
uses: ./.github/workflows/docker-image-get-version.yml
96+
with:
97+
registry: ${{ needs.build-image-and-test-docs.outputs.REGISTRY }}
98+
image_name: ${{ needs.build-image-and-test-docs.outputs.IMAGE_NAME }}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Get and check version specified in a Dockerfile
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
registry:
7+
required: true # Require any workflows calling this one to provide input
8+
type: string
9+
default: 'ghcr.io' # Provide default so this workflow works standalone too
10+
image_name:
11+
required: true # Require any workflows calling this one to provide input
12+
type: string
13+
default: 'escomp/ctsm/ctsm-docs' # Provide default so this workflow works standalone too
14+
outputs:
15+
VERSION_TAG:
16+
description: "Tag to be pushed to container registry"
17+
value: ${{ jobs.get-check-version.outputs.VERSION_TAG }}
18+
workflow_dispatch:
19+
inputs:
20+
registry:
21+
description: 'Container registry'
22+
required: false
23+
type: string
24+
default: 'ghcr.io'
25+
image_name:
26+
description: 'Image name'
27+
required: false
28+
type: string
29+
default: 'escomp/ctsm/ctsm-docs'
30+
31+
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
32+
jobs:
33+
get-check-version:
34+
name: Get version number from Dockerfile and check it
35+
runs-on: ubuntu-latest
36+
outputs:
37+
VERSION_TAG: ${{ steps.get-check-version.outputs.version_tag }}
38+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
39+
permissions:
40+
contents: read
41+
packages: read
42+
43+
steps:
44+
- name: Check out repository
45+
uses: actions/checkout@v4
46+
47+
- name: Get version number from Dockerfile and check it
48+
id: get-check-version
49+
run: |
50+
set -e
51+
set -o pipefail
52+
set -u
53+
VERSION="$(doc/ctsm-docs_container/get_version.sh)"
54+
VERSION_TAG="${{ inputs.registry }}/${{ inputs.image_name }}:${VERSION}"
55+
56+
# Store the manifest inspect result and output
57+
set +e
58+
INSPECT_RESULT="$(docker manifest inspect "$VERSION_TAG" 2>&1)"
59+
INSPECT_STATUS=$?
60+
set -e
61+
62+
if [[ "${INSPECT_RESULT}" == *"schemaVersion"* ]]; then
63+
echo "Tag $VERSION_TAG already exists!" >&2
64+
exit 123
65+
elif [[ "${INSPECT_RESULT}" != "manifest unknown" ]]; then
66+
# "manifest unknown" means the tag doesn't exist, which is what we want
67+
echo -e "Error checking manifest for $VERSION_TAG:\n${INSPECT_RESULT}" >&2
68+
exit $INSPECT_STATUS
69+
fi
70+
71+
echo "Setting version_tag to $VERSION_TAG"
72+
echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
push:
5+
# Run when a change to these files is pushed to master.
6+
branches: ['master', 'release-clm5.0']
7+
paths:
8+
- 'doc/**'
9+
- '!doc/*ChangeLog*'
10+
- '!doc/*ChangeSum*'
11+
- '!doc/UpdateChangelog.pl'
12+
# Include all include::ed files outside doc/ directory!
13+
- 'src/README.unit_testing'
14+
- 'tools/README'
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
20+
permissions:
21+
contents: read
22+
pages: write
23+
id-token: write
24+
25+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
26+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
27+
concurrency:
28+
group: "pages"
29+
cancel-in-progress: false
30+
31+
jobs:
32+
33+
build-and-deploy:
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
with:
43+
# Get all history, ensuring all branches are available for checkout
44+
fetch-depth: 0
45+
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v5
48+
49+
- name: Build docs using container
50+
id: build-docs
51+
run: |
52+
bin/git-fleximod update -o
53+
cd doc
54+
./build_docs_to_publish -d --site-root https://escomp.github.io/CTSM
55+
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
# Upload publish dir
60+
path: 'doc/_publish'
61+
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.github/workflows/docs-ctsm_pylib.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: Test building docs with ctsm_pylib
22

33
on:
44
push:
5+
# Run when a change to these files is pushed to any branch. Without the "branches:" line, for some reason this will be run whenever a tag is pushed, even if the listed files aren't changed.
6+
branches: ['*']
57
paths:
68
- 'python/conda_env_ctsm_py.txt'
9+
- '.github/workflows/docs-common.yml'
710

811
pull_request:
12+
# Run on pull requests that change the listed files
913
paths:
1014
- 'python/conda_env_ctsm_py.txt'
15+
- '.github/workflows/docs-common.yml'
1116

1217
schedule:
1318
# 8 am every Monday UTC

0 commit comments

Comments
 (0)