Port Validation for CAM

Introduction

Below we outline an inexpensive procedure based on a perturbation growth test that can establish port validity with reasonable confidence. While it is highly likely that a successful perturbation growth test indicates a valid port, the ultimate assurance that ported code is running correctly comes from running a full climate simulation and comparing it to a control simulation produced by the trusted model. For that purpose we provide the climatology files from CAM control runs, and diagnostic tools to use for comparing your model run with the CAM controls.

Although the results of the perturbation growth test do not provide definitive port validity, we find the test to be extremely useful because it fails reliably, indicating that there is a problem with the port that needs to be fixed before incurring the expense of a full climate simulation.

Perturbation simulation controls

Each model configuration listed below is linked to a tar file that contains:

CAM-5.0, Finite-Volume dycore, 1.9x2.5-L26, IBM.    [details]

Example: Validate port of CAM-5.0 to a Linux cluster

The example below assumes that the validation will be done for the Finite-Volume dycore at 1.9x2.5-L26 resolution, and that the control simulation from the NCAR run has been downloaded.

  1. Configure CAM - To build CAM for perturbation growth testing the configure command must be invoked with the -pergro option. The default dycore/resolution is Finite-Volume, 1.9x2.5, but it can be explicitly set for clarity. The parameter supplied for the ocn is to ensure the model runs in "aqua-planet" mode. Also, suppose the Linux cluster being evaluated has the Lahey Fortran compiler installed. Since PGI compilers are the default assumed in the CAM Makefile the compiler must also be explicitly declared (-fc lf95). And finally, the default parallelization on Linux platforms is none (i.e., serial). We wish to use MPI and this must also be explicitly specified with the number of mpi tasks being used, in this example we used 8 (-ntasks 8).
    % configure -dyn fv -hgrid 1.9x2.5 -fc lf95 -ntasks 8 -phys cam4 -ocn aquaplanet -pergro
    

    NOTE: This configure command assumes that the netCDF and MPI include/library directories are specified in your environment. If not then add the appropriate locations to the configure command-line, or set the locations using the environment variables.

  2. Run CAM - The namelist for a two day run with no perturbation applied to the initial temperature field is set up as follows:
    % build-namelist -s -case cam5.0_port -runtype startup \
     -namelist "&camexp stop_option='ndays', stop_n=2 nhtfrq=1 ndens=1 \
       mfilt=97 hfilename_spec='h%t.nc' empty_htapes=.true. \
       fincl1='T:I','PS:I' /"
    

    This specifies a two-day initial run with real*8 precision output of just the T and PS fields at every timestep. Additional variables set for convenience specify writing history output every timestep, writing all timesteps to one output file, use 64-bit NetCDF format for output, and renaming the history file to 'h0.nc'. Note that output of the PS field is required for computing the difference statistic which is a mass weighted RMS value.

  3. Compute RMS temperature differences - The temperature difference of interest is between the run just completed (in file h0.nc), and the downloaded control run (in file f1.9ph_ibm_5.0.nc). Using the perl script cprncdf this difference will be calculated for each timesample in the file with the command:
    % cprncdf f1.9ph_ibm_5.0.nc h0.nc > RMST_f1.9_cmp_ibm_5.0
    

    Note that when cprncdf is invoked this way it will run cprnc on the history files before striping out the RMS T values. So the cprnc utility must already be built and in your path. cprnc comes with the CAM distribution (in the models/atm/cam/tools/cprnc directory).

  4. Plot RMS temperature differences - Finally we need to plot the difference growth curve produced in the previous step (in file RMST_f1.9_cmp_ibm_5.0) against the perturbation growth curve for the control run (downloaded with the control history file, in file RMST_f1.9ph_ibm_aqpgro_5.0). This can be done with the perl script cprncplt via the following command:
    % cprncplt -b -t -pltitle "cam5.0, FV-1.9x2.5, port validation" \
      -l "perturbation: cam5.0(ibm)","difference: cam5.0(ibm) - cam5.0(pc/lf95)" \
      RMST_f1.9ph_ibm_aqpgro_5.0 RMST_f1.9_cmp_ibm_5.0
    

    The script cprncplt assumes that the yorick utility is installed and in your path. The arguments tell the script to run in batch mode (-b), plot time in days rather than timestep number (-t, this option assumes there is two days worth of data in the file), add a title (-pltitle "string"), and add line legends (-l "line1","line2"). In batch mode the plot output is written to the postscript file pertGrowth.ps. Here is the plot from a linux cluster at NCAR:

    At this point in the validation process these curves are sufficiently alike to warrent moving to the next step which is doing a full climate simulation to compare with the controls.