Repository for collaboration on workflows for HAZARD hazard.
Part of the Climate Risk Assessment handbook.
See our how to run risk workflows page in the CLIMAAX handbook for more information.
Binder sessions are not persistent and may not provide the necessary computing resources to run all workflow steps.
In a terminal where git and conda are available:
-
Clone the repository
git clone https://github.com/CLIMAAX/HAZARD.git -
Move into the cloned repository
cd HAZARD -
Create a new environment from the
environment.ymlfileconda env create -f environment.yml -
Activate the environment
conda activate climaax_HAZARD -
Launch the Jupyter interface of your preference with
jupyter labor
jupyter notebook
See our contribute to risk recipes page in the handbook for more information.
Things to consider when setting up a new workflow repository. Delete this section of the README after setting up.
Make sure to replace all occurrences of HAZARD (in the README.md, environment.yml, etc.) with the name of your hazard (e.g. hail) after copying this template.
-
Use the package versions as specified in the
environment.ymlfile provided with the template. We aim to keep a consistent enviroment throughout all CLIMAAX workflow repositories to allow for a seamless assessment of multiple hazards in a single environment. Packages are installed from the conda-forge channel. -
Please remove packages that are not used by your workflows from your new hazard repository's
environment.ymlfile to keep the hazard-specific environment as light as possible, but always keep the ipykernel, jupyterlab-myst, jupyterlab, notebook and pip packages for the convenience of the user. -
We only explicitly specify packages that are directly imported in the workflows and some optional dependencies of these packages. E.g., dask and netcdf4 should be specified whenever xarray is used to load NetCDF files so
xarray.open_mfdatasetworks, even if the dask and netcdf4 packages are not imported directly in any of the workflow notebooks. In contrast, instead of specifying a version for matplotlib-base explicitly, we only specify a version for matplotlib and let conda resolve the dependency. -
To add a package to the environment of an existing workflow repository, pick its version from the general
environment.ymlfile in the template repository. If the package doesn't exist in the general environment yet, find a compatible version and open a pull request or issue in the template repository so it can be added to the general environment. A way to select a compatible version is to first create the workflow or general environment without the new package, then install the package(s) without specifying a version and using the version that is automatically installed (conda will pick a compatible version if possible).
Binder sessions should be launched via the CLIMAAX/binder-env repository, pulling the workflow repository content in with nbgitpuller. Instructions for creating a link to launch binder in this way are provided in the binder-env repository.
