climpred.classes.PerfectModelEnsemble.remove_seasonality

climpred.classes.PerfectModelEnsemble.remove_seasonality#

PerfectModelEnsemble.remove_seasonality(seasonality: str | None = None) PredictionEnsemble#

Remove seasonal cycle from PredictionEnsemble.

Parameters:

seasonality – Seasonality to be removed. Choose from: ["season", "month", "weekofyear", "dayofyear"]. Defaults to OPTIONS["seasonality"].

Examples

>>> HindcastEnsemble
<climpred.HindcastEnsemble>
Initialized:
    SST      (init, lead, member) float64 -0.2392 -0.2203 ... 0.618 0.6136
Uninitialized:
    SST      (time, member) float64 -0.1969 -0.01221 -0.275 ... 0.4179 0.3974
Observations:
    SST      (time) float32 -0.4015 -0.3524 -0.1851 ... 0.2481 0.346 0.4502
>>> # example already effectively without seasonal cycle
>>> HindcastEnsemble.remove_seasonality(seasonality="month")
<climpred.HindcastEnsemble>
Initialized:
    SST      (init, lead, member) float64 -0.2392 -0.2203 ... 0.618 0.6136
Uninitialized:
    SST      (time, member) float64 -0.1969 -0.01221 -0.275 ... 0.4179 0.3974
Observations:
    SST      (time) float32 -0.4015 -0.3524 -0.1851 ... 0.2481 0.346 0.4502