Skip to main content

Download of public GRIB1/GRIB2 and netCDF data from numerical weather prediction models

Project description

GribMagic - generic weather forecast downloader

CI codecov python version license status downloads

image

Simulations are believed by no one except those who conducted them.

Experimental results are believed by everyone except those who conducted them.

ANONYMOUS

About

The goal of the GribMagic project is to unify the download process of public GRIB1/GRIB2 and netCDF data from numerical weather prediction models originating from different organizations and data providers.

This is a work in progress, as such GribMagic is currently considered to be beta software. As this is an early-stage project, contributions are highly appreciated.

Development

Setup

Install the ecCodes package by ECMWF.

# Debian Linux
apt-get install libeccodes0

# macOS/Homebrew
brew install eccodes

Install GribMagic Python package.

pip install gribmagic --upgrade

Run program

Ad hoc usage

# List labels of available models.
gribmagic unity list

# Acquire data.
gribmagic unity acquire --model=dwd-icon-eu --timestamp=2021-10-03T00:00:00Z --target=.gribmagic-data

Configuration

To optionally adjust configuration settings, you can define the following environment variables:

GM_DATA_PATH={PATH_TO_PROJECT}/data

GM_MODEL_CONFIG={PATH_TO_PROJECT}/config/model_config.yml"
GM_MODEL_VARIABLES_MAPPING={PATH_TO_PROJECT}/config/model_variables_mapping.yml"
GM_MODEL_VARIABLES_LEVELS_MAPPING={PATH_TO_PROJECT}/config/model_variables_levels_mapping.yml"

ECCODES_DEFINITION_PATH=/usr/share/eccodes/definitions:/usr/local/opt/eccodes/share/eccodes/definitions

Run program in Docker

To use GribMagic in a Docker container, you have to build the Docker image like

docker build --tag gribmagic .

and then invoke it like

docker run -it --volume=$PWD/.gribmagic-data:/var/spool/gribmagic gribmagic:latest gribmagic unity acquire --model=dwd-icon-eu --timestamp=2021-10-03T00:00:00Z

Development

Acquire source code

git clone https://github.com/earthobservations/gribmagic
cd gribmagic

Run software tests

# Run all tests.
make test

# All tests, with code coverage report.
make test-coverage

Content attributions

The copyright of data sets, images and pictograms are held by their respective owners, unless otherwise noted.

Banner image

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gribmagic-0.1.0.tar.gz (27.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page