cape.pyover.options.gridSystem
: OVERFLOW grid namelist options¶
This module provides a class to alter namelist settings for each grid in an
Overflow namelist. This modifies the repeated sections (such as GRDNAM
,
NITERS
, METPRM
, TIMACU
, etc.) in the overflow.inp
input file.
Users can use the "ALL"
dictionary of settings to apply settings to every
grid in the system. Any other dictionary in the top level applies to a grid by
the name of that key. An example follows.
"Grids": { "ALL": { "TIMACU": { "ITIME": 3, "CFLMIN": [0.01, 0.025, 0.05, 0.05], "CFLMAX": [0.25, 0.50, 1.00, 1.00] } }, "Fuselage": { "TIMACU": { "CFLMAX": [0.2, 0.4, 0.9, 1.0] } } }
This example sets the CFL number for each grid (and also sets the ITIME
setting to 3). Then it finds the grid called "Fuselage"
and changes the
max CFL number to slightly lower values for each phase. The list
input tells pyOver to set the max CFL number to 0.25
for run.01.inp
,
0.50
for run.02.inp
, etc. If there are more phases than entries in the
list
, the last value is repeated as necessary.
For other namelist settings that do not refer to grids, see
pyOver.options.overnml.OverNml
.
- See also:
- class cape.pyover.options.gridSystem.GridSystemNml¶
Dictionary-based interface for OVERFLOW namelist grid system options
- get_ALL(i=None)¶
Return the
ALL
namelist of settings applied to all grids- Call:
>>> d = opts.get_ALL(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
orNone
Phase number
- opts:
- Outputs:
- d:
pyOver.options.odict
ALL namelist
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_GridByName(grdnam, i=None)¶
Return a dictionary of options for a specific grid
- Call:
>>> d = opts.get_GridByName(grdnam, i=None)
- Inputs:
- opts: :class;`pyOver.options.Options`
Options interface
- grdnam:
str
|int
Name or number of grid to alter
- i:
int
orNone
Phase number
- Outputs:
- d:
pyOver.options.odict
Dictionary of options for grid gridnam
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_GridKey(grdnam, sec, key, i=None)¶
Select a grid option
If the option is not found for grid gridnam, default to the value in the
"ALL"
section- Call:
>>> val = opts.get_GridKey(grdnam, sec, key, i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- sec:
str
Section name
- key:
str
Variable name
- i:
int
orNone
Phase number
- opts:
- Versions:
2016-02-01
@ddalle
: First version
- get_grid_var(grdnam, sec, key, i=None)¶
Select a namelist key from a specified section
Roughly, this returns
opts[sec][key]
.- Call:
>>> val = opts.get_grid_var0(sec, key, i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- sec:
str
Section name
- key:
str
Variable name
- i:
int
orNone
Phase number
- opts:
- Outputs:
- val:
int
|float
|str
|list
Value from JSON options
- val:
- Versions:
2016-02-01
@ddalle
: First version
- select_namelist(i=0)¶
Reduce namelist options to a single instance (i.e. sample lists)
- Call:
>>> d = opts.select_namelist(i)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
orNone
Phase number
- opts:
- Outputs:
- d:
pyOver.options.odict
Project namelist
- d:
- Versions:
2015-10-18
@ddalle
: First version2016-02-01
@ddalle
: Copied from pyFun