8.5.2. Run Class

class parflow.tools.core.Run(name, basescript=None)

Bases: BaseRun

Main object that can be used to define a ParFlow simulation

Parameters:
  • name (str) – Name for the given run.

  • basescript (str) – Path to current file so the simulation execution and relative path will be assumed to have the script directory as their working directory. If not provided, the working directory will be the directory where the python executable was run from.

Methods

parflow.tools.core.Run.from_definition

Method to generate a Run object from a file.

parflow.tools.core.Run.get_name

Returns name of run

parflow.tools.core.Run.set_name

Setting new name for a run

parflow.tools.core.Run.write

Method to write database file to disk

parflow.tools.core.Run.write_subsurface_table

parflow.tools.core.Run.clone

Method to generate a clone of a run (for generating run ensembles, etc.)

parflow.tools.core.Run.run

Method to run simulation

parflow.tools.core.Run.check_nans

Check the input files for NaNs.

parflow.tools.core.Run.dist

Distribute a PFB file using the P/Q/R settings from the run or override them with the provided arguments.

parflow.tools.core.Run.undist

Undistribute a PFB file.

Inherited Methods

parflow.tools.core.Run.details

Return details based on a location.

parflow.tools.core.Run.doc

Return docs based on a location.

parflow.tools.core.Run.get_children_of_type

Return a list of PFDBObj of a given type that are part of our children.

parflow.tools.core.Run.get_context_settings

Return global settings for our current parflow run.

parflow.tools.core.Run.keys

Gets the key names necessary for the run while skipping unset ones

parflow.tools.core.Run.pfset

Allow to define any parflow key so it can be exported. Many formats are supported: - key/value: To set a single value relative to our current PFDBObj. - yaml_file: YAML file path to load and import using the current PFDBObj as root. - yaml_content: YAML string to load and import using the current PFDBObj as root. - hierarchical_map: Nested dict containing several key/value pair using the current PFDBObj as root. - flat_map: Flat dict with parflow key/value pair to set using the current PFDBObj as root.

parflow.tools.core.Run.select

Return a PFDBObj object based on a location.

parflow.tools.core.Run.to_dict

Method that will return a flat map of all the ParFlow keys.

parflow.tools.core.Run.to_pf_name

Helper method returning the key to use for Parflow on a given field key.

parflow.tools.core.Run.validate

Method to validate sub hierarchy

parflow.tools.core.Run.value

Return a value based on a location.

Attributes

parflow.tools.core.Run.data_accessor

Return a DataAccessor to streamline access to numpy array of the various field this run is linked to.

parflow.tools.core.Run.full_name

Helper method returning the full name of a given ParFlow key.