Reservoirs
The reservoirs plugin contains reservoir models to model time series. These models act like Pastas StressModels, but do not use response functions or convolution.
Currently the following reservoir models are available:
Reservoir1: A single reservoir, equivalent to the Exponential response function in Pastas.Reservoir2: A single reservoir with two outflow levels.
These can be used in Pastas models with this StressModel:
ReservoirModel: A stressmodel that uses a reservoir model to simulate time series.
Example
See the Examples section for more information on how to use the reservoirs plugin.
API
This module contains the classes for reservoir models.
See also
pastas.stressmodels.ReservoirModelThe reservoir models are provided to a ReservoirModel
Examples
To be added
- class Reservoir1(initialhead)[source]
Single reservoir.
Notes
Should be the same as the exponential function
References
None
- _name = 'Reservoir1'
- get_init_parameters(name='reservoir')[source]
Method to obtain the initial parameters.
- Parameters:
name (str, optional) – String with the name that is used as prefix for the parameters.
- Returns:
parameters – Pandas DataFrame with the parameters.
- Return type:
pandas.DataFrame
- static simulatehead(prec, evap, p)[source]
Simulate the head in the reservoir
- Parameters:
prec (array_like) – array with the precipitation and potential evaporation values. These arrays must be of the same length and at the same time steps.
evap (array_like) – array with the precipitation and potential evaporation values. These arrays must be of the same length and at the same time steps.
p (array_like) – array_like object with the values as floats representing the model parameters.
- Returns:
head in reservoir – array with the head in the reservoir
- Return type:
array_like
- class Reservoir2(initialhead)[source]
Single reservoir with outflow at two heights
Notes
None
References
None
- _name = 'Reservoir2'
- get_init_parameters(name='reservoir')[source]
Method to obtain the initial parameters.
- Parameters:
name (str, optional) – String with the name that is used as prefix for the parameters.
- Returns:
parameters – Pandas DataFrame with the parameters.
- Return type:
pandas.DataFrame
- static simulatehead(prec, evap, p)[source]
Simulate the head in the reservoir
- Parameters:
prec (array_like) – array with the precipitation and potential evaporation values. These arrays must be of the same length and at the same time steps.
evap (array_like) – array with the precipitation and potential evaporation values. These arrays must be of the same length and at the same time steps.
p (array_like) – array_like object with the values as floats representing the model parameters.
- Returns:
head in reservoir – array with the head in the reservoir
- Return type:
array_like
- class ReservoirBase[source]
Base class for reservoir classes.
- class ReservoirModel(stress, reservoir, name, meanhead, settings=('prec', 'evap'), metadata=(None, None), meanstress=None)[source]
Time series model consisting of a single reservoir with two stresses.
The first stress causes the head to go up and the second stress causes the head to go down.
- Parameters:
stress (list of pandas.Series or list of pastas.timeseries) – list of two pandas.Series or pastas.timeseries objects containing the stresses. Usually the first is the precipitation and the second the evaporation.
name (str) – Name of the stress
settings (list of dicts or strs, optional) – The settings of the stresses. This can be a string referring to a predefined settings dict, or a dict with the settings to apply. Refer to the docstring of pastas.Timeseries for further information. Default is (“prec”, “evap”).
metadata (list of dicts, optional) – dictionary containing metadata about the stress. This is passed onto the TimeSeries object.
Notes
The order in which the stresses are provided is the order the metadata and settings dictionaries or string are passed onto the TimeSeries objects. By default, the precipitation stress is the first and the evaporation stress the second stress.
See also
pastas.timeseries- _get_block(p, dt, tmin, tmax)[source]
Internal method to get the block-response function. Cannot be used (yet?) since there is no block response
- _name = 'ReservoirModel'
- get_stress(p=None, tmin=None, tmax=None, freq=None, istress=0, **kwargs)[source]
Returns the stress(es) of the time series object as a pandas DataFrame.
If the time series object has multiple stresses each column represents a stress.
- Returns:
stress – Pandas dataframe of the stress(es)
- Return type:
pandas.Dataframe
- simulate(p, tmin=None, tmax=None, freq=None, dt=1, istress=None)[source]
Simulates the head contribution.
- Parameters:
p (array_like) – array_like object with the values as floats representing the model parameters.
tmin (str, optional)
tmax (str, optional)
freq (str, optional)
dt (float, time step)
istress (int, not used)
- Returns:
The simulated head contribution.
- Return type:
pandas.Series