Readers and converters for data from the ECMWF reanalysis models.
Project description
Readers and converters for data from the ECMWF reanalysis models. Written in Python.
Works great in combination with pytesmo.
Description
A small package for downloading ECMWF reanalysis data and converting it into a time series format supported by pytesmo.
Documentation
Supported Products
This version supports the following products:
ERA-Interim
Downloading data
ERA-Interim data can be downloaded manually from the ECMWF servers. It can also be done automatically using the ECMWF API. To use the ECMWF API you have to be registered, install the ecmwf-api Python package and setup the ECMWF API Key. A guide for this is provided by ECMWF.
After that you can use the command line program ecmwf_download to download data. For example ecmwf_download /path/to/storage 39 40 -s 2000-01-01 -e 2000-02-01 would download the parameters 39 and 40 into the folder /path/to/storage between the first of January 2000 and the first of February 2000 The data will be stored in yearly subfolders of the format ei_YYYY. After the download the data can be read with the ecmwf_models.ERAInterimDs class.
Reading data
The dataset can be read by datetime using the ecmwf_models.ERAInterimDs.
from ecmwf_models import ERAInterimDs
root_path = "/path/to/storage"
ds = ERAInterimDs('39', root_path)
data = ds.read(datetime(2000, 1, 1, 0))
assert data.data['39'].shape == (256, 512)
assert data.lon.shape == (256, 512)
assert data.lat.shape == (256, 512)
Multiple parameters can be read by providing a list to ERAInterimDs:
from ecmwf_models import ERAInterimDs
root_path = "/path/to/storage"
ds = ERAInterimDs(['39', '40'], root_path)
data = ds.read(datetime(2000, 1, 1, 0))
assert data.data['39'].shape == (256, 512)
assert data.data['40'].shape == (256, 512)
All images between two given dates can be read using the ERAInterimDs.iter_images method.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ecmwf_models-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93586ef0bd4340a0628b5fcb801d2a17f60c8b596b57765e15b62a3e85008670 |
|
MD5 | 9f56689b57bced7832e7cf2641e196a6 |
|
BLAKE2b-256 | 4ac059d2632b9abf962a992cb848d78e45734fd5b3eae8ccc6102ed6e8c95e82 |