mod_interp module#

class mod_interp.TimeSeries(ds)#

Bases: object

Manage a time series composed of a grid stack.

load_dataset(varname, start, end)#

Load the time series into memory for the defined period.

Parameters:
  • varname (str) – Name of the variable to be loaded into memory.

  • start (datetime.datetime) – Date of the first map to be loaded.

  • end (datetime.datetime) – Date of the last map to be loaded.

Returns:

The interpolator handling the interpolation of the grid series.

Return type:

pyinterp.backends.xarray.Grid3D

Examples

>>> interpolator = instance.load_dataset('temperature', datetime.datetime(2020, 1, 1), datetime.datetime(2020, 12, 31))
mod_interp.interpolate(df, time_series, start, end)#

Interpolate the time series over the defined period.

mod_interp.interpolate_current(df, time_series, start, end)#

Interpolate the time series over the defined period.

mod_interp.periods(df, time_series, var_name='sla_unfiltered', frequency='W')#

Return the list of periods covering the time series loaded in memory.

mod_interp.reformat_drifter_dataset(ds)#
mod_interp.run_interpolation(ds_maps, ds_alongtrack, frequency='M')#
mod_interp.run_interpolation_drifters(ds_maps, ds_drifter, time_min, time_max, frequency='M')#