Skip to content

Commit

Permalink
Add calibration framework, perfectmodel experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Jul 3, 2024
1 parent e1aa08c commit bb9d6d1
Show file tree
Hide file tree
Showing 23 changed files with 6,295 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ steps:
- "julia --project=perf -e 'using Pkg; Pkg.precompile()'"
- "julia --project=perf -e 'using Pkg; Pkg.status()'"

- echo "--- Instantiate calibration/test"
- "julia --project=calibration/test -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=calibration/test -e 'using Pkg; Pkg.precompile()'"
- "julia --project=calibration/test -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=examples artifacts/download_artifacts.jl"

Expand Down Expand Up @@ -487,6 +492,14 @@ steps:
agents:
slurm_mem: 20GB

- group: "Calibration"
steps:
- label: "Calibration interface unit tests"
command: julia --project=calibration/test calibration/test/interface.jl
- label: "end to end test"
command: julia --project=calibration/test calibration/test/e2e_test.jl
artifact_paths: "calibration_end_to_end_test/*"

- group: "Diagnostic EDMFX"
steps:

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/calibration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Calibration
on:
push:
tags: '*'
pull_request:
merge_group:

jobs:
test:
name: ClimaCalibrate E2E Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- run: |
julia --project=calibration/test -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --project=calibration/test calibration/test/e2e_test.jl
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
test:
name: ci ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
Expand All @@ -38,6 +38,10 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@v1
- name: Calibration E2E Test
run: |
julia --project=calibration/test -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --project=calibration/test calibration/test/e2e_test.jl
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ test/Manifest.toml
*.hdf5
*.h5
*.g
*.lock
*.loc

# misc
.DS_Store
7 changes: 7 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ git-tree-sha1 = "9da4af348af2606764e5e2c94d9439714221dff1"
[[aerosol2005.download]]
sha256 = "952d723b8462439c266dc0df79d0d4e71f774559edb941e03b7979e8ad743f56"
url = "https://caltech.box.com/shared/static/chmel1vdthfvfac0yl61ayw2jqnjzr2c.gz"

[atmos_held_suarez_obs]
git-tree-sha1 = "d93ff2958e12d6bba6e8343bfa73554390df52e4"

[[atmos_held_suarez_obs.download]]
sha256 = "f5d63df2bab849632bd2fcd5a4e3165465d1898e1a5fbee6e5fe07f5b3e57fc3"
url = "https://caltech.box.com/shared/static/sbn6afsgn2xzxi5n0ffs928otstshjvi.gz"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ AtmosphericProfilesLibrary = "0.1"
ClimaComms = "0.6.2"
ClimaCore = "0.14.6"
ClimaDiagnostics = "0.2"
ClimaParams = "0.10.4"
ClimaParams = "0.10.8"
ClimaTimeSteppers = "0.7.32"
ClimaUtilities = "0.1.3"
CloudMicrophysics = "0.18, 0.19, 0.20"
Expand Down
23 changes: 23 additions & 0 deletions calibration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ClimaAtmos Calibration Experiments

This directory contains the model interface (`model_interface.jl`) for ClimaCalibrate and folders (within `experiments/`) for reproducing calibration experiments.

## Current Experiments

### sphere_held_suarez_rhoe_equilmoist

A perfect-model calibration, using ClimaAtmos v0.24.0.

- Configuration: 0-moment microphysics scheme, spherical with Held-Suarez forcing.
- Observational data: zonal and 60-day time average air temperature at 242m altitude. Provided by [ClimaArtifacts](https://github.com/CliMA/ClimaArtifacts/tree/main/atmos_held_suarez_obs).
- Parameter being calibrated: `equator_pole_temperature_gradient_wet`

For more details, see the experiment directory.

To reproduce the results, on the Caltech central cluster run

```sbatch calibration/experiments/sphere_held_suarez_rhoe_equilmoist/pipeline.sbatch```

## New Experiments

To set up your own experiment, please follow the [setup guide](https://clima.github.io/ClimaCalibrate.jl/dev/atmos_setup_guide/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[atmos_held_suarez_obs]
git-tree-sha1 = "d93ff2958e12d6bba6e8343bfa73554390df52e4"

[[atmos_held_suarez_obs.download]]
sha256 = "f5d63df2bab849632bd2fcd5a4e3165465d1898e1a5fbee6e5fe07f5b3e57fc3"
url = "https://caltech.box.com/shared/static/sbn6afsgn2xzxi5n0ffs928otstshjvi.gz"
Loading

0 comments on commit bb9d6d1

Please sign in to comment.