wavespectra.read_dataset#

wavespectra.read_dataset(dset)[source]#

Format and attach SpecArray accessor to an existing xarray dataset.

Convenience function to define the SpecArray accessor for a dataset rather than a

file. The function guesses the original file format based on variable names.

Args:
dset (xr.Dataset): Spectra dataset with dimensions, coordinates and data_vars

consistent any supported file format (currently WW3, SWAN and WWM).