wavespectra.core.select.sel_bbox#
- wavespectra.core.select.sel_bbox(dset, lons, lats, tolerance=0.0, dset_lons=None, dset_lats=None)[source]#
Select sites within bbox.
- Args:
dset (Dataset): Stations SpecDataset to select from. lons (array): Longitude of sites to interpolate spectra at. lats (array): Latitude of sites to interpolate spectra at. tolerance (float): Extend bbox extents by. dset_lons (array): Longitude of stations in dset. dset_lats (array): Latitude of stations in dset.
- Returns:
- Selected SpecDataset within bbox defined by:
lower-left=[min(lons), min(lats)], upper-right=[max(lons), max(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.