zampy
Tool for downloading Land Surface Model (LSM) input data.
Named after Zam; the Avestan language term for the Zoroastrian concept of "earth".
Outline
zampy is designed to retrieve data for LSM model input. It can help you prepare the data within the following steps:
- Download the data for the specified location(s) / geographical area.
- Ingest data into unified (zampy) format.
- Load the variables in a standardized way (standardized names & standardized units).
- Convert the data to standard formats:
- ALMA / PLUMBER2's ALMA formatted netCDF.
- CMOR formatted netCDF.
(Note: items in italic will not be worked on for now/low priority, but we want to allow space for these in the future.)
Getting start
Installation
To install the latest release of zampy, do:
python3 -m pip install zampy
To install the in-development version from the GitHub repository, do:
python3 -m pip install git+https://github.com/EcoExtreML/zampy.git
Configuration
Zampy needs to be configured with a simple configuration file.
You need to create this file under your user home directory:
~/.config/zampy/zampy_config.yml
The configuration file should contain the working_directory, for instance:
working_directory: /path_to_a_working_directory/ #for example: /home/bart/Zampy
If you need access to data on CDS or ADS server, you should add your CDS or ADS credentials to zampy_config.yml:
cdsapi:
url: # for example https://cds.climate.copernicus.eu/api/v2
key: # for example 12345:xhashd-232jcsha-dsaj429-cdjajd29319
adsapi:
url: # for example https://ads.atmosphere.copernicus.eu/api/v2
key: # for example 12345:xhashd-232jcsha-dsaj429-cdjajd29319
About how to create CDS or ADS credentials, check the section below.
How to use zampy
We recommend our users to use zampy with recipes.
A "recipe" is a file with yml extension, it defines:
- data downloading
- time extent.
- spatial location / bounding box.
- datasets to be downloaded
- variables within datasets
- data conversion
- convert to desired conventions
- output frequency
- output resolution
A sample recipe can be found in the documentation.
When you have your reciped created and saved on your disk, you can execute your recipe by running the following code in your shell:
zampy /path_to_recipe/sample_recipe.yml
We also provide python API for you to intereact with zampy. You can find the example notebooks for each supported dataset here.
Instructions for CDS/ADS datasets
To download the following datasets, users need access to CDS/ADS via cdsapi/adsapi:
- CDS
- ERA5
- ERA5 land
- LAI
- land cover
- ADS
- CAMS EGG4 (e.g. co2)
To generate these API keys, you need to be a registered user on CDS via the registration page, or on ADS via the registration page.
Before submitting any request with zampy, please put your cdsapi/adsapi credentials in zampy_config.yml. Here is a short instruction about how to find your CDS/ADS API key. You can skip the steps related to .cdsapirc and simply add the key to zampy_config.yml.
Agree to the Terms of Use on CDS/ADS
When downloading a dataset for the first time, it is necessary to agree to the Terms of Use of every datasets that you intend to download. This can only be done via the CDS/ADS website. When you try to download these datasets, you will be prompted to go to the terms of use and accept them.
Acknowledgements
This package was developed by the Netherlands eScience Center. Development was supported by the Netherlands eScience Center under grant number NLESC.ASDI.2020.026.
Metadata
Release files for zampy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zampy-0.2.0.tar.gz | 2.8 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zampy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.0 MB
Release files / zampy-0.2.0.tar.gz
| Download URL | zampy-0.2.0.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f60448ca7f0573df4c1046b47ceb632393ed9f8c63597c77bfcfbe23e4b721e
|
|
BLAKE2b-256 checksum How to use checksums |
d83a87ee720b7640d585fb8a835f9fe34e20569ab0278588d6432e2dd61bfa02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|
Release files / zampy-0.2.0-py3-none-any.whl
| Download URL | zampy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 280.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67199426c049810060b2db8877d3903e299f1e484b7d454c913ece723e2a48cc
|
|
BLAKE2b-256 checksum How to use checksums |
b571b13aa0447fd154e3d39b26a3615ef12724958a48e766ec11d9361b55af54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|
Security for zampy 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.