wxee.time_series.TimeSeries.climatology_mean

TimeSeries.climatology_mean(frequency: str, reducer: Any | None = None, start: int | None = None, end: int | None = None, keep_bandnames: bool = True) Climatology[source]

Calculate a mean climatology image collection with a given frequency.

Parameters:
  • frequency (str) – The name of the time frequency. One of “day”, “month”.

  • reducer (Optional[ee.Reducer]) – The reducer to apply when aggregating over time, e.g. aggregating hourly data to daily for a daily climatology. If the data is already in the temporal scale of the climatology, e.g. creating a daily climatology from daily data, the reducer will have no effect.

  • start (Optional[int]) – The start coordinate in the time frequency to include in the climatology, e.g. 1 for January if the frequency is “month”. If none is provided, the default will be 1 for both “day” and “month”.

  • end (Optional[int]) – The end coordinate in the time frequency to include in the climatology, e.g. 8 for August if the frequency is “month”. If none is provided, the default will be 366 for “day” or 12 for “month”

  • keep_bandnames (bool, default True) – If true, the band names of the input images will be kept in the aggregated images. If false, the name of the reducer will be appended to the band names, e.g. SR_B4 will become SR_B4_mean.

Returns:

The climatological mean collection.

Return type:

wxee.climatology.Climatology

Example

>>> collection = ee.ImageCollection("IDAHO_EPSCOR/GRIDMET")
>>> collection = collection.filterDate("1980", "2000")
>>> ts = wxee.TimeSeries(collection)
>>> daily_max = ts.climatology_mean(frequency="day", reducer=ee.Reducer.max())
>>> daily_max.size().getInfo()
366