cartopy.img_transform.regrid¶
- cartopy.img_transform.regrid(array, source_x_coords, source_y_coords, source_cs, target_proj, target_x_points, target_y_points, mask_extrapolated=False)[source]¶
Regrid the data array from the source projection to the target projection.
- Parameters
array – The
numpy.ndarray
of data to be regridded to the target projection.source_x_coords – A 2-dimensional source projection
numpy.ndarray
of x-direction sample points.source_y_coords – A 2-dimensional source projection
numpy.ndarray
of y-direction sample points.source_cs – The source
Projection
instance.target_cs – The target
Projection
instance.target_x_points – A 2-dimensional target projection
numpy.ndarray
of x-direction sample points.target_y_points – A 2-dimensional target projection
numpy.ndarray
of y-direction sample points.mask_extrapolated (optional) – Assume that the source coordinate is rectilinear and so mask the resulting target grid values which lie outside the source grid domain. Defaults to False.
- Returns
new_array – The data array regridded in the target projection.