oceanspy.subsample.survey_stations(od, Ysurv, Xsurv, delta=None, xesmf_regridder_kwargs={'method': 'bilinear'}, **kwargs)[source]

Extract survey stations. Trajectories are great circle paths if coordinates are spherical.

od: OceanDataset

od that will be subsampled.

Ysurv: 1D array_like

Y coordinates of stations.

Xsurv: 1D array_like,

X coordinates of stations.

delta: scalar, None

Distance between stations. Units are km for spherical coordinate, same units of coordinates for cartesian. If None, only (Ysurv, Xsurv) stations are returned.

xesmf_regridder_kwargs: dict

Keyword arguments for xesmf.regridder, such as method. Defaul method: bilinear.


Keyword arguments for oceanspy.subsample.cutout().

od: OceanDataset

Subsampled oceandataset.


By default, kwargs[‘add_Hbdr’] = True. Try to play with add_Hbdr values if zeros/nans are returned. This function interpolates using xesmf.regridder, and does not support lazy computation.

xesmf.regridder currently dosen’t allow to set the coordinates system (default is spherical). Surveys using cartesian coordinates can be made by changing the xesmf source code as explained here: https://github.com/JiaweiZhuang/xESMF/issues/39