The run.def Input File

From Planets
Revision as of 14:59, 4 May 2022 by Emillour (talk | contribs) (Created page with "== The run.def input file and its format == The run.def file is a text file that is read at run time by the GCM (and must thus be present in the same directory as the executa...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The run.def input file and its format

The run.def file is a text file that is read at run time by the GCM (and must thus be present in the same directory as the executable). It contains the values of various parameters that the user can specify (as "key = value", where "key" is a predefined keyword and "value" may be a real, an integer, a string or a logical) and modify depending on the specific simulation that is intended, e.g. the line:

planet_type = generic

means that when the GCM will run, it will set parameter planet_type (which identifies the physics package that is used) to generic.

Any line starting with # is a comment, e.g.

# Number of days to run model for

The order in which parameters are given in the run.def file is not important, except if a parameter value is given more than once (not recommended!), then it is the last occurrence that prevails.

Worth knowing about: if a given "key" is not present in the file, then a default value (hard coded in the code) will be used for the related parameter.

*.def files included in run.def

The run.def file can include other files (based on the same format, lines containing "key = value" or comments) using the INCLUDEDEF keyword, e.g.:

INCLUDEDEF=callphys.def

This is a convenient way to separate related sets of parameters in separate files; common practice is to put dynamics related parameters in run.def and physics related parameters in callphys.def

Reference def files

Reference *.def files are provided in the LMDZ.GENERIC/deftank directory

Outputted used_*def files

When the GCM run finishes, for each of the input def files *.def, an ASCII output file used_*.def is generated (in practice these would be used_run.def and used_callphys.def). These files contain, along the same format as the *.def input files, the "key = value" that were used, along with comments about whether "value" was read in the input def file or if the code default was used (i.e. the sought "keyword" was not present in the input def files).