Well#

This module contains the well class used in gwrefpy.

class src.gwrefpy.well.Well(name, is_reference, timeseries: Series | None = None)[source]#

Bases: object

Base class for a well in a groundwater model.

Parameters:
  • name (str) – The name of the well.

  • is_reference (bool) – Whether the well is a reference well.

  • timeseries (pd.Series, optional) – A pandas Series containing the time series data for the well. The index should be a pandas DatetimeIndex and the values should be floats. Default is None.

add_timeseries(timeseries: Series)[source]#

Add a timeseries to the well. This will be validated by _validate_timeseries.

Parameters:

timeseries (pd.Series) – A pandas Series containing the time series data to add.

append_timeseries(timeseries: Series, remove_duplicates: bool = False)[source]#

Append a timeseries to the existing timeseries of the well. This will be validated by _validate_timeseries.

Parameters:
  • timeseries (pd.Series) – A pandas Series containing the time series data to append.

  • remove_duplicates (bool, optional) – Whether to remove duplicate timestamps after appending. Default is False which will raise an error if duplicates are found.

property name: str#

The name of the well.

replace_timeseries(timeseries: Series)[source]#

Replace the existing timeseries of the well with a new timeseries. This will be validated by _validate_timeseries.

Parameters:

timeseries (pd.Series) – A pandas Series containing the new time series data.

set_kwargs(**kwargs)[source]#

Set attributes of the WellBase object using keyword arguments.

Parameters:

**kwargs (dict) – The attributes to set. The keys should be the names of the attributes and the values should be the new values.