salem.DataArrayAccessor.lookup_transform¶
-
DataArrayAccessor.
lookup_transform
(other, grid=None, method=<function mean>, lut=None, return_lut=False)¶ Reprojects an other Dataset or DataArray onto self using the forward tranform lookup.
See :
Grid.lookup_transform()
Parameters: other: Dataset, DataArray or ndarray
the data to project onto self
grid: salem.Grid
in case the input dataset does not carry georef info
method : function, default: np.mean
the aggregation method. Possibilities: np.std, np.median, np.sum, and more. Use
len
to count the number of grid points!lut : ndarray, optional
computing the lookup table can be expensive. If you have several operations to do with the same grid, set
lut
to an existing table obtained from a previous call toGrid.grid_lookup()
return_lut : bool, optional
set to True if you want to return the lookup table for later use. in this case, returns a tuple
Returns: a dataset or a dataarray
If
return_lut==True
, also return the lookup table