geodat.nc.pyferret_regrid

geodat.nc.pyferret_regrid(var, ref_var=None, axis='XY', nlon=None, nlat=None, verbose=False, prerun=None, transform='@lin')[source]

Use pyferret to perform regridding.

Parameters:
  • var (geodat.nc.Variable) – input data
  • ref_var (geodat.nc.Variable) – provide the target grid
  • axis (str) – which axis needs regridding
  • nlon (int) – if ref_var is not provided, a cartesian latitude-longitude global grid is created as the target grid. nlon is the number of longitudes
  • nlat (int) – number of latitude, used with nlon and when ref_axis is None
  • verbose (bool) – default False
  • prerun (str) – Ferret command to be run before the regridding
  • transform (str) – Mode of regridding. “@lin” means linear interpolation “@ave” means preserving area mean. See Ferret doc

Either ref_var or (nlon and nlat) has to be specified

Returns:geodat.nc.Variable
Fork me on GitHub