HTML automatically generated with rman
Table of Contents

Name

runcmhog - preprocess a CMHOG namelist and run program in a new directory

Synopsis

runcmhog [-options] run_directory [[namelist/][key=val]]

Description

runcmhog is a preprocessor to run (a series of) CMHOG programs. It expects the ’cmhogin’ input file to be present in the local directory, uses that, but any variables can be overridden via the commandline. The first argument must be a (non-existent) directory name, in which a new ’cmhogin’ file will be written, and cmhog will be run. The ’cmhog’ program is allowed to be in the unix PATH

Options

The following options are recognized, they must appear before the run_directory name
-d
Turn debugging on.
-h
show brief options reminder/help message
-n namelist
Optional name of the namelist file. Default: cmhogin.
-e executable
Optional name of the executable name. By default the users search path will be consulted, for relative references remember this will be run from within the run_directory. Default: cmhog.

Caveat

Cannot add new keywords, they must already have an entry in the cmhogin template file.

since run-directories are created, entries like "pgrid/pot0" contain file references that thus have to be properly relative, or absolute.

a directory name cannot contain an equals sign

Example

Here is a shell script running a series of models from a template cmhogin in the current directory.
    runcmhog run001
    runcmhog run002 aob=3.0
    runcmhog run003 aob=2.0
    runcmhog run004 aob=3.0 qm=5.5e4
    runcmhog run005 aob=3.0 qm=3.5e4
    runcmhog run101 ggen2/nbl=200
For following snippet of c-shell code shows how easy it is to keep your CPU busy for months and months...
foreach a (1 1.5 2 2.5 3 3.5)
  foreach b (10 20 30 40 50)
    foreach c (1 3 10 30 100 300 1000)
      set dir=run1/$a/$b/$c
      mkdir -p $dir
      runcmhog -n cmhogin $dir a=$a  b=$b  c=$c >& $dir/cmhog.log
    end
  end
end

Namelist

The fortran namelist format has many flavors, and you may wind up finding that your fortran compiler produces a flavor this version of the program cannot deal with. For example, a standard line reads as
 $hycon idiff=1,ifltn=1,tlim=2.0 $end
 $ggen2 nbl=37,ymin=0.1,ymax=16.0,yrat=1.15708,igrid=1,lgrid=.true. $end
 $ggen3 nbl=20,zmin=-1.5708,zmax=1.5708,igrid=1,lgrid=.true. $end
but some compilers will expect/produce a comma at the end of each line. Also, for example in RAMSES (uses fortran90) you can see this type:
&OUTPUT_PARAMS
noutput=1
tout=0.4
/
&HYDRO_PARAMS
gamma=1.6666667
courant_factor=0.8
slope_type=2
riemann=’roe’
/

See Also

hdfgrid(1NEMO) , sdsfits(1NEMO)

Files


NEMO/src/image/hdf/cmhog      cmhog utility tools
CMHOG2                        cmhog2 code (may be out of date)

Author

Peter Teuben

Update History


15-Jun-96    man written    PJT
19-feb-97    implemented -e and -n flags    PJT
29-jun-02    documented some more flags    PJT
14-may-03    rundir can be in a hierarchy now    PJT
21-jul-03    fix documentation bug about namelist specification    PJT


Table of Contents