HTML automatically generated with rman
Table of Contents

Name

idf - Input Directive File (IDF) processor

Synopsis

idf [parameter=value] [-- idf_parameter=value ...]

Description

idf creates an input parameter file by changing selected parameters based on an Input Directive File (IDF). An IDF describes named and typed input parameters meant to supply parameters to a program. This file then matched to an actual example of this parameter file, where the parameters are not named (list a list of numbers). Selected named parameters can be changed then written out to a new parameter file in order for an external program to run and use this parameter file.

A typical example of use would be where two input files (foobar.idf and foobar.inp) create an output file (run1.inp) where two parameters were given a new value:

    idf foobar.idf foobar.inp run1.inp --  n=100 eps=0.01
    foobar < run1.inp
but see also the EXAMPLES below.

For a full description of the format, see idf(5NEMO)

Parameters

The following parameters are recognized in any order if the keyword is also given, and need to be given before the IDF PARAMETERS (see below)
idf=
Input Directive File. This file is the template with type and name information for the parameters. See also idf(5NEMO) . If none supplied, the internal example is shown that can be played with. No default.
par=
Input parameter file. This file is an example that another program will use as input file, but where some of the values need to be modified. If none supplied, only IDF parsing is attempted. Default: none.
out=
Output parameter file. The file contains the changed parameter based on the new values given to the IDF parameters. If none supplied, only substituation is attempted, as long as the input parameter file is given. Default: none
lineno=t|f
Add linenumbers to IDF output? A debug option [f]
checktype=t|f
Check types (real/integer/string/...). Not implemented yet. [f]
report=t|f
Report all key=val pairs for the IDF_parameters. Useful as a reminder [f]

Idf Parameters

The following IDF parameters have to be preceded by the standard -- separator, such that NEMO parsing can stop.
--
Any parameters after this designator is not parsed by the NEMO command line processor (see also getparam(3NEMO) ), but the keyword names are expected to be present in the IDF file.
key=val..
Any set of named IDF_parameters can be listed here. Currently very little parsing checks are done here.

Caveats

Open ended array IDF keywords do not use nemoinp(1NEMO) style expression yet, .e.g. you cannot use rad=2:10:2, but instead would need (csh notation):
    set rtmp=(‘nemoinp 2:10:2‘)
    .. rad="$rtmp"

IDF keyword do not use getparam(3NEMO) yet, so interesting constructs such as rad=@radii.tab cannot be used here.

Examples

In the following example an integer and real parameter are read by a program from standard input:
 % cat foobar.idf
 # comments for the ’foobar’ program 
 i:n
 r:eps
 % cat foobar.par
 10
 0.05
 % idf foobar.idf foobar.par run1.par -- eps=0.1 
 % cat run1.par
 10
 0.1
 % foobar < run1.par
 ...

FORTRAN programs have a variety of styles of getting input parameters. The most common ones that don’t use a NAMELIST are:

1) read directly from standard input: ’foobar < foobar.inp’

2) ask for the file that contains the parameters: ’echo foobar.inp | foobar’

3) fixed name, where it expects that file (e.g. foobar.inp) to be present: ’foobar’

In addition, some programs also have little flexibility to change their output filename, which results in the usage of a run directory in order for programs to run in parallel.

See Also

idf(5NEMO) , idfio(3NEMO) , getparam(3NEMO) , run(3NEMO)

Files


src/kernel/io/idfio.c    source code
$NEMODAT/idf/*.idf    Example IDF for various NEMO examples

Author

Peter Teuben

Update History


12-aug-2014    V0.1 man page written    PJT
13-aug-2014    implemented single open ended array    PJT


Table of Contents