pywgrib2_xr.grid2earth_points

pywgrib2_xr.grid2earth_points(grid, xpts, ypts)[source]

Computes Earth coordinates of selected grid points.

Parameters
  • grid (Grid) – Grid geometry instance.

  • xpts (array_like) – Grid X point coordinates.

  • ypts (array_like) – Grid Y point coordinates.

Returns

Calculated coordinates: a dictionary with keys {‘crot’, ‘srot’, ‘area’, ‘lat’, ‘lon’} where:

  • crot, srot : Cosine and sines of clockwise vector rotation.

  • area : Area weights in m^2. Proportional to the square of the map factor in the case of conformal projections.

  • lat, lon : Latitudes and longitudes.

Return type

dict