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.overnmlopts.OverNmlOpts(*args, **kw)
get_namelist_var(sec, key, j=None, **kw)

Select a namelist key from a specified section

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

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

Options interface

sec: str

Section name

key: str

Variable name

j: {None} | int

Phase index

Outputs:
val: object

Value from JSON options

Versions:
  • 2016-02-01 @ddalle: v1.0

  • 2023-05-16 @ddalle: v2.0; use OptionsDict

select_namelist(j=0, **kw)

Sample namelist at particular conditions

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

Options interface

j: {None} | int

Phase index

Outputs:
d: dict

Project namelist

Versions:
  • 2016-02-01 @ddalle: v1.0

  • 2023-05-16 @ddalle: v2.0; use OptionsDict