scam2web main
scam2web.csh
This script controls the overall running of the model compile, build, namelist options, diagnostic output and web-page creation. The key variables that are required to be set are described below.
Environment variables
- SCAM_TEST - The case name of the 'test' experiment to be run and/or diagnosed.
- SCAM_CTRL - The case name of the 'control' experiment to be run and/or diagnosed.
- IOP_NAME - The name of the IOP case to be run (e.g., 'arm95').
- SCAM_IOP - Description metadata for the IOP case (e.g., 'ARM 1995 (18 Jul 1995 - 4 Aug 1995)').
- SCAM_LEVS - Number of model levels in the vertical.
- TEST_NLIST - Namelist options for the 'test' case that are not part of the default options in a 'vanilla' simulation ( e.g. shallow_scheme = 'UW', eddy_scheme = 'diag TKE').
- CTRL_NLIST - Namelist options for the 'control' case that are not part of the default options in a 'vanilla' simulation.
- SCAM_DIAGS - Additional diagnostic output added to the namelist required for the runs that are not included in scam_namelist.csh (see below).
- CAM_TAG - Cam code tag to be used for the model runs (e.g., cam3_5_03)
Options (0=yes; 1=no)
- RUN_TEST - Run SCAM for the 'test' case?
- RUN_CTRL - Run SCAM for the 'control' case?
- NCL_PLOT - Run ncl routines to produce diagnostics plots?
- CONV_PLOT - Convert plots to png ready for web page creation?
- KEEP_BEG - Keep existing plot and web files from previous run?
- KEEP_END - Keep final plot and web files?
- WEB_TAR - Create and tar-up web directory and delete directories? (will only untar to a specific location if $WEB_DIR is set).
- SCAM_DEF_DIAGS - Select a default group of SCAM output diagnsotics listed in scam_namelist.csh?
Directories
- SCAM_SCR - Location of the 'bld' directory for the cam_tag $CAM_TAG.
- WEB_DIR - Location of directory for untarring of web-page tar file $web/runs/scam.
- SCAM_ROOT - Root directory for building and running SCAM, producing output and creating the web-page tar file.
- IOP_ROOT - Location of the IOP forcing dataset file.
- TEST_CODE - Location of code modifications for the 'test' case SCAM run.
- CTRL_CODE - Location of code modifications for the 'control' case SCAM run.
- NCL_ROOT - Location of all the scam2web scripts and NCL code.
A note on directory structures below $SCAM_ROOT.
To facilitate a number of experiments with different IOP datasets at the running and diagnosing stages the directory structures
are the following:
| | | run_ctrl1 | toga | bld |
|
| | runs--> | run_test1--> | arm95--> | mods |
|
| | | ... | ... | run |
|
| $SCAM_ROOT--> | | | | |
|
| | | run_test1-run_ctrl1 | toga | html |
|
| | plots--> | run_test2-run_ctrl2--> | arm95--> | |
|
| | | ... | ... | plots |
|
So that SCAM run builds in 'bld' with the mods copied to 'mods' and it runs in 'run. Diagnostics for
the comparison of two runs are put in 'plots' and the web-pages created in 'html'.
scam_namelist.csh
The ultimate intention is that nothing will need to be changed in this file.
However, it contains some default diagnostic output options as well as land initial condition
options. The 'finidat' option contains the location of the land intiial conditions and there
is an option for the first of every month in a particular year of a T42 global run with the
'vanilla' climate from a cam3_5_03 tag run. If finidat is not specified then SCAM will start
with arbitrary initial conditions for the land.
The following land initial condition files are available from
/project/cms/rneale/cam/cam_mydata/inic/lnd
cam3_5_eul_ic4scam.clm2.r.0010-01-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-02-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-03-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-04-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-05-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-06-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-07-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-08-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-09-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-10-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-11-01-00000.nc
cam3_5_eul_ic4scam.clm2.r.0010-12-01-00000.nc
*** 17JUL07 *** As of cam3_5_03 SCAM is not able to read in a CAM land initial conditions ****
scam_plots.ncl
This ncl script lists the fields to be plotted, currently for 4 categories:
- Single-level timeseries
- Multi-level timeserieslibfj9i6.so.1
- Single-level mean diurnal cycle
- Multi-level mean diurnal cycle
To include a timseries plot of the 1-D variable 'PRECT' the user would add the following line.
single_plot_ts (rnames,"PRECT", "mm/day", 86400*1000., 0, 80, 1,plot_name,ptrt,ptrc,"Prec", 86400*1000.,ptri)
User defined fields (in bold):
- PRECT - 1-D variable name on the SCAM history tape.
- mm/day - Units of variable name (Leave blank to use units on the SCAM history tape).
- 86400*1000. - Scale factor for variable (Set=1. to use existing scaling).
- 0,80 - Minimum,maximum range on y-axis.
- 1 - Smooth timestep data? (currently inactive option)
- Prec - Name of variable on IOP dataset for comparison (leave blank if no observations exist)
- 86400*1000. - Scale factor for observed variable (Set=1. to use existing scaling).
To include a timseries plot of the 2-D variable 'Q' the user would add the following line.
multi_plot_ts (rnames,"Q", "g/kg", 1000., 0,20,1, -5,5,1, 1,plot_name,ptrt,ptrc,"q", 1000., ptri)
User defined fields (in bold):
- Q - 2-D variable name on the SCAM history tape.
- g/kg - Units of variable name (Leave blank to use units on the SCAM history tape).
- 1000. - Scale factor for variable (Set=1. to use existing scaling).
- 0,20,1 - Minimum,maximum,contour interval for the contour plot of the full fields.
- -5,5,1 - Minimum,maximum,contour interval for the contour plot of the difference fields.
- 1 - Smooth timestep data? (currently inactive option)
- q - Name of variable on IOP dataset for comparison (leave blank if no observations exist)
- 1000. - Scale factor for observed variable (Set=1. to use existing scaling).
The equivalent routine calls for the mean diurnal cycle are available:
single_plot_dc (rnames,"PRECT", "mm/day", 86400*1000., 0, 20, 1,plot_name,ptrt,ptrc,"Prec", 86400*1000.,ptri)
multi_plot_dc (rnames,"Q", "g/kg", 1000., 0,20,1, -2,2,0.2, 1,plot_name,ptrt,ptrc,"q", 1000., ptri)
Only variables listed in the routine scam_plots.ncl will be produced and added to the webpage.
plot2web.csh
This script uses c-script logic to create a webpage set based on the postscript files
present from the ncl output. The web page looks like the screen-shot below:
- The web-page location will be ($WEB_DIR/$SCAM_TEST-$SCAM_CTRL-$IOP_NAME).
- All the available plots are listed on the right hand side. Click to view.
- Rollover mouse to see the variable's long name.
- Click 'root page' to go to $WEB_DIR (index.html).
Currently tested machines
bangkok
setenv NCHOME /usr/local/netcdf-gcc-lf95
setenv INC_NETCDF ${NCHOME}/include
setenv LIB_NETCDF ${NCHOME}/lib
setenv PATH /usr/local/lf9562/bin:$PATH
setenv LD_LIBRARY_PATH /usr/local/lf9562/lib