class pyart.core.Grid(time, fields, metadata, origin_latitude, origin_longitude, origin_altitude, x, y, z, projection=None, radar_latitude=None, radar_longitude=None, radar_altitude=None, radar_time=None, radar_name=None)[source]#

A class for storing rectilinear gridded radar data in Cartesian coordinate.

Refer to the attribute section for information on the parameters.

To create a Grid object using legacy parameters present in Py-ART version 1.5 and before, use from_legacy_parameters(), grid = Grid.from_legacy_parameters(fields, axes, metadata).

  • time (dict) – Time of the grid.

  • fields (dict of dicts) – Moments from radars or other variables.

  • metadata (dict) – Metadata describing the grid.

  • origin_altitude (origin_longitude, origin_latitude,) – Geographic coordinate of the origin of the grid.

  • z (x, y,) – Distance from the grid origin for each Cartesian coordinate axis in a one dimensional array. Defines the spacing along the three grid axes which is repeated throughout the grid, making a rectilinear grid.

  • nz (nx, ny,) – Number of grid points along the given Cartesian dimension.

  • projection (dic or str) – Projection parameters defining the map projection used to transform from Cartesian to geographic coordinates. None will use the default dictionary with the ‘proj’ key set to ‘pyart_aeqd’ indicating that the native Py-ART azimuthal equidistant projection is used. Other values should specify a valid pyproj.Proj projparams dictionary or string. The special key ‘_include_lon_0_lat_0’ is removed when interpreting this dictionary. If this key is present and set to True, which is required when proj=’pyart_aeqd’, then the radar longitude and latitude will be added to the dictionary as ‘lon_0’ and ‘lat_0’. Use the get_projparams() method to retrieve a copy of this attribute dictionary with this special key evaluated.

  • radar_altitude (radar_longitude, radar_latitude,) – Geographic location of the radars which make up the grid.

  • radar_time (dict or None, optional) – Start of collection for the radar which make up the grid.

  • radar_name (dict or None, optional) – Names of the radars which make up the grid.

  • nradar (int) – Number of radars whose data was used to make the grid.

  • projection_proj (Proj) – pyproj.Proj instance for the projection specified by the projection attribute. If the ‘pyart_aeqd’ projection is specified accessing this attribute will raise a ValueError.

  • point_z (point_x, point_y,) – The Cartesian locations of all grid points from the origin in the three Cartesian coordinates. The three dimensional data arrays contained these attributes are calculated from the x, y, and z attributes. If these attributes are changed use :py:func: init_point_x_y_z to reset the attributes.

  • point_latitude (point_longitude,) – Geographic location of each grid point. The projection parameter(s) defined in the projection attribute are used to perform an inverse map projection from the Cartesian grid point locations relative to the grid origin. If these attributes are changed use init_point_longitude_latitude() to reset the attributes.

  • point_altitude (LazyLoadDict) – The altitude of each grid point as calculated from the altitude of the grid origin and the Cartesian z location of each grid point. If this attribute is changed use init_point_altitude() to reset the attribute.

Initalize object.

add_field(field_name, field_dict[, ...])

Add a field to the object.

get_point_longitude_latitude([level, edges])

Return arrays of longitude and latitude for a given grid height level.


Return a projparam dict or str from the projection attribute.


Initialize the point_altitude attribute.


Initialize or reset the point_{longitude, latitudes} attributes.


Initialize or reset the point_{x, y, z} attributes.


Convert the Grid object to an xarray format.

write(filename[, format, ...])

Write the the Grid object to a NetCDF file.