An interactive Geophysical Fluid Dynamics Textbook Notation

How to run these notebooks

Every chapter embeds a live marimo notebook compiled to WebAssembly. There are three ways to use them, in increasing order of commitment.

1. In the browser — nothing to install

Just use the chapter page. The embedded notebook runs entirely in your browser tab via Pyodide (CPython compiled to WebAssembly): there is no server, and nothing you do can affect anyone else — reload the page to reset everything.

What to expect:

2. Locally — for the exercises

Each chapter’s computational exercise asks you to modify the notebook, and the natural place to do that is a local checkout:

git clone https://github.com/aneeshcs/gfd_textbook_aneesh
cd gfd_textbook_aneesh/gfd-book
pip install -r requirements.txt        # marimo, numpy, matplotlib, pytest
marimo edit notebooks/ch06_geostrophic-adjustment.py

marimo edit opens the notebook in your browser as an editable, reactive document — change any cell and everything downstream recomputes. The notebooks import the shared library gfdlib straight from the repo (the import cell at the top of every notebook handles the local-vs-browser difference automatically), so edits to gfdlib take effect immediately too.

Three things worth knowing before you start editing:

3. Rebuilding the site — for contributors

To reproduce the full pipeline (export every notebook to WASM and preview the site):

make test        # gfdlib correctness — must pass
make notebooks   # export all notebooks -> site/static/nb/
make serve       # hugo server -D, preview at localhost:1313

See the contributor docs in the repo — docs/architecture.md for how the marimo → WASM → Hugo pipeline works and the performance budget behind it, and docs/authoring.md for the add-a-chapter checklist. Symbols and sign conventions for all chapters are fixed on the notation page.