nctoolkit.DataSet.time_interp
- DataSet.time_interp(start=None, end=None, resolution='monthly')
time_interp: Temporally interpolate variables based on date range and time resolution
- Parameters:
start (str) – Start date for interpolation. Needs to be of the form YYYY/MM/DD or YYYY-MM-DD.
end (str) – End date for interpolation. Needs to be of the form YYYY/MM/DD or YYYY-MM-DD. If end is not given interpolation will be to the final available time in the dataset.
resolution (str) – Time steps used for interpolation. Needs to be “daily”, “weekly”, “monthly” or “yearly”. Defaults to monthly.
Examples
Interpolate from 01/01/2000 to 01/01/2001 to monthly data:
>>> ds.time_interp(start="2000/01/01", end="2001/01/01", resolution="monthly")
Interpolate from 01/01/2000 to 01/01/2001 to daily data:
>>> ds.time_interp(start="2000/01/01", end="2001/01/01", resolution="daily")
Interpolate from 01/01/2000 to 01/01/2001 to weekly data:
>>> ds.time_interp(start="2000/01/01", end="2001/01/01", resolution="weekly")