NDSL is a modern domain-specific language (DSL) for portable, high-performance atmospheric modeling. It let's you build portable atmospheric modeling workflows across CPUs, GPUs, and emerging computing architectures from a single codebase. NDSL is developed jointly by NOAA and NASA.
As a user, with uv as project and dependency manager, it's quick to get up and running.
# Setup a project
uv init --python=3.12 example/
cd example/
uv add git+https://github.com/noaa-gfdl/ndsl.git --tag 2026.08.00 --extra openmpi
# Note: drop `--extra openmpi` if you want to use your system's MPI
# Generate & run NDSL code
uv run ndsl-gencode --exec --output ndsl_example.py
uv run ndsl_example.pyCheck our documentation for a more detailed setup guide.
Historically, NDSL was developed to port the FV3 dynamical core on the cubed-sphere. Therefore, the middleware ships with ready-to-execute specialization for models based on cubed-sphere grids and FV-based models in particular.
NDSL unites the Cartesian flavor of GT4Py with DaCe. On top of those pillars, NDSL deploys a series of optimized APIs for common operations (Halo exchange, domain decomposition, MPI, ...), a set of bespoke optimizations for the models targeted by the middleware and tools to port existing models.
GT4Py is a stencil DSL developed by the ETH-affiliated Swiss National Computing Center (CSCS), developed for high-performance and portability. DaCe is ETH SPCL's data flow framework and was used in projects that won the ACM Gordon Bell Prize for Climate Modelling.
NDSL is under active development. If you feel like helping, please reach out (see points of contact below).
$ git clone git@github.com:NOAA-GFDL/NDSL.git
$ cd NDSL/
$ uv sync
# `.venv` contains an editable install of NDSL and includes all dev tools (linter, docs, ...)
$ source .venv/bin/activate
# Run linting and type checks before every commit
(ndsl) $ pre-commit installFor more a complicated developer setup installing multiple repositories in editable mode, please refer to the team's dev setup guide.
Tests are written with pytest and located in the tests/ folder. To run serial tests on CPU, run
(ndsl) $ pytest -m "not parallel and not gpu and not zarr and not pyfms" tests/To run parallel tests on CPU, run
(ndsl) $ mpirun -np 6 pytest -m "parallel and not gpu" tests/add --oversubscribe if your computer provides less than 6 processors.
- Code quality is enforced by
pre-commitas part of CI. Runpre-commit installto install the pre-commit hooks locally or make sure to runpre-commit run -abefore submitting a pull request. - While we don't strictly enforce type hints, we add them on new code.
Documentation is available online. We are using Zensical, which allows us to write the docs in Markdown files and serve it as a static site. To view the documentation locally, install NDSL in development mode (see above). Then, start the development server
(ndsl) $ zensical serveand view the documentation at localhost:8000.
Typo in the docs? Contributing to the documentation is straight forward:
- Add and/or change files in the docs/ folder as necessary.
- [Optional] If you have changes to the navigation, modify zensical.toml.
- [Optional] Start the development server and look how your changes are rendered.
- Submit a pull request with your changes.
Primary contacts:
- NOAA: Rusty Benson: rusty.benson -at- noaa.gov
- NASA: Florian Deconinck florian.g.deconinck -at- nasa.gov
Visit our documentation to see the full team and join the community.