next up previous contents
Next: Processing and Viewing the Up: How to Make a Previous: How to Make a

Running the Model

 

To run the model, go to the workspace directory work. This directory contains copies of scripts used to execute the model, as well run parameter files used as input to the model. These run parameter files include:

driver.in
This ASCII file is created by the shell scripts used to execute the model. As it is copied of the user-controlled parameters given in the run execution script, the user will not have to directly access the file.
qtcm.restart
This binary file is a ``snapshot'' of all prognostic model variables, and is read by QTCM as the initial conditions in a model run if the mrestart execution shell script variable is set to ``1'' (see below).
qtcm.restart.out
This binary file is written by QTCM at the end of a model run, and is a snapshot of all prognostic variables at that time. If renamed to qtcm.restart, this file can be used as the initial conditions of a future model run.
qtcmpar.in
This ASCII file contains the values of various parameters and coefficients used by QTCM, and is a copy of the same file in src. See Section 2.4.1 for more information on this file. See Chapter 4 for a discussion of the physics behind the variables in this file.

The package comes with a number of different C shell scripts that control different ways of model execution. ``Original'' versions of these scripts are found in the directory scripts, while ``working'' copies are located in work. These scripts include:
Firsttime.sh
Makes the ``first-time'' run of QTCM. This creates a qtcm.restart file that can be used to shorten the ``spin-up'' of the model. This script uses monthly climatological SSTs as forcing.
qtcm_realtime.sh
Runs QTCM using SSTs interpolated from observed values. This option is available for dates from the first day of January 1982-last day of December 1994.
qtcm_seasonal.sh
Runs QTCM using monthly climatological SSTs.
test.sh
Executes a brief run of QTCM to test code-machine compatibility.

To run the model, change the user-controlled parameters in one of the above scripts to suit your purposes, then execute the scripts by typing the script name at the command line. After you first port the model over to your computer, you should run test.sh to confirm that the model will compile and run correctly on your machine. Next, run the model a year or so with climatological SST to create a qtcm.restart initial conditions file that will serve to shorten the spin-up time of the model. The Firsttime.sh script is set-up to do this. Finally, conduct an actual model run by executing qtcm_realtime.sh or qtcm_seasonal.sh, as appropriate.

The model execution scripts govern the execution of the model by first defining the major user-controlled parameters under the script comment title ``Generate the user control parameters tex2html_wrap_inline1055 '' These parameters are then input as a FORTRAN namelist so any parameter undefined in the script will take-on the default value given in the subroutine DriveInit in driver.f. Finally, the script compiles and links the version of the code found in sub-directory src using the file ``Makefile'' in src (see Section 2.4.3 for more information about the makefiles included with this QTCM package), moves the resulting executable from src to work, and executes the program in work. As it runs, the program writes out diagnostic messages (such as the number of simulation days completed) to the screen and to a file in directory work called log.

Below is an explanation of the user-controlled variables in the execution scripts:

bnddir
Path and name of the directory containing the boundary condition datasets. See Section 2.4.1 for details.
SSTdir
Path and name of the directory containing the SST datasets. See Section 2.4.1 for details.
outdir
Path and name of the directory that the output data will be written to. See Section 2.4.2 for details.
landon
Land-interactive indicator: landon=1 (the default) means land is interactive. Other values of landon mean the land is treated like ocean with a fake SST provided from the SST files. Since an interactive land has more freedom, it's more prone to be unstable in the spin-up process, and it has spin-up time longer than the atmosphere by several months. Our recommendation is to run the model with land ``off'' for the first time (Firsttime.sh is set with such a setting).
SSTmode
Model running mode: Affects how SST is fetched and how solartop evolves. Variable is an alphanumeric string. There are three mode options:
year0,month0,day0
Starting date for the model (note year0 includes the millenium and century). For perpetual and seasonal cases, year0 can be any value between 1001 and 9998. However, note that year0 should be chosen such that during the entire length of the model run, the model year never exceeds 9998. Type INTEGER.
lastday
Model runs from day 1 to lastday. Type INTEGER.
interval
Ocean-atmosphere coupling interval [days]. Must be greater than or equal to 1. Type INTEGER.
ntout
Mean output every ntout days. See section 2.4.2 for more details. Minimum value is 1. Type INTEGER.
ntouti
Instantaneous output every ntouti days. See Section 2.4.2 for more details. Minimum value is 1. Type INTEGER.
mrestart
Flag controlling whether to use qtcm.restart. If mrestart=1 (the default), model uses file qtcm.restart as initial condition (it is recommended to always use this option, except for the first time when you need to generate your own qtcm.restart file, together with the land off). Otherwise, the model will start from an initially unbalanced state; the spin-up time for the atmosphere is several days, and several months for land. Type INTEGER.
dt
Time step for the atmosphere [sec]. Type REAL tex2html_wrap_inline1061 8.
visk
Kinematic viscosity for diffusion [ tex2html_wrap_inline1063 ]. May change with resolution and other factors. Type REAL tex2html_wrap_inline1061 8.
mt0
Dimensionless multiplier to set barotropic mode time step. The time step [sec] for the barotropic mode equals tex2html_wrap_inline1069 . Default value is 5. Type INTEGER.

Below is a sample of the user-controlled parameters section from a test.sh script:

 &driverdata
 title='QTCM seasonal test run'      !title
 bnddir='$QTCMROOT/bnddata'          !bnd. data other than SST
 SSTdir='$QTCMROOT/bnddata/SST_Reynolds'    !where SST files are
 outdir='$QTCMROOT/proc'      !where output go
 landon=0                     !=0: land is like ocean with faked SST
 SSTmode='seasonal'           !decides what kind of SST is used
 year0 = 1001                 !starting year; must be between 1001 and 9998
 month0 = 1                   !starting month; 1 to 12
 day0 = 1                     !1 t0 30; each month has fixed length of 30 days
 lastday = 60                 !model runs from day 1 to lastday (1yr=360day)
 interval = 1                 !ocean-atmo. coupling interval; integer days
 ntout=30                     !mean output every ntout days
 ntouti=30                    !instantaneous output every ntouti days
 mrestart=0                   !=1: restart using qtcm.restart
 dt=1200.                     !atmospheric model time step, real seconds
 &end

This sample defines a run using monthly climatological SST as forcing, beginning on January 1, and ending 60 days later at the end of February (ostensibly February ``30''). Land acts like an ocean with interpolated SST, the atmosphere-ocean coupling interval is one day, each atmospheric time step is 20 minutes, no ``spin-up'' file is used for initial conditions, and both mean and instantaneous output is written every 30 days (i.e. one month).


next up previous contents
Next: Processing and Viewing the Up: How to Make a Previous: How to Make a

Johnny Wei-Bing Lin
Mon Jun 30 12:27:46 PDT 1997