cape.pyover.options.overnml: OVERFLOW namelist options

This module provides a class to mirror the Fortran namelist capability. The module provides a class, pyOver.options.overnml.OverNml, which interprets the settings of the "Overflow" section of the master JSON file. These settings are then applied to the main OVERFLOW input file, the overflow.inp namelist.

At this time, nonunique section names are not allowed. To modify parameters in repeated sections, use the options in the "Grids" section using pyOver.options.gridSystem.GridSystem.

See also:
class cape.pyover.options.overnml.OverNml

Dictionary-based interface for OVERFLOW namelists

get_FLOINP(i=None)

Return the FLOINP namelist

Call:
>>> d = opts.get_raw_grid(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int or None

Run sequence index

Outputs:
d: pyOver.options.odict

Flow inputs namelist

Versions:
  • 2016-02-01 @ddalle: First version

get_GLOBAL(i=None)

Return the GLOBAL namelist

Call:
>>> d = opts.get_GLOBAL(i=None)
Inputs:
opts: pyOver.options.Options

Options interface

i: int or None

Run sequence index

Outputs:
d: pyOver.options.odict

GLOBAL namelist

Versions:
  • 2016-02-01 @ddalle: First version

get_namelist_var(sec, key, i=None)

Select a namelist key from a specified section

Roughly, this returns opts[sec][key].

Call:
>>> val = opts.get_namelist_var(sec, key, i=None)
Inputs:
opts: pyOver.options.Options

Options interface

sec: str

Section name

key: str

Variable name

i: int or None

Phase number

Outputs:
val: int | float | str | list

Value from JSON options

Versions:
  • 2015-10-19 @ddalle: First version

  • 2016-02-01 @ddalle: Copied from pyFun

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 or None

Phase number

Outputs:
d: pyOver.options.odict

Project namelist

Versions:
  • 2015-10-18 @ddalle: First version

  • 2016-02-01 @ddalle: Copied from pyFun