2.2. Assigns file and environment variables

The Assigns file is a script used to set up the parameters of a SMOKE run. The file configures the UNIX environment so that all of the correct input, intermediate, and output directories and files can be identified and used by the SMOKE programs. It also sets things like the name of the grid and the time period that you will run SMOKE for a given case. It does this by setting many UNIX environment variables, explained in the next paragraph. The Assigns file also uses environment variables to configure compiler options, so that SMOKE can be compiled on operating system other than the ones provided with the SMOKE distribution. More information on the Assigns file is provided in Section 4.2.2.2, “Assigns files”.

Environment variables are aliases that can be set by a UNIX operating system. These variables are defined during a user’s UNIX session, usually defined by an xterm or other UNIX terminal window. The environment variables that SMOKE uses store the input, intermediate, and output files and directories. For example, the environment variable for the directory that is the SMOKE root directory is SMKROOT. At the UNIX prompt, this environment variable could be defined to an actual path such as /home/mylogin/smoke. To set an environment variable, the UNIX setenv command is needed. In this example, the command to define SMKROOT as the given path is:

setenv SMKROOT /home/mylogin/smoke

After this command is issued, the SMKROOT environment variable stores the characters /home/mylogin/smoke as its value. To use the value of an environment variable, the dollar sign must proceed the variable name at the UNIX prompt. In the follow example, we give the UNIX command echo to print the contents of the SMKROOT environment variable at the UNIX prompt. Note the use of the dollar sign before the SMKROOT variable name.

echo $SMKROOT

When the UNIX system executes this command, the following is displayed at the UNIX prompt:

/home/mylogin/smoke

The environment variables set by the Assigns file for directories are described in Chapter 3, SMOKE Directory Structure. The variables used by the SMOKE scripts for controlling SMOKE execution are described in Section 4.2.4, “Script settings”. Finally, the environment variables that control program behavior are described in Chapter 5, SMOKE Utility Tools, Chapter 6, SMOKE Core Programs, and Chapter 7, SMOKE Quality Assurance.