Next, we set the parameters that are read in from files at execution time. Changes to such parameters do not require re-compilation.
1. Set the nametags for the model run in the file main.in. When the file main is executed, it takes input from the file main.in. (If an input file is not used the model will take its input interactively from the terminal.) The file main.in contains three nametags of less than 20 characters, each on a separate line. An example of main.in is
It is possible to make more than one model run simultaneously. Give another nametag to each run on the first line of the input file. Be sure to have a Runtime_parm file with that nametag (see 2 below). Also, change the name of the executable file, standard out, and standard error files after recompilation (if recompilation is necessary) and before execution (see 3 below).
2. Set the runtime parameters in the file you create from a standard Runtime_parm.tag file. Give the file the name MAIN/Runtime_parm.NA1.0 where NA1.0 is the tag name on the first line of the main.in file. This file is read by main.F at execution, so you may change any of these parameters in the file without recompiling with the ``make" command.
3. The program main is run in background with the command
nohup main < main.in >& main.out &
or, to obtain information on the simulation runtime, with
(timex nohup main < main.in > main.out) >& main.err &
This is the unix separation of standard out from standard error. The standard out (fortran 06)output is written to file main.out, and the results of the time command (user, system, and real time of model run) and any error messages are written to file main.err. Note that on a unix system, you can view the main.out file as the program is being run using the more or tail -f commands, for example:
4. The model output created by a simulation is placed in the subdirectory OUTPUT.TAG_ROOT/TAG. Recall that the subdirectory OUTPUT.TAG_ROOT was created by running the executable prep, and the subdirectory OUTPUT.TAG_ROOT/TAG is created by running the executable main. A new subdirectory OUTPUT.TAG_ROOT/TAG is created each time a new identifier tag name is given on the first line of the main.in file, and the simulation restart file is written there
For our example above, the restart file would be OUTPUT.NA1/NA1.0/ RESTART.NA1.0.
A subdirectory SETUP is created and the files that are copied to it are
You should use the #define OUTPUT_ML C-preprocessor directive to create files for output. This takes advantage of the routines that Frazer Davidson(?) wrote at Memorial University of Newfoundland. These can be used for matlab plots. To control what is plotted when OUTPUT_ML is defined, you should look at the Output.h file in MAIN. For greater detail, look at output.F in MAIN/SUBS.
To get movie files, you need to define OUTPUT_DD (DD stands for David Dietrich). The interval at which plots are produced with this option is controlled by the parameter MVI in the Runtime_parm.tag file. Note that MVI is given in days. Also note that this just gives sections at constant Z levels or at the bottom level. OUTPUT_ML allows you to get vertical sections.
It is also possible to use restart files to make plots at the time that a restart is done. These files contains a complete dump at a single time and hence can be quite useful for plotting purposes, but only for a snapshot.
The CANDIE model generates a lot of output data for each model TAG simulation, particularly when the data is output frequently to make movies, or when a restart file is written. This data is placed in subdirectories and sub-subdirectories so that it may not be immediately apparent how much data is generated. A word of caution is in order: disk space can fill up quickley if a number of simulations are made with different runtime TAGnames, and a conscious effort should be made to delete files from simulations that are no longer of use. Check the OUTPUT.TAG_ROOT directories and their OUTPUT.TAG_ROOT/ TAG subdirectories for each case periodically to see what data files are no longer necessary.
5. Running from a restart file
Restarts can be done without difficulty with the CANDIE model. First, a run should be made from the initialization (or a previous restart) so that restart files are available. In the file MAIN/ Runtime_parm.tag, set LRSTRT = 1. When the executable program main is run, the model will ask for the present identifier tag and preparation tag_root names as usual, but also ask for the identifier tag name corresponding to the run from which you want to restart. This will be the tag_read name on the third line of file main.in. This should give a ``seamless'' restart. The parameters MXIT and ISAV will be the additional number of time steps that the model will be run, and at which the next restart file will be written, respectively.