Skip to content

Commit 1beed63

Browse files
authored
Public release, 2025-10 (#46)
Updates the codebase to a recent commit on `full-model` (`3ef085c`), with squash-merged git history.
1 parent a1036b4 commit 1beed63

File tree

277 files changed

+23148
-3547
lines changed

Some content is hidden

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

277 files changed

+23148
-3547
lines changed

.github/workflows/docs.yaml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
branches:
99
- main
1010

11+
# Add a button to manually trigger the workflow
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
1126
jobs:
1227
build:
1328
runs-on: ubuntu-latest
@@ -22,19 +37,27 @@ jobs:
2237
- uses: actions/cache@v4
2338
with:
2439
path: ${{ env.pythonLocation }}
25-
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('docs/requirements.txt') }}-${{ hashFiles('constraints.txt') }}
40+
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('docs/requirements.txt') }}-${{ hashFiles('requirements-healpix.txt') }}-${{ hashFiles('constraints.txt') }}
2641
- name: Install dependencies
2742
run: |
2843
python -m pip install uv
29-
uv pip install --system -c constraints.txt -e .[docs]
44+
# can't use --system here because it doesn't work with --no-build-isolation and a healpix dependency
45+
uv venv --python 3.11
46+
uv pip install -c constraints.txt -e .[docs]
47+
uv pip install --no-build-isolation -c constraints.txt -e .[docs,healpix]
3048
- name: Build docs
3149
run: |
50+
source .venv/bin/activate
3251
cd docs && make doctest html
33-
- name: Deploy to GitHub Pages
34-
uses: peaceiris/actions-gh-pages@v3
35-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
52+
- name: Upload to GitHub Pages
53+
uses: actions/upload-pages-artifact@v3
3654
with:
37-
publish_branch: gh-pages
38-
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
publish_dir: docs/_build/
40-
force_orphan: true
55+
path: docs/_build/html
56+
deploy:
57+
runs-on: ubuntu-latest
58+
# Only deploy on manual trigger or push to main
59+
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
uses: actions/deploy-pages@v4

.github/workflows/tests.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ jobs:
2222
- uses: actions/cache@v4
2323
with:
2424
path: ${{ env.pythonLocation }}
25-
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('constraints.txt') }}
25+
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('requirements-healpix.txt') }}-${{ hashFiles('constraints.txt') }}
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install uv
29-
uv pip install --system -c constraints.txt -e .[dev]
29+
# can't use --system here because it doesn't work with --no-build-isolation and a healpix dependency
30+
uv venv --python 3.11
31+
uv pip install -c constraints.txt -e .[dev]
32+
uv pip install --no-build-isolation -c constraints.txt -e .[dev,healpix]
3033
- name: Run pytest with code coverage
3134
run: |
35+
source .venv/bin/activate
3236
make test_cov
33-
cpu-very-fast:
37+
cpu-very-fast-no-healpix:
3438
runs-on: ubuntu-latest
3539
steps:
3640
- uses: actions/checkout@v3
@@ -50,4 +54,4 @@ jobs:
5054
uv pip install --system -c constraints.txt -e .[dev]
5155
- name: Run pytest
5256
run: |
53-
make test_very_fast
57+
make test_very_fast

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
docs/available_modules.rst
2+
docs/available_steps.rst
23
docs/_build
34

45
.vscode

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ repos:
1010
hooks:
1111
- id: check-added-large-files
1212
args: [--maxkb=250]
13+
exclude: |
14+
(?x)^(
15+
fme/ace/aggregator/inference/testdata/.*-regression.pt
16+
)$
1317
- id: trailing-whitespace
1418
- id: file-contents-sorter
1519
files: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ build_docker_image:
1515
enter_docker_image: build_docker_image
1616
docker run -it --rm $(IMAGE):$(VERSION) bash
1717

18-
1918
# recommended to deactivate current conda environment before running this
2019
create_environment:
2120
conda create -n $(ENVIRONMENT_NAME) python=3.11 $(CONDA_PACKAGES)
2221
conda run --no-capture-output -n $(ENVIRONMENT_NAME) python -m pip install uv
2322
conda run --no-capture-output -n $(ENVIRONMENT_NAME) uv pip install -c constraints.txt -e .[dev,docs]
23+
conda run --no-capture-output -n $(ENVIRONMENT_NAME) uv pip install --no-build-isolation -c constraints.txt -r requirements-healpix.txt
2424
conda run --no-capture-output -n $(ENVIRONMENT_NAME) uv pip install -r analysis-deps.txt
2525

2626
test:

PACKAGE_README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
[![Docs](https://readthedocs.org/projects/ai2-climate-emulator/badge/?version=latest)](https://ai2-climate-emulator.readthedocs.io/en/latest/)
2-
[![PyPI](https://img.shields.io/pypi/v/fme.svg)](https://pypi.org/project/fme/)
32

43
# FME: Weather/Climate Model Emulation
5-
This package contains code to train and evaluate weather/climate model emulators.
4+
This package contains code to train and evaluate weather/climate model emulators as seen in
5+
"ACE: A fast, skillful learned global atmospheric model for climate prediction" ([arxiv:2310.02074](https://arxiv.org/abs/2310.02074))
6+
and "Application of the Ai2 Climate Emulator to E3SMv2's global atmosphere model, with a focus on precipitation fidelity"
7+
([JGR-ML](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2024JH000136)).
8+
69

710
## Installation
811

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This repo contains code accompanying five papers describing ACE models:
1111
- "ACE: A fast, skillful learned global atmospheric model for climate prediction" ([link](https://arxiv.org/abs/2310.02074))
1212
- "Application of the Ai2 Climate Emulator to E3SMv2's global atmosphere model, with a focus on precipitation fidelity" ([link](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2024JH000136))
1313
- "ACE2: Accurately learning subseasonal to decadal atmospheric variability and forced responses" ([link](https://www.nature.com/articles/s41612-025-01090-0))
14-
- "ACE2-SOM: Coupling to a slab ocean and learning the sensitivity of climate to changes in CO2" ([link](https://arxiv.org/abs/2412.04418))
15-
- "Applying the ACE2 Emulator to SST Green's Functions for the E3SMv3 Global Atmosphere Model" ([link](https://arxiv.org/abs/2505.08742))
14+
- "ACE2-SOM: Coupling an ML Atmospheric Emulator to a Slab Ocean and Learning the Sensitivity of Climate to Changed CO<sub>2</sub>" ([link](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2024JH000575))
15+
- "Applying the ACE2 Emulator to SST Green's Functions for the E3SMv3 Global Atmosphere Model" ([link](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2025JH000774))
1616

1717
## Installation
1818

@@ -26,4 +26,25 @@ See complete documentation [here](https://ai2-climate-emulator.readthedocs.io/en
2626

2727
## Model checkpoints
2828

29-
Pretrained model checkpoints, and datasets to run them, are available in the [ACE Hugging Face](https://huggingface.co/collections/allenai/ace-67327d822f0f0d8e0e5e6ca4) collection.
29+
Pretrained model checkpoints are available in the [ACE Hugging Face](https://huggingface.co/collections/allenai/ace-67327d822f0f0d8e0e5e6ca4) collection.
30+
31+
## Available datasets
32+
Two versions of the complete dataset described in [arxiv:2310.02074](https://arxiv.org/abs/2310.02074)
33+
are available on a [requester pays](https://cloud.google.com/storage/docs/requester-pays) Google Cloud Storage bucket:
34+
```
35+
gs://ai2cm-public-requester-pays/2023-11-29-ai2-climate-emulator-v1/data/repeating-climSST-1deg-zarrs
36+
gs://ai2cm-public-requester-pays/2023-11-29-ai2-climate-emulator-v1/data/repeating-climSST-1deg-netCDFs
37+
```
38+
The `zarr` format is convenient for ad-hoc analysis. The netCDF version contains our
39+
train/validation split which was used for training and inference.
40+
41+
The datasets used in the [ACE2 paper](https://arxiv.org/abs/2411.11268) are available at:
42+
```
43+
gs://ai2cm-public-requester-pays/2024-11-13-ai2-climate-emulator-v2-amip/data/c96-1deg-shield/
44+
gs://ai2cm-public-requester-pays/2024-11-13-ai2-climate-emulator-v2-amip/data/era5-1deg-1940-2022.zarr/
45+
```
46+
47+
The dataset used in the [ACE2-SOM paper](https://arxiv.org/abs/2412.04418) is available at:
48+
```
49+
gs://ai2cm-public-requester-pays/2024-12-05-ai2-climate-emulator-v2-som/SHiELD-SOM-C96
50+
```

docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ ENV FORCE_CUDA_EXTENSION=1
2121
# install python deps
2222
COPY requirements.txt /tmp/requirements.txt
2323
RUN python3 -m pip install -r /tmp/requirements.txt
24+
COPY requirements-healpix.txt /tmp/requirements-healpix.txt
25+
RUN python3 -m pip install --no-build-isolation -r /tmp/requirements-healpix.txt
2426

2527
FROM base AS production
2628

docs/api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ fme.ace
1515

1616
.. automodule:: fme.ace
1717
:members:
18+
19+
fme.coupled
20+
===========
21+
22+
.. automodule:: fme.coupled
23+
:members:

docs/builder.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The Builder Pattern is a design pattern that lets user configuration change the
1111
Those objects are then used by the code, without that code ever knowing about or handling user configuration.
1212

1313
At its core, the builder pattern contains two components:
14+
1415
- A class that represents the configuration, called the Config, which has a build method returning a built instance.
1516
- A class built by the configuration, called the Product or the "instance".
1617

0 commit comments

Comments
 (0)