ESMValGroup / ESMValCore

ESMValCore: A community tool for pre-processing data from Earth system models in CMIP and running analysis scripts.
https://www.esmvaltool.org
Apache License 2.0
43 stars 38 forks source link

Preprocessor `extract_season` does not return complete seasons #2591

Open k-a-webb opened 3 days ago

k-a-webb commented 3 days ago

When the dataset time vector starts or ends mid-season, extract_season will return incomplete seasons for the first and/or last years. For example, if a data set spans 2000-01-01 to 2010-12-31, the season DJF will have just JF in 2000 and just D in 2010.

In the related pull request, I propose to add an additional argument to extract_season, full (default False), which will drop incomplete seasons.

valeriupredoi commented 2 days ago

technically correct though :rofl: I suspect there's some string slicing going on in there, it'd be great if you could have a closer look, and many thanks :beer:

valeriupredoi commented 2 days ago

@schlunma is there even such a thing as an "incomplete season" in the modelling nomenclature ie as Kristi mentions, is JF a valid season? (I thought not, but am a mere engineer)