salem.Grid.map_gridded_data
- Grid.map_gridded_data(data, grid=None, interp='nearest', ks=3, out=None)[source]
Reprojects any structured data onto the local grid.
The z and time dimensions of the data (if provided) are conserved, but the projected data will have the x, y dimensions of the local grid.
Currently, nearest neighbor, linear, and spline interpolation are available. The dtype of the input data is guaranteed to be conserved, except for int which will be converted to floats if non nearest neighbor interpolation is asked.
- Parameters:
- datandarray
an ndarray of dimensions 2, 3, or 4, the two last ones being y, x.
- gridGrid
a Grid instance matching the data
- interpstr
‘nearest’ (default), ‘linear’, or ‘spline’
- ksint
Degree of the bivariate spline. Default is 3.
- missingint
integer value to attribute to invalid data (for integer data only, floats invalids are forced to NaNs)
- outndarray
output array to fill instead of creating a new one (useful for overwriting stuffs)
- Returns:
- A projected ndarray of the data, in
self
coordinates.
- A projected ndarray of the data, in