1. Installation

1.1. Installation guide for METplotpy

METplotpy is written entirely in Python and uses YAML configuration files and relies on the METcalcpy package. The version numbers (when provided) indicate the minimum version number for that package.

1.1.1. Python Requirements

  • Python 3.6.3

  • cartopy 0.18.0

  • cmocean

  • eofs

  • imutils 0.5.3

  • imageio

  • lxml

  • matplotlib 3.3.0

  • metcalcpy (same version as this version of METplotpy)

  • netcdf4 1.5.1.2

  • numpy 1.17.0

  • pandas 1.0.1

  • plotly 4.9.0

  • python-kaleido 0.2.1

  • psutil 5.7.2

  • pymysql

  • pytest 5.2.1

  • pyyaml 5.3.1

  • scikit-image 0.16.2

  • scikit-learn 0.23.2

  • scipy 1.5.1

  • statsmodels 0.11.1

  • xarray 0.16.2

  • yaml

1.1.2. Install METcalcpy in the conda environment

This is the recommended method for installation.

Clone the METcalcpy repository from GitHub.

From within the active conda environment, change directories to the METcalcpy directory. This is the directory where the METcalcpy repository was cloned. In this directory, find the setup.py script.

From the command line run:

pip install -e .

Do NOT forget the ending period ‘.’ This indicates the setup.py is being used in the current working directory.

The -e option allows this installation to be editable, which is useful if the METcalcpy/metcalcpy source code needs updating. Using the -e option will avoid the need to reinstall if any changes are made to the METcalcpy code.

1.1.3. Setting up the PYTHONPATH

This is a workaround for users who can not or do not have permission to create conda environments.

$METCALCPY_SOURCE is the path downloaded/cloned METcalcpy code.

Command for csh:

setenv PYTHONPATH $METCALCPY_SOURCE/METcalcpy:$METCALCPY_SOURCE/METcalcpy/util:${PYTHONPATH}

Command for bash:

export PYTHONPATH=\
$METCALCPY_SOURCE/METcalcpy:$METCALCPY_SOURCE/METcalcpy/util:${PYTHONPATH}

1.1.4. Overview of Plots

The plots in the METplotpy repository reside under one of two directories: METplotpy/metplotpy/contributed or METplotpy/metplotpy/plots.

The plots under the METplotpy/metplotpy/contributed directory correspond to plots that were either created prior to the creation of the METplotpy repository, and/or developed outside of the DTC.

The plots that reside in the METplotpy/metplotpy/plots directory were developed by the DTC and were primarily created to replace the R script implementation of plotting done in METviewer. These plots were written using Python plotly, with the exception of the performance diagram, which was written using Matplotlib. The plots in the contributed directory may have different Python and third party Python package requirements that differ from the packages and versions specified in the Section 1.1.1 section.