By default, SMOKE is installed in a directory called SMK_HOME
(the complete process for installing SMOKE is described in Chapter 12, Downloading, Installing, and Compiling SMOKE). As shown in the previous section, SMK_HOME
is an environment variable on which other SMOKE directories depend; it is the root directory of all other SMOKE directories.
When you install SMOKE, you must define and create your own SMK_HOME
directory as part of the installation process. Since SMK_HOME
is an environment variable, you can choose whatever name you like; we cannot prescribe a name for you because each UNIX user
has a different computer and disk names. One recommendation that we can make is that SMK_HOME
be set close to the bottom of a directory structure, such as a short directory name like /models
. Using a short directory name will limit the overall directory lengths for some of the subdirectories deep within the SMOKE
directory structure. The SMK_HOME
directory used for SMOKE can be the same directory used to install VERDI or the I/O API.
Figure 3.1, “Basic SMOKE directories: the first three levels of the directory structure” shows the first three layers of the SMOKE directory structure. All of the directories in the figure are created during the
SMOKE installation process. From the SMK_HOME
directory stems the data
directory, the scripts
directory, and the subsys
directory. The data
directory corresponds to the environment variable SMKDAT
, while the subsys
directory corresponds to SMK_SUBSYS
; the environment variables are shown in parentheses underneath the actual directory names in the figure. The scripts
directory does not have an associated environment variable since we did not feel that one was necessary. The subsys
directory is discussed in more detail within this subsection. The data
directory will be described more fully in Section 3.2.3, “Locations of input files”, Section 3.2.4, “Locations of intermediate files for base and growth/control cases”, Section 3.2.5, “Locations of model-ready output files for base and growth/control cases”, and Section 3.2.6, “Locations of reports”, when we describe the locations of input, intermediate, output, and report files. We will not discuss the scripts
directory since it only contains two general setup scripts that should not need to be modified under normal SMOKE use.
The environment variables shown in parentheses are available to you once you invoke the Assigns file from the command line.
The run scripts that come with SMOKE invoke the Assigns file to set up the environment variables automatically. To manually
invoke the Assigns file, you must go to the
directory and type
$SMKROOT
/assigns
source
<Assigns file name>
where <Assigns file name>
is replaced with your specific Assigns file name. Note that SMOKE only works with variants of the C-shell including csh and tcsh. If you are running a different shell (such as bash), you will need to switch into a C-shell before sourcing the Assigns file or running any SMOKE scripts.
Once this command has been used in a UNIX window (e.g., xterm, terminal, console), then the environment variables are available at the command line or to a script that uses the Assigns file. What this means is that the UNIX environment “remembers” the setting of the environment variable. To access the contents of the variable - in this case, a path name - the dollar sign ($) must be used in front of the variable from a UNIX prompt or script. From the prompt, this is most useful for changing directories. For example, after the Assigns file has been invoked, the command
cd
$SMKDAT
will take you to the
directory, no matter where else in the directory structure you were located when the command was issued. Similarly, the Assigns
file can use these environment variables for setting the paths for the input and output files.
$SMK_HOME
/data
As shown in Figure 3.1, “Basic SMOKE directories: the first three levels of the directory structure”, the subsys
directory (creating during installation of SMOKE) contains six subdirectories, each with the following purposes:
edss_tools
: Contains the source code, makefiles, and library object files for the EDSS Tools library, necessary for compiling SMOKE
programs.
filesetapi
: Contains the source code, makefiles, and library object files for the FileSetAPI library, necessary for compiling SMOKE
programs.
ioapi
: A placeholder location for the I/O API library object files. When compiling SMOKE, the makefiles look here for the I/O API
library and the SMOKE scripts look here for the I/O API utility programs. The files can be linked to the main I/O API installation
which can be located elsewhere. Please see Chapter 12, Downloading, Installing, and Compiling SMOKE for more information.
ioapi_includes
: Location for the I/O API include files, needed for compiling the FileSetAPI library, EDSS Tools library, and SMOKE libraries
and programs. All makefiles that come with SMOKE look here for the I/O API include files.
netcdf
: A placeholder location for the NetCDF library object files. When compiling SMOKE, the makefiles look here for the NetCDF
library, but the actual library can be linked to the main NetCDF installation, which can be elsewhere on your computer. Please
see Chapter 12, Downloading, Installing, and Compiling SMOKE for more information.
smoke
: This is the main SMOKE directory. It contains the Assigns files (one per modeling case), SMOKE source code, makefiles, scripts,
and executables.
Figure 3.2, “Subdirectories of the main SMOKE directory” shows the subdirectories inside the main SMOKE directory, smoke
; these are all created during the installation of SMOKE. These subdirectories contain the Assigns files, source code and
makefiles, scripts, and executables.
These five subdirectories have the following purposes:
assigns
: Contains the Assigns files and all helper scripts for the Assigns files.
doc
: Contains the files that the SMOKE installation processes use to check that the installation and testing of SMOKE have worked
properly.
: This directory contains the executables for your particular system. Different directory names apply to different platforms
(e.g., $SMOKE_EXE
Linux2_x86_64pg
, IRIXn32f90
, SunOS5f90
). For more information about the various platforms for which SMOKE is available, see Chapter 12, Downloading, Installing, and Compiling SMOKE.
scripts
: Contains run scripts and other scripts
scripts/install
: Scripts to install SMOKE and check the installation
scripts/make
: Scripts for compiling SMOKE
scripts/run
: Default run scripts and associated helper scripts
src
: Contains subdirectories that store the source code and makefiles for each SMOKE program:
src/biog
: Normbeis3, Tmpbeis3
src/cntlmat
: Cntlmat
src/emmod
: Fortran 90 modules used by multiple SMOKE programs
src/emqa
: Smkreport
src/emutil
: Aggwndw, Beld3to2, BlueSky2Inv, CEMScan, Geofac, Invsplit, Layalloc, Metcombine, Metscan, Pktreduc, Smk2emis, Surgtool, Uam2ncf
src/grdmat
: Grdmat
src/inc
: Include files shared by multiple SMOKE programs
src/lib
: SMOKE library
src/movesmrg
: Movesmrg, Met4moves
src/point
: Elevpoint, Laypoint
src/smkinven
: Grwinven, Smkinven
src/smkmerge
: Mrgelev, Mrggrid, Smkmerge
src/spcmat
: Spcmat
src/temporal
: Temporal