nctoolkit.DataSet.trange¶
-
DataSet.
trange
(self, over='time')¶ Calculate the temporal range of all variables
- Parameters
over (str or list) – Time periods to average over. Options are ‘year’, ‘month’, ‘day’.
Examples
If you want to calculate range over all time steps. Do the following:
>>> data.trange()
If you want to calculate the range for each year in a dataset, do this:
>>> data.trange("year")
If you want to calculate the range for each month in a dataset, do this:
>>> data.trange("month")
If you want to calculate the range for each month in each year in a dataset, do this:
>>> data.trange(["year", "month"])
This method will also let you easily calculate climatologies. So, if you wanted to calculate a monthly climatological range, you would do this:
>>> data.trange( "month")
A daily climatological range would be the following:
>>> data.trange( "day")