pastas.forecast.forecast ======================== .. py:function:: pastas.forecast.forecast(ml: pastas.typing.Model, forecasts: dict[str, list[pandas.DataFrame | pandas.Series]] | dict[str, dict[str, pandas.DataFrame | pandas.Series]], p: pastas.typing.ArrayLike | None = None, post_process: bool = False) -> pandas.DataFrame Method to forecast the head from ensembles of stress forecasts. :param ml: Pastas Model instance. :type ml: pastas.Model :param forecasts: Dictionary containing the forecasts data. The keys are the stressmodel names and the values are lists or dicts of DataFrames containing the forecasts with a datetime index and each column a time series (i.e., one ensemble member). :type forecasts: dict :param p: List of parameter sets to use for the forecasts. If None, a single parameter set is used that defaults to the optimal model parameters. Default is None. :type p: array_like, optional :param post_process: If True, the forecasts are post-processed using the noise model of the model instance. Default is False. If True, a noise model should be present in the model instance. If no noisemodel is present and post_process is True, an error is raised. :type post_process: bool, optional :returns: **df** -- DataFrame containing the forecasts. The columns are a MultiIndex with the first level the ensemble member, the second level the parameter member, and the third level the mean and the variance of each forecast member. :rtype: pandas.DataFrame .. rubric:: Notes For efficiency, the iteration over the different ensemble members and parameters sets is done in the following order using a double for-loop: 1. iterate over the ensemble members 2. iterate over the parameter sets All computations that only depend on the parameter sets and not on the ensemble members are performed outside this double for-loop. Please note that only the AR1 noise model is supported at this moment for post-processing. .. !! processed by numpydoc !!