pywrdrb.parameters.FlowEnsemble#

class pywrdrb.parameters.FlowEnsemble(model, name, inflow_type, inflow_ensemble_indices, **kwargs)#

This parameter provides access to inflow ensemble timeseries.

For a given inflow ensemble file, we want to load and access specific realizations for a given model run. These realizations are loaded from an HDF5 file, then stored in a pandas DataFrame for easy access during simulation.

setup()#

Perform setup operations for the parameter. Automated pywr operation.

value(timestep, scenario_index)#

Return the current flow for the specified timestep and scenario index.

load(model, data)#

Load the parameter from the model dictionary.

inflow_ensemble_indices#

The realization indices of the inflow ensemble to be used for this simulation.

Type:

list

inflow_column_indices#

The column indices of the inflow ensemble DataFrame corresponding to the realization indices.

Type:

list

inflow_ensemble#

The DataFrame containing the inflow ensemble data, indexed by datetime.

Type:

DataFrame

__init__(model, name, inflow_type, inflow_ensemble_indices, **kwargs)#

Initialize the FlowEnsemble parameter.

Parameters:
  • model (Model) – The pywrdrb.Model object.

  • name (str) – The name of the node in the model.

  • inflow_type (str) – The dataset label. Expects to find an HDF5 file with inflow ensemble data in the pn.flows.input_dir directory.

  • inflow_ensemble_indices (list) – The realization indices of the inflow ensemble to be used for this simulation.

  • **kwargs (dict) – Additional keyword arguments to be passed to the pywr.Parameter class. None used.

Return type:

None

Methods

__init__(model, name, inflow_type, ...)

Initialize the FlowEnsemble parameter.

after(self)

before(self)

finish(self)

get_all_values(self)

get_constant_value(self)

Return a constant value.

get_double_lower_bounds(self)

get_double_upper_bounds(self)

get_double_variables(self)

get_integer_lower_bounds(self)

get_integer_upper_bounds(self)

get_integer_variables(self)

get_value(self, ScenarioIndex scenario_index)

load(model, data)

Load the parameter using the pywrdrb.Model dictionary.

register(cls)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup()

Perform setup operations for the parameter.

unregister(cls)

value(timestep, scenario_index)

Return the current flow across scenarios for the specified timestep and scenario index.

Attributes

children

comment

str

double_size

'int'

integer_size

'int'

is_constant

is_variable

'bool'

model

name

parents

size

tags

dict