Skip to main content.

Lemsub

Lemsub is the shell (unix) interface to the Met Office Large Eddy Model (LEM). It is designed to make the submission of LEM jobs to a remote or local machine easier. It is a menu based script which also allows selection of most parameters from the command line.

^ TOP

Main files

The LEMSUB directory contains this file (readme.txt) and then sub-directoried bin and RUNFILES. In bin is lemsub itself the executable script (along with rmdif and rmdifl which are from by lemsub). In RUNFILES are files used by lemsub. "default" is the main file and sets many standard options for lemsub. Also needed is a macINFO and runMAC file. macINFO describes important information on the remote or local machine such as the compile options. runMAC is the script which runs the LEM. Some examples of runMAC are included but you may need make these mach your own.

^ TOP

Lemsub usage

Once lemsub is in your path you can them run lemsub from the command line as follows:

 lemsub [-a or various options] <local file names/number> <remote run number>

By default the menu will appear when lemsub is run showing all the files and options which are to be used in the run. These can then be changed from the menu with the full range of options being displayed by selecting "R".
Possible command line options are:

-h Print help file
-t [1-5] Remote machine file name i.e. macINFO
There can be any number of these predefined in default using MX1,MX2...
NB: while these files have a default machine set by MACM in macINFO, this can be overridden with the -N < option>
-N machine Remote machine name
This overrides the default machine in a macINFO file. For example to choose t3ea rather than t3eb when t3eb is the option in t3eINFO (selected by -t1), use -t1 -N t3eb
-d number the debug/compile number:
1) Update, compile, run from start
2) Update, compile (DB), run from start
3) Recompile, new namelists, run from start
4) Recompile (DB), new namelists, run from start
5) New namelists, restart from current
6) No new files, restart from current
7) No new files, recompile, run from start
8) No new files, recompile, restart from current
9) Update, recompile, restart form current
-v number The version of the LEM required.
This corresponds to upto 5 values which can be put in the macINFO file next to VSX1 to VSX5.
-r Restart run
c.f. also option -d
-n number The Number of processors
For a restarted run this number should be the same as for the original.
-s Force run to use single file (obsolete)
-c number The count number.
The number which counts how many chain runs have submitted on remote machine. For a resubmitted job this should be set automatically so this option should never really be needed.
-l number The Maximum count number allowed.
Run will terminate if count>maxcount. A value of 0 will do a compile only.
-q number The T3E/NEC queue for the job.
1 = express 2 = prime 3 = night
-o [none|copy|move] The diagnotic ouput option.
none = leaves diagnostic files in run directory on remote machine
copy = as none but copies to local machine
move = moves diagnostic files to local machine
-j number Jobtime.
Set jobtime in seconds for each run. Only relevant on T3E and NEC but can be used in any new runMAC file.
-y number Memory choice
Flag passed to runFILES. Number of GB on NEC
-a Single processor choice. (obsolete)
-b [1-2] Radiation path.
Choose the radiation PATH 1 or 2 from the macINFO file
-u Put first chainrun in the express queue.
-m Do NOT Use the Menu version of lemsub.
-f Movie choice. (obsolete)
-D path/to/filename Use different default file.
-R ARG Use different update file list.
This will look for a file called ARGlist.txt
-1 to -9 filename Replace any update file 1 to 9 with filename.
This will only be replaced if this file exisits. No option to replace update files beyond 9 currently.
-C ARG Use different chainrun namelist file
This will look for a file called NAMELIST/nmlchainARG
-S ARG Use different setup namelist
This will look for a file called NAMELIST/nmlsetupARG
-F ARG Use different (optional) forcing data
This will look for a file called FORCING/forceARG.dat

^ TOP

Setting up lemsub

To use lemsub you first need to:

  1. Set up an environmental variable called LEM, which points to the directory containing all the relevant files, e.g.
    unix-prompt> export LEM="/path/to/LEM" (for sh/ksh/bash)
    unix-prompt> setenv LEM /path/to/LEM (for csh/tcsh)

  2. Untar the file lemsub.tar.z in the $LEM directory.
  3. Set up a file on any remote machines you wish to use in your home directory which should be called: .rhosts. The contents of this file should be lines with local machine name and user ID on this. e.g.
    localhost myid
  4. Set up a file on the local machine also in your home directory and also called: .rhosts. The contents of this file should be: lines with remote machine names and your user ID on these. e.g.
    remotehost1 meonrem1
    remotehost2 meonrem2
  5. Using the template of linuxINFO make a macINFO file of your own for all machines with different architecture.
  6. Change the information in the file "default" to relect your options. Comments in this file will help.
  7. Make a new directory to do your runs in. Below this have subdirectories called FORCING, UPDATES and NAMELISTS where the relevant files can go.