pywgrib2_xr.Grid

class pywgrib2_xr.Grid(gdtmpl)[source]

2-dimensional rectangular grid.

This is a base class, concrete subclasses are:

  • GridLatLon (0): Latitude/Longitude.

  • GridRotLatLon (1): Rotated Latitude/Longitude.

  • GridMercator (10): Mercator.

  • GridPolarStereo (20): Polar Stereographic Projection (can be North or South).

  • GridLambertConformal (30): Lambert Conformal, can be Secant, Tangent, Conical, or Bipolar

  • GridGaussian (40): Gaussian Latitude/Longitude.

  • GridSpaceView (90): Space View.

These classes should not be instantiated directly, use factory methods grid_fromgdt(), grid_fromstring() and grid_fromdict().

__init__(gdtmpl)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(gdtmpl)

Initialize self.

decode_globe()

decode_params()

encode_globe(code, **kwargs)

encode_params(winds, **params)

fromdict([winds, globe])

Creates Grid Definition class from keywords.

fromstring(strings[, winds, globe])

Creates Grid Definition class from wgrib2 style strings.

set_coords(longitude, latitude)

set_winds(winds)

Sets vector orientation.

strings2params(strings)

to_wesn(longitude, latitude)

Attributes

attrs

cfname

Class name

coords

crs

Parameters for cartopy coordinate reference system.

dims

Grid dimension names.

gdtnum

Grid definition template number

globe

Parameters for cartopy globe

params

GRIB parameters as dictionary

shape

Grid shape.