wavespectra.SpecDataset#
- class wavespectra.SpecDataset(xarray_dset)[source]#
Extends xarray’s Dataset to deal with wave spectra datasets.
Plugin functions defined in wavespectra/output/<module> are attached as methods in this accessor class.
Methods
__init__(xarray_dset)sel(lons, lats[, method, tolerance, ...])Select stations near or at locations defined by (lons, lats) vector.
to_funwave(filename[, clip])Write spectra in Funwave format.
to_json(filename[, mode, date_format])Write spectra in json format.
to_netcdf(filename[, specname, ncformat, ...])Write spectra in netCDF format using wavespectra conventions.
to_octopus(filename[, site_id, fcut, ...])Save spectra in Octopus format.
to_orcaflex(model[, minEnergy])Writes the spectrum to an Orcaflex model
to_swan(filename[, append, id, ntime, lons, ...])Write spectra in SWAN ASCII format.
to_ww3(filename[, ncformat, compress])Save spectra in native WW3 netCDF format.