nctoolkit.DataSet.regrid

DataSet.regrid(self, grid=None, method='bil', recycle=False, \*\*kwargs)

Regrid a dataset to a target grid

Parameters
  • grid (nctoolkit.DataSet, pandas data frame or netCDF file) – The grid to remap to

  • method (str) – Remapping method. Defaults to “bil”. Methods available are: bilinear - “bil”; nearest neighbour - “nn” - “nearest neighbour” bicubic interpolation - “bic” Distance-weighted average - “dis” First order conservative remapping - “con” Second order conservative remapping - “con2” Large area fraction remapping - “laf”

  • recycle (bool) – Set to True if you want to re-use the remapping weights when you are regridding another dataset.

  • kwargs (optional method to generate grid) – Instead of supplying a grid using ‘grid’, you can supply lon and lat. These must be equally lengthed lists or arrays that will be used to generate the grid. If you want to regrid to a single location you can just supply a float to lon and lat.