pyart.map.map_to_grid

pyart.map.map_to_grid(radars, grid_shape=(81, 81, 69), grid_limits=((-30000.0, 20000), (-20000.0, 20000.0), (0, 17000.0)), grid_origin=None, fields=None, refl_filter_flag=True, refl_field=None, max_refl=None, qrf_func=None, map_roi=True, weighting_function='Barnes', toa=17000.0, h_factor=1.0, nb=1.5, bsp=1.0, min_radius=500.0, copy_field_data=True, algorithm='kd_tree', leafsize=10)[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 (x, y, z).

grid_limits : 3-tuple of 2-tuples

Minimum and maximum grid location (inclusive) in meters for the x, y, z 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.

qrf_func : function or None

Query radius of influence function. A functions which takes an x, y, z 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. None will use a function which takes into account the h_factor, nb and bsp parameters and increases the radius quadratically with elevation.

map_roi : bool

True to include a radius of influence field in the returned dictionary under the ‘ROI’ key. This is the value of qrf_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:
 

h_factor : float

H factor which influences the increase in the radius of influence as elevation increases. Only used when qrf_func is None.

nb : float

Virtual beam width. Only used when qrf_func is None.

bsp : float

Virtual beam spacing. Only used when qrf_func is None.

min_radius : float

Minimum radius of influence. Only used when qrf_func is None.

copy_field_data : bool

True to copy the data within the radar fields for faster gridding, False will not copy the data which will use less memory but result in significantly fast gridding times.

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.

Previous topic

pyart.map.grid_from_radars

Next topic

Testing Utilities (pyart.testing)

This Page