A laptop-scale, qualitatively plausible spectral general circulation model for
worldbuilding, including exoplanets (tidally locked, slow and fast rotators).
Rust core, Godot viewer. See SPEC.md for the design and milestones and
docs/progress.md for the current state, and
docs/design-decisions.md for the owner's scoping decisions.
| Path | What |
|---|---|
crates/toyclim-core |
numerics, models, physics, I/O (no Godot) |
crates/toyclim-headless |
the toyclim binary: run cases, benchmarks |
crates/toyclim-godot |
GDExtension for the viewer |
godot/ |
Godot project (viewer) |
cases/ |
TOML run configs |
tools/ |
Python analysis and plotting |
docs/ |
progress log and acceptance figures |
Requires a recent stable Rust toolchain (tested with 1.97).
cargo build --releasecargo test --workspacecargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warningsLong acceptance tests are #[ignore]d:
cargo test --release -- --ignoredSingle precision build: add --features toyclim-core/f32.
cargo run --release --bin toyclim -- list-casescargo run --release --bin toyclim -- run --config cases/dummy.toml --out out/dummyOutput goes to out/<run>/: meta.json (grid, planet, config echo, git hash),
fields/<field>_<step:06>.npy (float32, Gaussian grid, [lat][lon] or
[lev][lat][lon], row 0 = northernmost) and diagnostics.csv.
pip install -r tools/requirements.txtpython tools/plot_field.py out/dummy analytic --kind map--kind is map, polar or zonal; --step N picks an output step (default: last).
python tools/make_planet.py worlds/myworld.npy --seed 7 --land 0.35Copy cases/testworld_t21.toml, point [surface] heightmap at your file, adjust
[planet] and [orbit] (year, obliquity, eccentricity, instellation, tidally_locked), add
[[stations]] where you want weather statistics, then:
cargo run --release --bin toyclim -- run --config cases/myworld.toml --out out/myworldpython tools/station_stats.py out/myworld precip --scale 3600 --unit mm/h --thresholds 0.1,2,20 --by-monthpython tools/koppen.py out/myworldtools/moist_stats.py (precipitation/evaporation), tools/zonal_mean.py (circulation),
tools/tidally_locked.py and tools/plot_field.py give more views. Physics available so
far: dry Held–Suarez-type forcings, moist physics (large-scale condensation, simplified
Betts–Miller convection, surface fluxes, boundary layer), gray radiation, slab ocean, land
with a bucket model. See docs/progress.md for what is validated and what is not.
Install Godot 4.5 or newer, then:
./runThis builds toyclim-godot in release mode and opens godot/. Set GODOT=/path/to/godot
if the binary is not on PATH. (Until M3 the viewer only checks that the extension loads.)