environmentaltools.common.pre_ensemble_plot
- environmentaltools.common.pre_ensemble_plot(models: list, param: dict, variable: str, file_name: str = None)[source]
Compute ensemble statistics for multiple probability models across percentiles.
Evaluates multiple probability models at various percentile levels, computes their mean and standard deviation across a normalized time grid, and prepares data for ensemble visualization.
- Parameters:
models (list) – List of model names to evaluate.
param (dict) – Dictionary containing parameters for each model, including: - ‘fun’: Probability distribution functions for each variable - Model-specific parameters for statistical fitting
variable (str) – Variable name to analyze (e.g., ‘Hs’, ‘Tp’, or direction variables).
file_name (str, optional) – Filename for saving results. Defaults to None.
- Returns:
- Dictionary where keys are percentile strings (e.g., ‘0.05’, ‘0.5’, ‘0.95’)
and values are DataFrames containing: - ‘n’: Normalized time coordinate [0, 1] - ‘prob’: Probability value for this percentile - One column per model with computed values - ‘mean’: Mean across all models - ‘std’: Standard deviation across all models
- Return type:
dict