Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

coordax — tutorials

Pedagogical tutorials for coordax, the coordinate-aware JAX array library

UNEP
IMEO
MARS

coordax notebooks

Showcase notebooks ported from jej_vc_snippets/jax/coordax — pedagogical tutorials for coordax, a coordinate-aware array library for JAX that sits between raw jax.numpy arrays and the full xarray Hoyer & Hamman (2017) stack.

Each notebook is executed end-to-end with outputs embedded, so everything (prints, tables, numeric checks) renders inline in the MyST docs site without re-execution.

Each sub-section is a curated landing page that leads with the math, numerics, and references before pointing at the notebooks themselves.

Foundations

NotebookTopic
foundations/01_create_datasets.ipynbWrapping arrays as Field objects with LabeledAxis / SizedAxis
foundations/02_ops_unary_binary.ipynbArithmetic, comparison, and unary ops on Field; broadcasting rules
foundations/03_ops_coordinates.ipynbisel, sel, reindexing, CartesianProduct, coordinate composition
foundations/04_reductions.ipynbCoordinate-aware reductions: sum, mean, max over named dims

Derivatives

NotebookTopic
derivatives/05_finite_difference.ipynbPeriodic + non-uniform finite-difference derivatives; cmap pattern
derivatives/06_spherical_harmonics_derivatives.ipynbSpherical-harmonic derivatives on a Gauss-Legendre lat-lon grid (no FD pole singularity); Laplacian; vorticity and divergence
derivatives/07_finite_volume.ipynbCell-centred FV operators; flux divergence; conservative schemes

Dynamics

NotebookTopic
dynamics/08_ode_integration.ipynbIntegrating ODEs (advection-diffusion) with diffrax; state as Field
dynamics/09_ode_parameter_state_estimation.ipynbJoint parameter/state estimation via optax + jax.value_and_grad
dynamics/10_pde_parameter_estimation.ipynbLearning PDE parameters from data; coordinate-aware residuals

Running locally

These notebooks depend on coordax and its ML stack (JAX, diffrax, optax, equinox). The committed .ipynb files carry their cell outputs, so MyST renders them inline without needing the kernel installed — no extra setup is required to view the site.

Re-executing the notebooks is not part of this repo’s tooling. The source environment lives in jej_vc_snippets/jax/coordax, which ships a pixi environment with coordax, JAX, diffrax, optax, and equinox pinned together.

References
  1. Hoyer, S., & Hamman, J. (2017). xarray: N-D Labeled Arrays and Datasets in Python. Journal of Open Research Software, 5(1). 10.5334/jors.148