pywasp.wasp.interpolate_gwc
- pywasp.wasp.interpolate_gwc(gwc, out_locs, method='nearest')[source]
Interpolate gwc object to new grid with optional reprojection
- Parameters:
gwc (
xarray.Dataset
) – PyWAsP Generalized Wind Climate datasetout_locs (
xarray.Dataset
) – Dataset with at least west_east, south_north dimensions and a crs coordinate.method (
str
) – “nearest” for nearest neighbor interpolation“natural” for natural neighbor interpolation
“given” ignores spatial information, validate data has the same spatial size, after both gwc and out_locs have been converted to the point spatial structure. Used most often for cross-predictions, where the gwc and the output have different locations.
None for a dataset with the same spatial layout of the gwc and out_locs
- Returns:
Dataset
– PyWAsP Generalized Wind Climate dataset on new grid