nctoolkit.DataSet.vertical_interp

DataSet.vertical_interp(self, levels=None)

Verticaly interpolate a dataset based on given vertical levels This is calculated for each time step and grid cell

Parameters

levels (list, int or str) – list of vertical levels, for example depths for an ocean model, to vertically interpolate to. These must be floats or ints.

Examples

If you wanted to vertically interpolate a dataset to 5 and 10 metres, you would do the following:

>>> ds.vertical_interp([5,10])

This method is most useful for things like oceanic data, where you need to interpolate to certain depth levels. It will require that vertical levels are the same in every grid cell.