wavespectra.read_ncswan#
- wavespectra.read_ncswan(filename_or_fileglob, file_format='netcdf', mapping={'density': 'efth', 'depth': 'dpt', 'direction': 'dir', 'frequency': 'freq', 'latitude': 'lat', 'longitude': 'lon', 'points': 'site', 'time': 'time'}, chunks={})[source]#
Read Spectra from SWAN native netCDF format.
- Parameters:
filename_or_fileglob (-) – filename, fileglob specifying multiple files, or a file object to read.
file_format (-) – format of file to open, one of netcdf or zarr.
mapping (-) – coordinates mapping from original dataset to wavespectra.
chunks (-) – chunk sizes for dimensions in dataset. By default dataset is loaded using single chunk for all dimensions (see xr.open_mfdataset documentation).
- Returns:
spectra dataset object read from ww3 file.
- Return type:
dset (SpecDataset)
Note
If file is large to fit in memory, consider specifying chunks for ‘time’ and/or ‘station’ dims.