pastas.stressmodels.RechargeModel ================================= .. toctree:: :hidden: /api/pastas/stressmodels/RechargeModel.set_init_parameters /api/pastas/stressmodels/RechargeModel.update_stress /api/pastas/stressmodels/RechargeModel.get_stress /api/pastas/stressmodels/RechargeModel.get_water_balance /api/pastas/stressmodels/RechargeModel.get_parameters /api/pastas/stressmodels/RechargeModel.to_dict .. py:class:: pastas.stressmodels.RechargeModel(prec: pandas.Series, evap: pandas.Series, rfunc: pastas.typing.RFunc | None = None, name: str = 'recharge', recharge: pastas.typing.Recharge | None = None, temp: pandas.Series | None = None, settings: tuple[str | pastas.typing.StressSettingsDict, str | pastas.typing.StressSettingsDict, str | pastas.typing.StressSettingsDict] = ('prec', 'evap', 'evap'), metadata: tuple[dict | None, dict | None, dict | None] = (None, None, None), max_cache_size: int = None) Stressmodel simulating the effect of groundwater recharge on the head. :param prec: pandas.Series with pandas.DatetimeIndex containing the precipitation series. The precipitation series should be provided in mm/day when a nonlinear model is used. :type prec: pandas.Series :param evap: pandas.Series with pandas.DatetimeIndex containing the potential evaporation series. The evaporation series should be provided in mm/day when a nonlinear model is used. :type evap: pandas.Series :param rfunc: Instance of the response function used in the convolution with the stress. Default is ps.Exponential(). :type rfunc: pastas.rfunc instance, optional :param name: Name of the stress. Default is "recharge". :type name: str, optional :param recharge: Instance of a recharge model. Options are: Linear, FlexModel and Berendrecht. These can be accessed through ps.rch. Default is ps.rch.Linear(). :type recharge: pastas.recharge instance, optional :param temp: pandas.Series with pandas.DatetimeIndex containing the temperature series. It depends on the recharge model if this argument is required or not. The temperature series should be provided in degrees Celsius. :type temp: pandas.Series, optional :param settings: The settings of the precipitation, evaporation and optionally temperature time series, in this order. By default ("prec", "evap", "evap"). This can be a string referring to a predefined settings dict (defined in ps.rcParams["timeseries"]), or a dict with the settings to apply. For more information refer to Time Series Settings section below for more information. :type settings: list of dicts or str, optional :param metadata: dictionary containing metadata about the stress. This is passed onto the TimeSeries object. :type metadata: tuple of dicts or list of dicts, optional :param max_cache_size: Maximum size of the cache (in number of entries). Only used when cachetools is installed and caching is enabled (see ps.set_use_cache()). :type max_cache_size: int, optional .. rubric:: Examples >>> sm = ps.RechargeModel(rain, evap, rfunc=ps.Exponential(), >>> recharge=ps.rch.FlexModel(), name="rch") >>> ml.add_stressmodel(sm) :param Time series settings: :param fill_nan: 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 :type fill_nan: {"drop", "mean", "interpolate"} or float :param fill_before: 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 :type fill_before: {"mean", "bfill"} or float :param fill_after: 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 :type fill_after: {"mean", "ffill"} or float :param sample_up: 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). :type sample_up: {"mean", "interpolate", "divide"} or float :param sample_down: 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 :type sample_down: {"mean", "drop", "sum", "min", "max"} .. rubric:: Notes This stress model computes the contribution of precipitation and potential evaporation in two steps. In the first step a recharge flux is computed by a model determined by the input argument `recharge`. In the second step this recharge flux is convolved with a response function to obtain the contribution of recharge to the groundwater levels. If a nonlinear recharge model is used, the precipitation should be in mm/d. .. warning:: We recommend not to store a RechargeModel is a variable named `rm`. This name is already reserved in IPython to remove files and will cause problems later. :raises A warning if the the maximum annual precipitation is smaller than 12 and a: :raises nonlinear recharge model is applied. This is likely an indication that the units of: :raises the precipitation series are in m/d instead of mm/d. Please check the units of the: :raises precipitation series.: .. seealso:: :py:obj:`pastas.rfunc`, :py:obj:`pastas.timeseries.TimeSeries`, :py:obj:`pastas.recharge` .. !! processed by numpydoc !! Methods ------- .. autoapisummary:: pastas.stressmodels.RechargeModel.set_init_parameters pastas.stressmodels.RechargeModel.update_stress pastas.stressmodels.RechargeModel.get_stress pastas.stressmodels.RechargeModel.get_water_balance pastas.stressmodels.RechargeModel.get_parameters pastas.stressmodels.RechargeModel.to_dict