General
STILT is here regarded as the whole package, that consists of the main functions:
Trajecmod() ==> loop over receptor locations (e.g. points along flight track, or different times at a ground station)
Trajec() ==> calls fortran executable hymodelc and generates object with particle locations (and other variables from the metfields)
Trajecflux() ==> maps particle location objects to surface flux grids, calculates tracer mixing ratios (GSB model)
Trajecvprm() ==> maps particle location objects to surface flux grids, calculates tracer mixing ratios (VPRM model)
Trajecfoot() ==> calculates footprints or influence functions from particle location objects
A tutorial of how to use the most important functions and how to plot influence functions is in 0stilt_tutorial.r
Preparing input and parameters
INPUT
Input to STILT are receptor locations and times. An R-object needs to be created that contains that information as a matrix with 4 columns: fjul (fractional julian day since 1/1/1960), lat (deg N), lon (deg E) and altitude (meters above ground). The name of this object and the location where it is stored is then used by STILT. An example of how to create such an object is given in "create_times.r".
PARAMETERS
The script "setStiltparam.r" contains assignments for many parameters that influence STILT. To change the parameters, setStiltparam.r has to be edited.
Basic parameters that are set generally once at the first time are: path (path where output gets saved, and input data (Receptor locations and times) and boundary mixing ratio objects are read from); metpath (where met data are stored in ARL format) and vegpath (path to get surface flux objects)
Typical parameters that change often are: nhrstilt (for how many hours backward), convect (T to turn on convection), Timesname (name of object containing receptor information), overwrite (even if particle location files are there, Trajectories will be recalculated), fluxTF (calculating mixing ratios from mapping to fluxes), footprintTF (calculating footprints or influences). For details see documentation within setStiltparam.r
Running STILT
A) Simple run
Change to directory STILT_modelling. From command line call STILT with
call: stilt_simple_run.sh
stilt_simple_run.sh contains 1 line: 'R CMD BATCH stilt.r stilt.log', i.e. it calls R in batch mode with the script stilt.r, and it generates a log file called stilt.log. stilt.r sources all required functions in the directory (refered to as sourcepath), and calls the function 'Trajecmod()'. 'Trajecmod()' calls 'Trajec()' for each starting time to calculate paricle distributions, and (if desired) calls Trajecflux() to calculate mixing ratios and Trajecfoot() to derive footprints.
B) Using the LSF queing system for distribute STILT run on multiple processors submit system or working with multiple processor
call: stilt.bsub.sh arg1 arg2 arg2
with arg1 = start part
arg2 = end part arg3 = total number of parts of the STILT ru
e.g.: stilt.bsub.sh 1 5 5
(means: - start job 1 - end job 5 - 5 jobs will be started)
Output from STILT
Particle location objects: objects containing time since release (backward with negative time), with names that reflect time and position of the receptor (e.g. "2002x08x16x06x42.54Nx072.17Wx00030"). These objects are saved in files like "/STILT_modelling/Output/.Rdata2002x08x16x06x42.54Nx072.17Wx00030" using assignr() (see below), and they can be retrieved using getr (see below).
Logfile: --info for individual receptor runs: saves logfile to object with date and time in name example: ./Runs.done/.RDatarun.info.Mar..9.18:36:21.2004 this can be retrieved to R with info<-getr("run.info.Mar..9.18:36:21.2004",path="./Runs.done/") --stilt.log contains all printed output from stilt.r
Maps/Matrices of Footprints/Influence functions: objects containing Footprints/Influence, with names that reflect time and position of the receptor (e.g. "foot2002x08x16x06x42.54Nx072.17Wx00030"). These objects are saved in files like "/STILT_modelling/Output/.Rdatafoot2002x08x16x06x42.54Nx072.17Wx00030" using assignr() (see below), and they can be retrieved using getr (see below).
Generate trajectories of particle ensembles
- control at first the right settings for "path", "metpath"
and "rundir" in the setStiltparam.r file
- set the variable "nhr" (number of hours backwards)
in setStiltparam.r
Generate footprints
The setting is to do in the setStiltparam.r file
- set the variable "nhr" (number of hours backwards) - set variable "fluxTF" to false, if no fluxes are
available
- set variable "foottimes" - set variable "metsource" - set "lon.ll" (lon lower left corner) - set "lat.ll" (lon lower left corner) - set variable "overwrite" to false - define the correct file for the "Timesname" variable
(This receptor file can be created by calling the function /stiltR/create_times.r where you have to change the "fjul" variable to the julian date of the time period and the "lat","lon" as well as "agl" (altitude above ground level)
- change directory (cd) in your home-directory of
STILT
- run STILT by using e.g.:
R CMD ./stilt.bsub .sh 1 5 5 (where 1: is start job: 5: is end job; 5: number of used CPUs)