Skip to main content

pysteps-nwp-importers

Pysteps plugin to import a variety of NWP rainfall forecasts. This plugin was created for pysteps 1.x with Cookiecutter, and has since been converted to the xarray data model of pysteps 2.x. It makes the NWP importers findable for the Pysteps importer functionality after installation.

License

  • BSD license

Documentation

NWP rainfall forecast importer using pysteps utilities. This plugin currently provides importers for:

  • KNMI HARMONIE NWP forecasts

  • BoM NWP forecasts

  • RMI NWP forecasts

  • DWD NWP forecasts

The importers follow the xarray-based data model of pysteps v2 (see pysteps.io.importers): each importer returns an xarray.Dataset instead of the (precip, quality, metadata) tuple of pysteps v1. The metadata is stored in the dataset: the projection and institution in its attributes, the unit, accumulation time, threshold and zero value in the attributes of the precipitation variable, and the grid and valid times in its coordinates.

Once the plugin is installed, the importers are available through the pysteps interface:

from pysteps import io

importer = io.get_method("bom_nwp", "importer")
nwp_dataset = importer(filename)
precip_var = nwp_dataset.attrs["precip_var"]
nwp_dataset[precip_var]  # dimensions (time, y, x)

The DWD ICON-D2-RUC importer returns the rainfall on the unstructured ICON grid, with dimensions (ens_number, time, cell). Use unstructured2regular to reproject it onto the grid of another pysteps dataset, such as a radar composite:

from pysteps_nwp_importers.importer_dwd_nwp import unstructured2regular

importer = io.get_method("dwd_nwp", "importer")
nwp_dataset = importer(filename, varname="PR_GSP", grid_file_path=grid_file)
nwp_dataset = unstructured2regular(nwp_dataset, radar_dataset)
# dimensions (ens_number, time, y, x), on the grid of radar_dataset

pysteps.blending.steps.forecast expects the NWP dataset to have an ens_number dimension. For a deterministic NWP forecast, add it with nwp_dataset.expand_dims(ens_number=[1]).

Installation

The plugin requires pysteps 2.0 (2.0.0rc3 or later) and is packaged and managed with uv.

To add the latest development version of pysteps_nwp_importers to a uv project, run in a terminal:

uv add pysteps-nwp-importers

or, to install it into an existing environment without modifying a project:

uv pip install pysteps-nwp-importers

The DWD importer also needs pygrib, which is an optional dependency, installed with the pygrib extra:

uv add "pysteps-nwp-importers[pygrib]"

or, with uv pip:

uv pip install "pysteps-nwp-importers[pygrib]"

pygrib has no Windows wheels on PyPI, so on Windows the pygrib extra installs nothing; the other importers work without it.

Test the plugin

This plugin comes with a tester, which can also be used to test whether the plugin is correctly hooked up to pysteps.

In a clone of this repository, install the plugin with its dependencies (including the pygrib extra and the dev dependency group) and run the tests with:

uv sync --all-extras
uv run pytest -v --tb=line

On Windows, pygrib is not installed and the DWD tests are skipped.

The tests download their data from pysteps-data on the first run.

Credits

This package was created with Cookiecutter and the cookiecutter-pysteps-plugin project template. The cookiecutter-pysteps-plugin template was adapted from the cookiecutter-pypackage template.

Metadata

Release files for pysteps-nwp-importers 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysteps-nwp-importers 2.0.0
File Size Uploaded Provenance Actions
pysteps_nwp_importers-2.0.0.tar.gz 18.2 kB With provenance Details for pysteps_nwp_importers-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysteps-nwp-importers 2.0.0
File Interpreter ABI Platform Actions
pysteps_nwp_importers-2.0.0-py3-none-any.whl Python 3 none any Details for pysteps_nwp_importers-2.0.0-py3-none-any.whl

Total release size: 43.0 kB

Release files / pysteps_nwp_importers-2.0.0.tar.gz

Download URL pysteps_nwp_importers-2.0.0.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fe78796ff730842a02e87b1338500a2430e95015c58192e2f5bb151266f6f3a7
BLAKE2b-256 checksum
How to use checksums
51ba05b92bdd00dcbc4050c1bf528395249244f8fdcb9b1c55daedc74eb6520b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / pysteps_nwp_importers-2.0.0-py3-none-any.whl

Download URL pysteps_nwp_importers-2.0.0-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
685a91c6928eadc0f9b99835b6f8d678045de95652b3c86c49dc10c45a0252da
BLAKE2b-256 checksum
How to use checksums
c6e81d59fc932ededfc02f4dbb64082430d07318031fc8bb95579daf17dd6222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for pysteps-nwp-importers 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysteps_nwp_importers-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page