pyinterp.core.reduced_gaussian.interpolate

Contents

pyinterp.core.reduced_gaussian.interpolate#

pyinterp.core.reduced_gaussian.interpolate(source: object, lon: numpy.ndarray[dtype=float64, shape=(*), writable=False], lat: numpy.ndarray[dtype=float64, shape=(*), writable=False], time: numpy.ndarray[dtype=int64, shape=(*), writable=False] | None = None, fields: collections.abc.Sequence[str] | None = None, config: pyinterp.core.config.reduced_gaussian.ReducedGaussian) → dict#

Interpolate the fields of a reduced Gaussian grid or series at points.

Parameters:
  • source – A Grid, or a Series of grids in time.

  • lon – Longitudes of the points, in degrees.

  • lat – Latitudes of the points, in degrees.

  • time – Dates of the points, as int64 in the unit of the series; required for a Series, refused for a Grid.

  • fields – Names of the fields to interpolate; all by default.

  • config – Configuration of the interpolation.

Returns:

shape (n,) for a field given as (points,), (n, levels) for a field given as (points, levels).

Return type:

A dict from field name to its values

Raises:

IndexError – If a point is outside the mesh, has a date outside the series, or reads a corner a zone does not hold, and config.bounds_error is set.