History and Setup for Diagnostics
OverviewTeaching: 0 min
Exercises: 0 minQuestions
What is in our history files?
How do I setup to run the postprocessing and diagnostics packagesObjectives
We will now return to the output from our 4-year case. Let’s go to the atmospheric history directory for our case. If your 4-year case did not run to completion, you are welcome to look at mine.
History vs. Timeseries Files
- History files
- contain all of the variables for a componenet for a particular frequency and are output directly by the model.
- Timeseries files
- usually span a number of timesteps and contain only one major variable. They are created offline.
When NCAR provides output from their model simulations publicly, they typically provide timeseries files for a select set of variables.
A history file:
- 1 monthly timestep (Nov 1993)
- 200+ CAM varaibles
A timeseries file:
- 120 monthly timesteps (Jan 1990-Dec1999)
- 1 CAM variable (PSL), along with coordinate variables like
CESM Time Variable
The time coordinate variable in CESM history and timeseries files represents the end of the averaging period for variables that are averages. The time that gets resolved when the data are read in does not match the date in the filename. For monthly averaged data, the filename is correct. This can be a source of much confusion.
- This is a history file for may of year one of our run.
- When you read in this file, the first time is resolved as:
0001-06-01. This means that Jun 1 of year 0001 is the end of the averaging period and the data contains the average for May of year 1.
- To verify the averaging period in the files, consult the
time_boundsvariable. Always check!!!!
- This is a convention used by CESM to allow averaged and instantaneous variables to be stored in the same file.
The process of going from
history files to
timeseries files and to convert 3D atmospheric data from the model coordinate system to selected pressure levels. We will learn how to use the CESM Postprocessing Tools which are primarily written in NCAR Command Language (NCL). NCL is in the process of being converted to Python, but for now, we can use the preprepared NCL scripts without having to know too much NCL.
There is a large suite of postprocessing and diagnostic packages developed by NCAR using a combination of NCL and Python scripts that automatically generate a variety of different kinds of plots from model output files and used to evaluate a simulation. They all compute a series of pre-defined metrics and display the plots via a website.
There are five main diagnostics packages:
- Climate Variability and Diagnostics Package (CVDP)
Postprocessing and Diagnostics Packages Setup
We will setup everything necessary for you to be able to run the postprocessing and diagnostics packages on the NCAR computers.
If you have never setup a
.tcshrc on cheyenne:
cp /glade/u/home/kpegion/clim670/profile.sample ~/.profile
If you already have a
.profile (bash users) or a
.tcshrc (tcsh users), look at the corresponding file and add the necessary items from the sample file to your file. The sample files are located in:
Copy the post-processing scripts to the correct location:
Go to your home directory:
Create a scripts directory and go to it:
mkdir scripts cd scripts
Copy all files needed:
cp -R /glade/u/home/asphilli/CESM_tutorial/* .
You may get an error about being able to copy a particular file. You can ignore the error.
Put the configuration file into the correct location:
mv hluresfile ../.hluresfile
Setup the python environment for the CESM diagnostics and post-processing scripts
Create a directory for the CESM postprocessing code:
Run the postprocessing using
create_postprocess and tell it the name of your 4-year case
create_postprocess --caseroot /glade/scratch/kpegion/cesm-postprocess/test1
Go to the postprocessing directory:
Set the location of the model data:
./pp_config --set DOUT_S_ROOT=/glade/scratch/kpegion/archive/test1
Tell the diagnostics what kinds of grids to expect, our version uses:
./pp_config --set ATM_GRID=1.9x2.5 ./pp_config --set LND_GRID=1.9x2.5 ./pp_config --set ICE_GRID=gx1v7 ./pp_config --set OCN_GRID=gx1v7 ./pp_config --set ICE_NX=320 ./pp_config --set ICE_NY=384