Skip to content

cheyenne and DAV quick start guide

Alice Bertini edited this page Jan 10, 2019 · 6 revisions

Cheyenne and DAV Quick-Start Guide

NCAR Cheyenne/DAV users may follow these steps to get started in using the CESM python based post processing tools:

  1. Set up your shell environment with variable POSTPROCESS_PATH to point to the pre-installed virtualenv and an alias to activate the virtualenv on cheyenne before running create_postprocess. This step only needs to be done once.

For tcsh users, in your .tcshrc add the following lines:

### CESM Postprocessing 
setenv POSTPROCESS_PATH /glade/p/cesm/postprocessing
alias cesm_pp_activate 'source $POSTPROCESS_PATH/cesm-env2/bin/activate.csh'

For bash or ksh users, in your .profile add the following lines:

### CESM Postprocessing 
export POSTPROCESS_PATH=/glade/p/cesm/postprocessing
alias cesm_pp_activate='. $POSTPROCESS_PATH/cesm-env2/bin/activate'
  1. Activate the CESM_postprocessing virtualenv. Note: when the virtualenv is activated, your command line prompt will be prefixed by [(NPL) ].
cesm_pp_activate
  1. Run create_postprocess from anywhere to add the postprocess directory and files in an existing CESM caseroot or create a stand-alone post-processing caseroot. Note - when specifying a postprocessing caseroot you need to specify a fully qualified path to the postprocessing caseroot. This path becomes the value of the PP_CASE_PATH XML variable.
create_postprocess --help
  1. As of CESM_postprocessing v1.0.0, batch submission scripts to the NCAR DAV cluster are available by specifying the --add-dav command-line argument to create_postprocess with a fully qualified path to the DAV CESM postprocessing virtualenv.
create_postprocess --caseroot [fully-qualified-path-to-caseroot] --add-dav /glade/p/cesm/postprocessing_dav
  1. Deactivate virtualenv. This is optional. There should be no harm in leaving the virtualenv activated.
deactivate
  1. cd to your post processing caseroot and modify the *.xml files to reflect your post processing configuration. Use the pp_config tool in your caseroot to query and change the XML settings to ensure the validity of any XML changes.
pp_config --help
  1. Alternatively, if you edit an *.xml file directly, then you can validate it against an XML schema using the following command:
xmllint --schema env_file.xsd env_[filename].xml
  1. Submit the scripts to the batch system
qsub ./[script_name]   (run on cheyenne)
sbatch ./[script_name]_dav (submit from cheyenne login to run on DAV cluster)

Where script name is either timeseries, atm_averages, atm_diagnostics, ice_averages, ice_diagnostics, lnd_averages, lnd_regrid, lnd_diagnostics, ocn_averages, ocn_diagnostics, ilamb_initialize, iomb_initialize, ilamb_diagnostics, iomb_diagnostics, iconform or xconform.

You can submit multiple scripts concurrently but there are some dependencies that you need to be mindful of. For instance, the lnd_regrid script depends on the successful completion of the lnd_averages script. All the diagnostics scripts, except ilamb_diagnostics and iomb_diagnostics, depend on successful completion of the averages scripts. If you run the timeseries script first and want to use those files as inputs to the averages scripts, then the timeseries script needs to complete successfully.

  1. Check for successful completion of submission scripts by looking at the batch script output files in PP_CASE_PATH and then checking each of the log files in the PP_CASE_PATH/logs directory.

  2. Set up your ssh keys to a remote server that has access to a web storage data partition (note: NCAR users you can not post directly to a web server like cesmweb.cgd.ucar.edu but you can post to burnt.cgd.ucar.edu) so you can copy the plots and html files to a remote server without being prompted for a login/password. CGD provides a helper script to setup the ssh keys for you called mk_user_ssh_keys.sh. This script is not included with the post processing distribution so you will need to download it from the link below, copy it directly to your login account on yellowstone or cheyenne, and run it manually.

mk_user_ssh_keys.sh

  1. Edit the env_postprocess.xml file and set the XML variables GLOBAL_WEBHOST, GLOBAL_WEBLOGIN, and GLOBAL_REMOTE_WEBDIR. For CGD web hosts, please follow the conventions for GLOBAL_REMOTE_WEBDIR settings at:

CGD Project Directory Structure

  1. Run the copy_html utility from your PP_CASE_PATH:
./copy_html --help