4.2.2. Script descriptions

4.2.2.1. Overview
4.2.2.2. Assigns files

4.2.2.1. Overview

Running SMOKE from scripts provides a flexible approach to running SMOKE. We recommend that new users start with the standard configuration of scripts and directories provided with the default installation. This configuration uses the directory structures described in Chapter 3, SMOKE Directory Structure and a separate run script for each source category, as we will get to soon. In Section 4.4, “How to use SMOKE”, we provide all of the information you need to know to adapt the test case configuration to your modeling case. If you ever want to move beyond using the default configuration, we do not describe how to do that in detail. In fact, we could not describe this, because there are an infinite number of ways to arrange the directories and scripting for SMOKE; however, we have provided some information about what do to in Section 3.3, “How to change the default directory structure”.

Running SMOKE using scripts involves many scripts working together. This can be confusing for new users, but we have made efforts to make using the scripts easier and more robust with this version of SMOKE.

All SMOKE scripts can be found in the $SMKROOT/scripts/run directory, or simply the $SCRIPTS/run directory (after having invoked the Assigns file).

4.2.2.2. Assigns files

The assigns files are located in $SMKROOT/assigns. The nctox case assigns file is called ASSIGNS.nctox.cmaq.cb05_soa.us12-nc. One Assigns file is provided for the nctox case, and you can create your own files by copying it to a new name and changing it. At least one Assigns file must come with each preconfigured run (such as the nctox case) for SMOKE.

The Assigns files are divided into three major sections. The first section contains environment variables for controlling the setup of a case, such as the dates being modeled, the name of the grid, and the name of the chemical mechanism. The second section lists all of the input files in SMOKE (by source category) and users can change these adapt the Assigns files to their cases by changing the input files. The third section calls helper scripts to create input and output directories and configure the compiler environment variables. It is wise to copy an existing Assigns files to new files and modify the new files, so that you do not lose the default configuration.

In addition, there are a number of helper scripts used by the Assigns files. Unless users are changing the way SMOKE behaves when running from scripts, it should not be necessary to change these scripts. Changing them could result in behavior different from what is documented in this chapter. The helper scripts and their purposes are:

  • check_settings.scr: Set all environment variables used in Assigns file to default values if they are not already defined by a calling script (e.g., when invoking the Assigns file from the UNIX prompt instead of a script).

  • set_case.scr: Set the environment variables that control output file names (ABASE, BBASE, MBASE, PBASE, EBASE, ASCEN, BSCEN, MSCEN, PSCEN, and ESCEN). See also the SMK_FUTURE_YN, FYEAR, SMK_CONTROL_YN, and CNTLCASE script settings in Section 4.2.4, “Script settings”

  • set_dirs.scr: Set the SMOKE directory structure

  • setmerge_files.scr: Set Smkmerge output file names, depending on run script settings

  • smk_mkdir: Create input and output directories

  • smk_rmfiles.scr: Remove SMOKE intermediate and output files

  • sysflags: Set the compiler options needed for compiling SMOKE

  • unset.scr: Unset environment variables that do not need to be defined after the Assigns file has been run