pyart.map.grid_mapper.map_to_grid

pyart.map.grid_mapper.map_to_grid(radars, grid_shape, grid_limits, grid_origin=None, fields=None, refl_filter_flag=True, refl_field=None, max_refl=None, map_roi=True, weighting_function='Barnes', toa=17000.0, copy_field_data=True, algorithm='kd_tree', leafsize=10.0, roi_func='dist_beam', constant_roi=500.0, z_factor=0.05, xy_factor=0.02, min_radius=500.0, h_factor=1.0, nb=1.5, bsp=1.0)[source]

Map one or more radars to a Cartesian grid.

Generate a Cartesian grid of points for the requested fields from the collected points from one or more radars. The field value for a grid point is found by interpolating from the collected points within a given radius of influence and weighting these nearby points according to their distance from the grid points. Collected points are filtered according to a number of criteria so that undesired points are not included in the interpolation.

Parameters:

radars : tuple of Radar objects.

Radar objects which will be mapped to the Cartesian grid.

grid_shape : 3-tuple of floats

Number of points in the grid (z, y, x).

grid_limits : 3-tuple of 2-tuples

Minimum and maximum grid location (inclusive) in meters for the z, y, x coordinates.

grid_origin : (float, float) or None

Latitude and longitude of grid origin. None sets the origin to the location of the first radar.

fields : list or None

List of fields within the radar objects which will be mapped to the cartesian grid. None, the default, will map the fields which are present in all the radar objects.

refl_filter_flag : bool

True to filter the collected points based on the reflectivity field. False to perform no filtering. Gates where the reflectivity field, specified by the refl_field parameter, is not-finited, masked or has a value above the max_refl parameter are excluded from the grid interpolation.

refl_field : str

Name of the field which will be used to filter the collected points. A value of None will use the default field name as defined in the Py-ART configuration file.

max_refl : float

Maximum allowable reflectivity. Points in the refl_field which are above is value are not included in the interpolation. None will include skip this filtering.

roi_func : str or function

Radius of influence function. A functions which takes an z, y, x grid location, in meters, and returns a radius (in meters) within which all collected points will be included in the weighting for that grid points. Examples can be found in the example_roi_func_constant, example_roi_func_dist, and example_roi_func_dist_beam. Alternatively the following strings can use to specify a built in radius of influence function:

  • constant: constant radius of influence.
  • dist: radius grows with the distance from each radar.
  • dist_beam: radius grows with the distance from each radar and parameter are based of virtual beam sizes.

The parameters which control these functions are listed in the Other Parameters section below.

map_roi : bool

True to include a radius of influence field in the returned dictionary under the ‘ROI’ key. This is the value of roi_func at all grid points.

weighting_function : ‘Barnes’ or ‘Cressman’

Functions used to weight nearby collected points when interpolating a grid point.

toa : float

Top of atmosphere in meters. Collected points above this height are not included in the interpolation.

Returns:

grids : dict

Dictionary of mapped fields. The keysof the dictionary are given by parameter fields. Each elements is a grid_size float64 array containing the interpolated grid for that field.

Other Parameters:
 

constant_roi : float

Radius of influence parameter for the built in ‘constant’ function. This parameter is the constant radius in meter for all grid points. This parameter is only used when roi_func is constant.

z_factor, xy_factor, min_radius : float

Radius of influence parameters for the built in ‘dist’ function. The parameter correspond to the radius size increase, in meters, per meter increase in the z-dimension from the nearest radar, the same foreach meteter in the xy-distance from the nearest radar, and the minimum radius of influence in meters. These parameters are only used when roi_func is ‘dist’.

h_factor, nb, bsp, min_radius : float

Radius of influence parameters for the built in ‘dist_beam’ function. The parameter correspond to the height scaling, virtual beam width, virtual beam spacing, and minimum radius of influence. These parameters are only used when roi_func is ‘dist_mean’.

copy_field_data : bool

True to copy the data within the radar fields for faster gridding, the dtype for all fields in the grid will be float64. False will not copy the data which preserves the dtype of the fields in the grid, may use less memory but results in significantly slower gridding times. When False gates which are masked in a particular field but are not masked in the refl_field field will still be included in the interpolation. This can be prevented by setting this parameter to True or by gridding each field individually setting the refl_field parameter and the fields parameter to the field in question. It is recommended to set this parameter to True.

algorithm : ‘kd_tree’ or ‘ball_tree’

Algorithms to use for finding the nearest neighbors. ‘kd_tree’ tends to be faster. This value should only effects the speed of the gridding, not the results.

leafsize : int

Leaf size passed to the neighbor lookup tree. This can affect the speed of the construction and query, as well as the memory required to store the tree. The optimal value depends on the nature of the problem. This value should only effect the speed of the gridding, not the results.

See also

grid_from_radars
Map to grid and return a Grid object.
Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.