Installation

RCAT requires Python>=3.10. The major dependencies are dask, xarray and ESMPy (through the regridding tool xESMF), and the best way to install them is using Conda or Mamba. If you don’t have any of the latter installed follow the installation information below. Otherwise you can jump directly to RCAT environment .

Conda

Conda can be installed either using Miniconda or Miniforge. Miniforge is a set of installers for Conda and Mamba that use the conda-forge channel as the default and only source of package. Here is information on installing Miniconda.

Add conda-forge channel

  • create $HOME/.condarc file

channels:
    - conda-forge
    - defaults

Update conda

$ conda update -n base conda

Mamba

Mamba is a fast and lightweight alternative to Conda, and the good thing is that if you know how to use Conda then you also know how to use Mamba. Mamba is installed using Miniforge.

RCAT environment

When having installed Conda (or Mamba), the next step is to create and install the RCAT environment. We recommend to create a new, clean Conda environment.

Create environment from YAML file The quickest way is to create and install the environment is to use the environment.yml file

$ conda env create --file environment.yml
$ conda activate rcatenv

Install dependencies separately An alternative is to install RCAT and the dependencies separately:

$ conda create -n rcatenv
$ conda activate rcatenv
$ conda install xarray, esmpy, "xesmf>=0.8", dask, dask-jobqueue, matplotlib, cartopy, netcdf4, h5netcdf

Note the quotes around xesmf>=0.8. These are required when installing package versions using >= or <= expressions. RCAT package can then be installed from PyPI using pip:

$ conda install pip
$ pip install rcatool

Note on netCDF4 and h5netcdf

Xarray uses netCDF4 as the default backend (depending on available dependencies) to read netcdf files. However, issues have occurred recently when opening multiple files in parallel (with dask.delayed) with netCDF4>=1.6.1, see e.g. this github issue. The suggested alternative here is to use the h5netcdf instead, which does not depend on the netCDF-C library, but it may have some impact on the performance.