Download and analyse ERA5 data from the Climate Data Store.
Information regarding the available variable names can be found at the ERA5 data documentation website.
Either the name
or the shortName
columns may be used.
First, download the repository via cloning or by downloading and then extracting the zip file.
It is assumed that the unpacked (or cloned) contents are in the ./era5analysis
directory from here on.
Using conda
with an existing, activated environment:
conda install `xargs < ./era5analysis/requirements.txt` -c conda-forge -y
Creating a new environment:
conda create --file ./era5analysis/requirements.txt --name era5analysis -c conda-forge -y
This will create a new environment called 'era5analysis' that will contain the required packages.
You can install the package in editable mode like so:
pip install -e ./era5analysis --no-dependencies
Here, --no-dependencies
is used since we have already installed the dependencies using conda
.
The data directory (DATA_DIR
) and logging directory (should you apply the logging configuration given in the package) are both set to the current working directory by default.
The ~/era5_analysis_config.yaml
configuration file (in your home directory) can be used to set default values for these parameters.
This can contain the following two values, where the directories themselves may be changed, of course:
DATA_DIR: ~/DATA/
LOG_DIR: ~/Documents/era5analysis_logs/
The target_dir
argument of the retrieve()
function takes precedence over default values for DATA_DIR
.
For examples, please see examples/examples.py.