pencil.read.params

Contains the parameters of the simulation.

Attributes

lnml

Classes

Param

Param -- holds the simulation parameters.

Functions

param(*args, **kwargs)

Wrapper for Param.read()

Module Contents

pencil.read.params.lnml = True
class pencil.read.params.Param

Bases: pencil.util.DotDict

Param – holds the simulation parameters.

read(datadir='data', param1=False, param2=False, quiet=True, conflicts_quiet=True, asdict=True, nest_dict=True, append_units=True, keep_nested=False)
read(datadir=’data’, param1=False, param2=False, quiet=True,

conflicts_quiet=False, asdict=True, nest_dict=True, append_units=True)

Read Pencil Code simulation parameters. Requires: nl2python perl script (based on Wolfgang Dobler’s nl2idl script).

Parameters:
  • datadir (string) – Directory where the data is stored.

  • param1 (bool) – Selects the set of parameters only from start.

  • param2 (bool) – Selects the set of parameters only from run. If neither Param1 nor Param2 is set, both param.nml and param2.nml are read in.

  • quiet (bool) – Flag for switching of output.

  • conflicts_quiet (bool) – Flag for switching off printing duplicate labels.

  • asdict (bool) – Reads parameters as dictionary.

  • nest_dict (bool) – Reads parameters as nested dictionary.

  • append_units (bool) – Derives dimensional units from standard code units.

  • keep_nested (bool) – Whether to keep the attributes corresponding to individual namelist. If True, self.XXX will contain the entries from XXX_run_pars. Requires nest_dict=True.

Returns:

  • Instance of the pencil.read.param.Param class.

  • All of the selected parameters are imported as class members.

pencil.read.params.param(*args, **kwargs)

Wrapper for Param.read()