Python utilities for climate data collection and management
Project description
Miranda
Python utilities for climate data collection, conversion, and management
Features
- Data collection functions for climate and forecast data hosted at:
ECMWF (ERA5, ERA5-Land, TIGGE)
ECCC (Canada) (Monthly Climate Summaries, ECCC GEOAPI - In development)
NCAR (CORDEX-NA on AWS)
- Data conversion for Climate and Forecasting (CF) Variable and Metadata compliance:
ECMWF (ERA5, ERA5-Land, TIGGE - In Development)
ECCC (Canada) (Flat File Observations, Monthly Climate Summaries, Adjusted and Homogenized Climate Data, ECCC GEOAPI - In Development)
MELCC (Québec)
Hydro-Québec (In Development)
- Database structuring and facets validation:
- Simulations:
WCRP (CMIP5, CMIP6, CMIP5-CORDEX, CORDEX-ADJUST, ISIMIP, etc.)
- Station-Observations:
MELCC (Québec) (Needs mdbtools installed)
ECCC (Canada) (In Development)
Hydro-Québec (In Development)
- Gridded-Observations:
NRCAN (Canada) (Future)
MELCC (Future)
- Reanalyses:
ECMWF (ERA5, ERA5-Land, TIGGE)
NASA (DayMET, AgMerra/AgCFSR, MERRA2) - In Development
NCEP (CFSR/CFSv2) - In Development
WFDEI-GEM-CaPa (University of Saskatchewan) - In Development
Installation
miranda can be installed from PyPI:
$ pip install miranda
Some functionalities require complex-to-install dependencies. In order to gain access to them, we strongly suggest using Anaconda to manage your environment:
$ conda env create -f environment.yml $ conda activate miranda $ pip install miranda[full]
- For more information about Anaconda/Miniconda/conda-forge:
conda-forge: https://conda-forge.org/#about
miranda also relies on PyESSV for its climate data controlled vocabulary. This library is optional for users who do not require validation checks, but enabling this feature requires additional installation steps:
$ mkdir -p ~/.esdoc $ git clone git@github.com:ES-DOC/pyessv-archive.git ~/.esdoc/pyessv-archive
Contributing
See the contributing documentation: https://miranda.readthedocs.io/en/latest/contributing.html
Documentation
The full documentation is at https://miranda.readthedocs.io/en/latest.
History
v0.4.0 (2023-03-30)
Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Travis Logan (@tlogan2000).
New features
Improvements have been made to the development documentation; Project URLs, ReadTheDocs theming, and other quality of life changes.
Conversion JSON definitions now support pre-processing to render dimensions and variable names consistent before running corrections/conversions.
- New datasets with CF-like attributes conversion supported:
RDRS (ECCC)
GRNCH (ETS)
Preliminary miranda.io module for organizing output-writing functionality.
New miranda.io.fetch_chunk_config function for “rechunking” datasets according to project presets.
New mirands.io.utils.name_output_file for generating names from Dataset facets or from a dictionary.
New mirands.gis.subset_domain for clipping dataset to a preconfigured region.
Bug fixes
Many data-related utilities now have more accurate static typing.
Converted dataset global attributes are now synchronized for consistency.
ECMWF-based datasets now implement more consistent conversion factors and metadata.
miranda.storage.file_size now handles dictionaries of Pathlib objects.
Internal changes
Pre-commit version updates.
Improvements have been made to the development documentation; Project URLs, ReadTheDocs theming, installation methods, and other quality of life changes.
- Schema and folder structure updates:
gridded-obs -> reconstruction
bias-adjust-project is used when present and not just when level==”biasadjusted”
CI now using tox>=4.0 and ubuntu-latest virtual machine images.
v0.3.0 (2022-11-24)
Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), David Huard (@huard), Travis Logan (@tlogan2000), Gabriel Rondeau-Genesse (@RondeauG), and Sébastien Biner (@sbiner).
Announcements
First public release on PyPI.
New features
- Dataset conversion tools (miranda.convert) use a JSON-definition file to dynamically populate metadata, run data quality checks, and convert units to CF-compliant standard. Supported datasets are:
ERA5/ERA5-Land (complete)
MELCC (stations) (beta)
ECCC (stations) (alpha)
NASA DayMet (WIP)
NASA AgMerra/AgCFSR (WIP)
Hydro Québec (stations) (WIP)
DEH (stations) (WIP)
WFDEI-GEM-CAPA (WIP)
Module (miranda.eccc) for ECCC station data and ECCC Adjusted and Homogenized Canadian Climate Data (AHCCD) conversion (WIP).
Module (miranda.ncar) for fetching interpolated CORDEX-NAM (22i/44i) from NCAR AWS data storage.
Module (miranda.ecmwf) for fetching ECMWF ERA5/-Land (single-levels, pressure-levels, monthly-means) datasets via CDSAPI.
Module (miranda.gis) for setting specific subsetting domains used when converting gridded datasets.
Modules (miranda.archive and miranda.remote) for performing data archiving actions locally and remotely (powered by fabric and paramiko) (WIP).
- Module (miranda.decode) for ingesting and parsing dataset metadata based on filename and dataset attributes. Supported datasets are:
miranda converted datasets
CMIP6
CMIP5
CMIP5-CORDEX
ISIMIP-FT
CanDCS-U6 (PCIC)
Module (miranda.structure) for create constructing file-tree databases based on YAML-defined metadata schemas (WIP).
Modules (miranda.cv and miranda.validators) for validating metadata using ESGF controlled vocabularies (taken from pyessv-archive) and schema definitions (powered by schema), respectively (WIP).
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
File details
Details for the file miranda-0.4.0.tar.gz
.
File metadata
- Download URL: miranda-0.4.0.tar.gz
- Upload date:
- Size: 150.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84e7001cca6b837824af69a219e336d7d24e050e9b9ef4353af2f1d1229974ca |
|
MD5 | d4e66d1f35a044854c90c78de18f7d75 |
|
BLAKE2b-256 | dad124c82def55113bbfaabb653a73d7fabce819ed6726c1f85baedd02edba4a |
File details
Details for the file miranda-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: miranda-0.4.0-py3-none-any.whl
- Upload date:
- Size: 173.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156460b6d254b4d99a88133efaaa2233322026cc993f70fc0f1d28021e549f57 |
|
MD5 | ef30e35d3d0c41d7777dd968da2760ca |
|
BLAKE2b-256 | c6ae5010c8ba2f5348f59fb642e854f5456b040016dceb9fb59cb03693f4bb16 |