geodat.monthly

geodat.monthly.anomaly(data, months, axis=0, clim=None)[source]

Use climatology function to compute the climatology, and then compute the anomaly Anomalies and the climatology are returned. If clim is given, the input climatology is used.

See climatology()

geodat.monthly.clim2long(clim, axis, months)[source]

Extend the climatology to match the targeted time axis Input: climatology : numpy.ndarray axis : integer of where the time axis is months : integer of months

geodat.monthly.climatology(data, months, axis=0)[source]

Compute climatology If months is given, it is used directly as the time axis. Otherwise the months are computed using matplotlib.dates assuming the units of the time axis is in DAYS.

data - numpy array months - 1-d numpy array of length = length of time axis axis - specify the location of the time axis, default = 0

geodat.monthly.get_sliceobj(data, months, month, axis)[source]

Get the slice that would extract the data in a particular month

Input: data - numpy.array months - numpy.array for the months on the time axis month - float, the desire month axis - integer, the dimension where the time axis is

geodat.monthly.monthly(data, months, axis, func)[source]

Apply func to each month. If months is given, it is used directly as the time axis. Otherwise the months are computed using matplotlib.dates assuming the units of the time axis is in DAYS.

data - numpy array months - 1-d numpy array of length = length of time axis axis - specify the location of the time axis func - function applied to each month

the function is given the argument “axis” if func is a list, each element is applied to a different month func[0] is the function applied to January, func[1] is the function applied to February...
Fork me on GitHub