Skip to content

PPUG_create_python_env

Alice Bertini edited this page Aug 23, 2016 · 14 revisions

Setting up the Python virtualenv using create_python_env

The first step in running the CESM post processing code is to setup the virtual environment. This is a one-time setup step required with each download of the CESM post processing code.

In the [POSTPROCESS_PATH] directory, run the following command:

./create_python_env -help

This returns:

SYNOPSIS

   create_python_env [options]

   This script sets up the python virtual environment (env) for a given supported machine.
   This script executes the following steps:
   - loads the python modules for this machine necessary to boot-strap the env
   - make env
   - activate env
   - install post-processing tools into the env
   - compile/install additional tools (e.g. zonal_average tool for ocn diag)
   - run unittests
   - deactivate env

OPTIONS

   -machine        specify a CESM supported machine name.
   -help           Print this help message and exit

The mandatory option -machine is the name of a supported machine.

Running the create_python_env command creates the cesm-env2 Python virtualenv directory. The post processing scripts that are created by the create_postprocess command activate and deactivate the virtualenv as needed. The user is not required to modify their environment in order to run any of the post processing scripts.

As an alternative to setting up your own virtual environment, yellowstone users may choose to use the latest installation of the tagged trunk code by referring to the Yellowstone Quick Start Guide.