wavespectra.core.select.sel_idw#
- wavespectra.core.select.sel_idw(dset, lons, lats, tolerance=2.0, max_sites=4, sitename='site', lonname='lon', latname='lat')[source]#
Select sites from inverse distance weighting.
- Args:
dset (Dataset): Stations SpecDataset to interpolate from. lons (array): Longitude of sites to interpolate spectra at. lats (array): Latitude of sites to interpolate spectra at. tolerance (float): Maximum distance to use site for interpolation. max_sites (int): Maximum number of neighbour sites to use for interpolation. sitename (str): Name of site dimension. lonname (str): Name of longitude coordinate. latname (str): Name of latitude coordinate.
- Returns:
Selected SpecDataset at locations defined by (lons, lats).
- Note:
- Args dset_lons, dset_lats are not required but can improve performance when
dset is chunked with site=1 (expensive to access station coordinates) and improve precision if projected coordinates are provided at high latitudes.