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.
Each model configuration listed below is linked to a tar file that contains:
cprncdf) containing the RMS differences between a perturbation run and the control run.
CAM-4.0, Finite-Volume dycore, 1.9x2.5-L26,
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.
-pergrooption. The default dycore/resolution is Finite-Volume, 1.9x2.5, but it can be explicitly set for clarity. 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 (
% configure -dyn fv -hgrid 1.9x2.5 -fc lf95 -ntasks 8 -pergro
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
% build-namelist -s -case cam4.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' aqua_planet=.true. /"
This specifies a two-day initial run, in "aqua-planet" mode, 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.
h0.nc), and the downloaded control run (in file
f1.9ph_ibm.nc). Using the perl script
cprncdfthis difference will be calculated for each timesample in the file with the command:
% cprncdf f1.9ph_ibm.nc h0.nc > RMST_f1.9_cmp_ibm
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
cprnc comes with the CAM
distribution (in the
RMST_f1.9_cmp_ibm) against the perturbation growth curve for the control run (downloaded with the control history file, in file
RMST_f1.9ph_ibm_aqpgro). This can be done with the perl script
cprncpltvia the following command:
% cprncplt -b -t -pltitle "cam4.0, FV-1.9x2.5, port validation" \ -l "perturbation: cam4.0(ibm)","difference: cam4.0(ibm) - cam4.0(pc/lf95)" \ RMST_f1.9ph_ibm_aqpgro RMST_f1.9_cmp_ibm
cprncplt assumes that the
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
-t, this option assumes there is two days worth of
data in the file), add a title (
"string"), and add line legends (
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.