Python Package Installation#

Once Miniconda is installed, use it to create a dedicated environment for PyClm101.

πŸ› οΈ Create and Configure the Environment#

conda update conda
conda create -n geocat -c conda-forge geocat-comp geocat-viz
conda install -n geocat -c conda-forge jupyter jupyterlab ncview cmap ipynbname

🐍 Activate the Environment#

conda activate geocat

πŸ”§ Set Up Jupyter Kernel for This Environment#

After activating the environment, register it as a kernel for Jupyter:

python -m ipykernel install --user --name geocat --display-name "Python (geocat)"

This will allow you to select β€œPython (geocat)” from both Jupyter Notebook and JupyterLab interfaces.

Additional Packages#

Several optional packages are useful for common climate data workflows. These include ffmpeg for creating animations, xesmf for horizontal regridding, and geopandas for geospatial vector data analysis.

These packages can be installed from conda-forge, which is recommended for improved dependency compatibility on macOS and university-managed systems:

conda install -c conda-forge ffmpeg
conda install -c conda-forge xesmf
conda install -c conda-forge geopandas

Note: Using the conda-forge channel helps avoid common build and compatibility issues, particularly for packages that depend on compiled libraries (e.g., ffmpeg and xesmf).

πŸ“¦ Optional: GRIB Support#

If you’ll be working with GRIB data (common in ECMWF datasets):

conda install -c conda-forge cfgrib eccodes

Note: These may take longer to install due to their dependencies.