[WIP] feat : integrate JCM physics with MOLA topology - #47
Open
sameeerkashyap wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
What changed?
This PR adds the JCM (jax-gcm) 3-D general circulation model as a new simulation backend for Mars. It runs behind the existing Planet / TimeController / Snapshot interface. The 0-D PyTorch box model stays intact.
Main additions:
Why was this needed?
The 0-D box model gives one global temperature and pressure. It cannot show spatial climate: winds, the topographic pressure range, or polar processes. Mars terraforming needs a 3-D, differentiable model for inverse design later. JCM is built on the same dinosaur differentiable core as NeuralGCM, so it fits this goal.
Implementation notes
Tests
Test details
Four new test files under package/tests/mars/basic/:
Commands run:
cd package && uv run python -m pytest tests/mars/basic/ -q # new tests pass
cd package && uv run python -m pytest tests/engine -q -m "not slow" # FAST/ACCURATE unaffected
uv run pyright package/src/celestials/planets/mars/ package/src/engine/time_controller.py # 0 errors
Slow tests (build a JCM model) carry @pytest.mark.slow. MOLA tests skip when the data is absent, so CI stays data-free.
Why are no tests needed?
N/A.
Simulations, examples, and observations
Simulation setup
Reproduction steps
1. Get the MOLA topography
python scripts/download_mola_topography.py
2. Drive MarsGCM through the existing engine
cd package && uv run python - <<'PY'
from src.celestials.planets.mars.gcm import MarsGCM
from src.engine import TimeController, Accuracy
tc = TimeController(MarsGCM(), dt=3600.0, accuracy=Accuracy.GCM)
history = tc.run(duration=3600.0 * 3) # three one-hour steps
for s in history:
print(float(s.surface_temperature), float(s.surface_pressure))
PY
Results / artifacts
Observations
Reviewer notes
Specific feedback requested
Follow-up work (later steps)