pastas.stressmodels.WellModel#
- class pastas.stressmodels.WellModel(stress: collections.abc.Iterable[pandas.Series], rfunc: pastas.rfunc.HantushWellModel | None = None, name: str = 'well', up: bool = False, distances: pastas.typing.ArrayLike | None = None, settings: str | pastas.typing.StressSettingsDict | collections.abc.Iterable[str] | collections.abc.Iterable[pastas.typing.StressSettingsDict] = 'well', sort_wells: bool = True, metadata: collections.abc.Iterable[dict[str, Any]] | None = None, max_cache_size: int | None = None)#
Convolution of one or more stresses with a single scaled response function.
- Parameters:
stress (list) – list containing the stresses time series
rfunc (pastas.rfunc instance, optional) – this model only works with the HantushWellModel response function, default is None which will initialize a HantushWellModel response function.
name (str) – Name of the stressmodel. Default is “well”.
up (bool, optional) – whether a positive stress has an increasing or decreasing effect on the model, by default False, in which case positive stress lowers e.g., the groundwater level.
distances (array_like) – array_like of distances between the stresses (wells) and the oseries (monitoring well), must be in the same order as the stresses. This distance is used to scale the HantushWellModel response function for each stress.
settings (Time series) – The settings of the stress. By default this is “well”. This can be a string referring to a predefined settings dictionary (defined in ps.rcParams[“timeseries”]), or a dictionary with the settings to apply. For more information, refer to Time series settings section below.
sort_wells (bool, optional) – sort wells from closest to furthest, by default True.
max_cache_size (int, optional) – Maximum size of the cache (in number of entries). Only used when cachetools is installed and caching is enabled (see ps.set_use_cache()).
settings
fill_nan ({"drop", "mean", "interpolate"} or float) –
- Method for filling NaNs.
drop: drop NaNs from time series
mean: fill NaNs with mean value of time series
interpolate: fill NaNs by interpolating between finite values
float: fill NaN with provided value, e.g. 0.0
fill_before ({"mean", "bfill"} or float) –
- Method for extending time series into past.
mean: extend time series into past with mean value of time series
bfill: extend time series into past by back-filling first value
float: extend time series into past with provided value, e.g. 0.0
fill_after ({"mean", "ffill"} or float) –
- Method for extending time series into future.
mean: extend time series into future with mean value of time series
ffill: extend time series into future by forward-filling last value
float: extend time series into future with provided value, e.g. 0.0
sample_up ({"mean", "interpolate", "divide"} or float) –
Method for up-sampling time series (increasing frequency, e.g. going from weekly to daily values).
bfill or backfill: fill up-sampled time steps by back-filling current values
ffill or pad: fill up-sampled time steps by forward-filling current values
mean: fill up-sampled time steps with mean of timeseries
interpolate: fill up-sampled time steps by interpolating between current values
divide: fill up-sampled steps with current value divided by length of current time steps (i.e. spread value over new time steps).
sample_down ({"mean", "drop", "sum", "min", "max"}) –
Method for down-sampling time series (decreasing frequency, e.g. going from daily to weekly values).
mean: resample time series by taking the mean
drop: resample the time series by taking the mean, dropping any NaN-values
sum: resample time series by summing values
max: resample time series with maximum value
min: resample time series with minimum value
Notes
This class implements convolution of multiple series with the same response function. This can be applied when dealing with multiple wells in a time series model. The distance(s) from the pumping well(s) to the monitoring well have to be provided for each stress. See Brakenhoff et al. [2022] for more details on the methods for this model.
Only works with the HantushWellModel response function.
- property stress: tuple[pastas.timeseries.TimeSeries, Ellipsis]#
Return the stress time series.
- property stresses: tuple[pastas.timeseries.TimeSeries, Ellipsis]#
Return the stress time series as a tuple.
Methods#
|
Set the stress time series. |
|
Set the initial parameters (back) to their default values. |
|
Simulate the stress model contribution. |
|
Get the stress(es) of the time series object(s). |
|
Get distances for the stress(es). |
|
Get parameters of the wellmodel. |
|
Calculate variance of the gain for WellModel. |
|
Dump all stresses in the stresses list. |
|
Export the stress model to a dictionary. |