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 a copy of the user-controlled parameters given in the execution script, the user will not have to directly access the file.
qtcm.restart
This binary file is more or less a ``snapshot'' of all prognostic model variables, and is read by QTCM1 as the initial conditions in a model run if the mrestart execution shell script variable is set to ``1''. See the discussion of variable mrestart on page gif for information on an important caveat to this file.
qtcm.restart.out
This binary file is written by QTCM1 at the end of a model run, and is more or less 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. See the discussion of variable mrestart on page gif for information on an important caveat to this file.
qtcmpar.in
This ASCII file contains the values of various parameters and coefficients used by QTCM1, and is a copy of the same file in src. See Section gif for more information on this file. See Chapter gif 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:
spinup.sh
Makes the ``spin-up'' run of QTCM1. 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 QTCM1 using SSTs interpolated from observed values. The default SST dataset is from November 1981 to December 1998. This can be reset for any period if SST data is supplied.
qtcm_seasonal.sh
Runs QTCM1 using monthly climatological SSTs.
qtcm_perpetual.sh
Runs QTCM1 using perpetual SSTs.
qtcm_mxlayer.sh
Runs QTCM1 coupled with the mixed-layer ocean. It typically includes three steps. First, QTCM1 is run with observed SSTs. Second, annually or monthly- averaged Q-flux is computed using aveflux.f. Lastly, QTCM1 is run with the mixed-layer ocean.

test.sh
Executes a brief run of QTCM1 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 spinup.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_inline1341 ''. 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 gif for more information about the makefiles included with this QTCM1 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. Default values for these user-controlled variables are defined in the subroutine DriverInit in driver.f.:

bnddir
Path and name of the directory containing the boundary condition datasets. See Section gif for details.
SSTdir
Path and name of the directory containing the SST datasets. See Section gif for details.
outdir
Path and name of the directory to which the output data will be written. See Section gif 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 is more prone to numerical instability in the spin-up process, and it has spin-up time longer than the atmosphere by several months. You may never encounter this problem. Our recommendation is to run the model with land ``off'' for the first time (spinup.sh is set with such a setting), or use the default file qtcm.restart.
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 millennium 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. Note: 1 year tex2html_wrap_inline1343 360 days in QTCM1 for standard setting. A version with 365 days per year (no leap years) is available upon request.

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.
noout
No output for the first noout days; useful for spin-up. Type INTEGER.
ntout
Mean output every ntout days. See Section gif for more details. Minimum value is 1. Type INTEGER.
ntouti
Instantaneous output every ntouti days. See Section gif 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 unbalanced initial state; the spin-up time for the atmosphere is several days, and several months for land. Type INTEGER.

NB: Currently, restart using qtcm.restart is not ``perfect.'' This is because in the standard version, qtcm.restart.out does not save diagnostic physical variables that are based on previous timesteps of those prognostic variables that are saved in qtcm.restart.out.

dt
Time step for the atmosphere (sec). Type REAL tex2html_wrap_inline1345 8.
mt0
Dimensionless multiplier to set barotropic mode time step. The time step (sec) for the barotropic mode equals tex2html_wrap_inline1347 . Default value is 5. Type INTEGER.

Below is a sample of the user-controlled parameters section from a model execution script (e.g. test.sh):

 &driverdata
 title='QTCM test run'        !title
 bnddir='$QTCMROOT/bnddata'   !bnd. data other than SST
 SSTdir='$QTCMROOT/bnddata/SST_Reynolds_oi'    !where SST files are
 outdir='$QTCMROOT/proc'      !where output go
 landon=0                     !=0: land is like ocean with faked SST
 SSTmode='seasonal'           !decide what kind of SST to use
 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
 noout=0                      !no output for the first noout days
 ntout=30                     !output mean every ntout days
 ntouti=30                    !output instantaneous value 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
Thu Sep 9 13:11:12 PDT 1999