MAM4-JAX
A JAX port of the MAM4 (Modal Aerosol Module, 4-mode) aerosol-microphysics box model, validated against the E3SM Fortran reference.
The goal is a modern, readable, reproducible implementation of MAM4's microphysical processes — calcsize, water uptake, gas–aerosol exchange, nucleation, coagulation, and rename — written in JAX with float64 precision and verified element-wise against the Fortran reference to a relative error of 1e-6.
Status: scaffolding. The Fortran reference has been imported; the JAX package is not yet started. See
CLAUDE.mdfor working rules and architecture notes that govern the port.
Repository layout
mam4-jax/
├── CLAUDE.md # Working rules, architecture, validation workflow
├── README.md # (this file)
└── mam4-original-src-code/ # Vendored Fortran reference — read-only
The JAX package, test harness, validation data, and design docs (ARCHITECTURE.md, PROGRESS.md, PLANS.md, KEY_DECISIONS.md, DEFERRED.md, FEATURES.md) will land as the port progresses.
Fortran reference: provenance
The contents of mam4-original-src-code/ are a frozen snapshot vendored into this repository. They are not a submodule and will not auto-update from upstream.
| Field | Value |
|---|---|
| Snapshot taken | 2025-12-10 |
| Immediate source | https://github.com/reflective-org/MAM4_box_model |
| Commit | 4150e2d582a8fa6debca5009d22ec000496bd405 |
| Upstream project | https://github.com/kaizhangpnl/MAM_box_model (Kai Zhang et al., PNNL) |
If you need to inspect the Fortran reference's history, diff against later upstream versions, or reproduce the snapshot, clone the source above at the pinned commit.
The vendored snapshot is read-only within this repo — do not modify the files under mam4-original-src-code/. To update the snapshot, replace the directory wholesale from a fresh upstream checkout and record the new commit/date in this table within the same PR.
References
- Liu, X. et al. (2012). Toward a minimal representation of aerosols in climate models: description and evaluation in the Community Atmosphere Model CAM5. Geosci. Model Dev., 5, 709–739. https://doi.org/10.5194/gmd-5-709-2012
- Liu, X. et al. (2016). Description and evaluation of a new four-mode version of the Modal Aerosol Module (MAM4) within version 5.3 of the Community Atmosphere Model. Geosci. Model Dev., 9, 505–522. https://doi.org/10.5194/gmd-9-505-2016
License
This project is released under the GPL v3 License - see the LICENSE file for details.
[!IMPORTANT] Note that the vendored Fortran reference under
mam4-original-src-code/retains its upstream license.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mam4_jax-0.3.2.tar.gz.
File metadata
- Download URL: mam4_jax-0.3.2.tar.gz
- Upload date:
- Size: 164.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
645dd0e3c9101e1ae652738065f88aeba713db48acc998e1899a3fc6bf228cce
|
|
| MD5 |
edca0aad4b5bc3a46e4e5173fd12bb25
|
|
| BLAKE2b-256 |
dba8a3d1e1636a61fd8e01fc204e377da9c2b9c2eda6651860b8beb7fe279994
|
Provenance
The following attestation bundles were made for mam4_jax-0.3.2.tar.gz:
Publisher:
publish.yml on reflective-org/MAM4-JAX
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mam4_jax-0.3.2.tar.gz -
Subject digest:
645dd0e3c9101e1ae652738065f88aeba713db48acc998e1899a3fc6bf228cce - Sigstore transparency entry: 2537563576
- Sigstore integration time:
-
Permalink:
reflective-org/MAM4-JAX@a797a02eac76332390e25ff33c099cc0ea98991c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/reflective-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a797a02eac76332390e25ff33c099cc0ea98991c -
Trigger Event:
push
-
Statement type:
File details
Details for the file mam4_jax-0.3.2-py3-none-any.whl.
File metadata
- Download URL: mam4_jax-0.3.2-py3-none-any.whl
- Upload date:
- Size: 125.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e70ec45e36161f1d26391aeaaa20b431a1dcfac3ce5c88108263965807ebc0a7
|
|
| MD5 |
c0d1cade24445001c45b6c6e3ffde501
|
|
| BLAKE2b-256 |
862f161fbc1f6e94f14d2a5c819ef993b9492b8c6100c9d98d6fc6e0401b5043
|
Provenance
The following attestation bundles were made for mam4_jax-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on reflective-org/MAM4-JAX
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mam4_jax-0.3.2-py3-none-any.whl -
Subject digest:
e70ec45e36161f1d26391aeaaa20b431a1dcfac3ce5c88108263965807ebc0a7 - Sigstore transparency entry: 2537563655
- Sigstore integration time:
-
Permalink:
reflective-org/MAM4-JAX@a797a02eac76332390e25ff33c099cc0ea98991c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/reflective-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a797a02eac76332390e25ff33c099cc0ea98991c -
Trigger Event:
push
-
Statement type: