and open the example notebook: CMIP6_global_projections.ipynb
This repository is an experimental showcase for getting CMIP6 climate data with Intake-esm. The following packages are used:
- Intake-esm: an intake plugin for parsing an Earth System Model (ESM) catalog and loading assets into xarray datasets.
- xarray is an open source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun! (Xarray Tutorial / Xarray | SciPy 2020)
- ProPlot: a lightweight matplotlib wrapper for making beautiful, publication-quality graphics. (still in development)
- xESMF: Universal Regridder for Geospatial Data (only for Linux and Mac, an alternative is the interp function from xarray)
- Dask provides advanced parallelism for analytics (jacobtomlinson/dask-video-tutorial-2020 / Dask | SciPy 2020)
The purpose of this analysis will be to make a figure of the time series over the historical period, as well as projections for future scenarios.
This session is running on binder.pangeo.io, a service designed and maintained by the Pangeo community for scalable earth science. It is running on Google Cloud Platform using credits generously donated by Google to that Community.
- See this great presentation: Tech Talk: Intake from Aaron Spring
- New climate simulation data models now available in Google Cloud
If you want to run this code on your own computer, follow the next steps:
- Install Miniconda (for Linux):
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
You should have a (base)
in front of your line in your terminal, that correspond to the root environment.
- Add conda-forge and update your installation:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda update -n base -c defaults conda
- Create an environment (it is recommended not to use the root environment so that you keep a clean installation: https://conda-forge.org/docs/user/introduction.html):
conda create -n intake_CMIP6_v0
conda activate intake_CMIP6_v0
conda install xarray netcdf4 nc-time-axis xesmf esmpy \
dask python-graphviz dask-labextension "nodejs>=10.0" nbresuse \
intake-esm gcsfs zarr "proplot=0.6.4" "matplotlib=3.2.0" cartopy \
jupyter jupyterlab nb_conda_kernels
# For testing xESMF (for regrid)
pip install pytest
pytest -v --pyargs xesmf #all need to pass
# Install dask-labextension
jupyter labextension install dask-labextension
jupyter serverextension enable dask_labextension
jupyter lab
Alternatively you can install directly from the environment file instead of step 3:
conda env create -f envs/intake_CMIP6_v0.yml
More information about environments: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html