oceanspy.subsample.survey_stations

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.

Parameters
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.

**kwargs:

Keyword arguments for oceanspy.subsample.cutout().

Returns
od: OceanDataset

Subsampled oceandataset.

Notes

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

References

https://xesmf.readthedocs.io/en/stable/user_api.html#regridder