windkit.spatial.interp_unstructured_like
- windkit.spatial.interp_unstructured_like(source, target, exclude_dims=None, **kwargs)[source]
Interpolate spatially from unstructured dataset/dataarray to another spatial dataset/dataarray
- Parameters:
source (xarray.Dataset or xarray.DataArray) – Source dataset/dataarray with spatial coordinates. Can be a cuboid, stacked_point or point. Must have the same crs as target.
target (xarray.Dataset or xarray.DataArray) – Target dataset/dataarray with spatial coordinates. Can be a cuboid, stacked_point or point. Must have the same crs as source.
exclude_dims (list, optional) – List of dimensions to exclude from interpolation. Default is None
**kwargs (dict) – Keyword arguments passed to scipy.interpolate.griddata
- Returns:
Interpolated dataset/dataarray with spatial coordinates of target
- Return type:
- Raises:
ValueError – If source and target are not xarray.Dataset or xarray.DataArray
ValueError – If source and target do not have the same crs