METplus Practical Session Guide (Feb 2019) | METplus Setup > METplus: Initial setup

Prequisites: Software

The following is a full list of software that is required to utilize all the functionality in METplus.
NOTE: We will not by running the cyclone plotter or grid plotting scripts in this tutorial. So the additional libraries mentioned below are not installed.

  • Python 2.7.x
  • Additional Python libraries: - required by the cyclone plotter and grid plotting scripts.
    • numpy
    • matplotlib - not installed, Is is not required for this tutorial.
    • cartopy - not installed, It is not required for this tutorial.
  • MET 8.1
  • R - used by tcmpr_plotter_wrapper, Wraps the MET plot_tcmpr.R script
  • ncap2 - NCO netCDF Operators
  • wgrib2
  • ncdump - NetCDF binaries
  • convert - Utilitity from ImageMagick software suite

Getting The Software

For this tutorial we'll use the METplus v2.2 release. We will configure METplus to run the met-8.1 software, which has already been installed in a common location and is available through a module file.

Please use the following instructions to setup METplus on your tutorial machine:

  • Unpack the release tarball and create a METplus symbolic link (copy and paste the following commands):
cd ${HOME}
mkdir -p metplus_tutorial/output
tar -xvzf /classroom/wrfhelp/METplus/tar_files/METplus_v2.2.tar.gz -C metplus_tutorial/
ln -s metplus_tutorial/METplus-2.2 METplus

Sample Data Input and Location of Output

The Sample Input Data for running this METplus tutorial is provided in a shared location on-disk and does not require copying to your home directory. How to set the path to the sample input data and location of the output when running METplus will be explained later in the tutorial, utilizing METplus configuration files.

Just note that:
When running METplus use cases, all output is placed in your ${HOME}/metplus_tutorial/output directory.
When running MET on the command line, all output will be written to ${HOME}/metplus_tutorial/output/met_output

Your Runtime Environment

For this tutorial, the MET software has been setup as a loadable module file. We need to add the following command to your environment so the MET software is available when you login.

Edit the .usermodlogin file to configure your runtime environment to load the MET software:

Open the following file with the editor of your choice:

${HOME}/.usermodlogin

Add the following to the LAST LINE of the file:

module load met

Save and close that file, and then source it to apply the settings to the current shell. The next time you login, you do not have to source this file again.:

source ${HOME}/.usermodlogin

The system PATH environment variable is set to allow the METplus application to be run from any directory.
As a note, there is also an optional JLOGFILE environment variable (Job Log), which indicates where JLOGS will be saved. JLOGS provide an overview of the METplus python modules being run and is intended to be used when running METplus within a workflow management systems on an HPC cluster. If this environment variable is unset, then output will be directed to stdout (your display). JLOGFILE will not be defined during the tutorial, If interested, more information regarding the JLOGFILE can be found in the METplus Users Guide. You will now edit the system PATH.

Edit the .usermodrc file to configure your runtime environment for use with METplus:

open the following file with the editor of your choice:

${HOME}/.usermodrc

Add the following to update your system PATH setting:
NOTE: If the PATH variable already exists in your .usermodrc file,
than make certain to ADD the line below after the existing setting.

csh:

setenv PATH ${HOME}/METplus/ush:${PATH}

bash:

export PATH=${HOME}/METplus/ush:${PATH}

Save and close that file, and then source it to apply the settings to the current shell. The next time you login, you do not have to source this file again.:

source ${HOME}/.usermodrc