wavespectra.read_ww3#
- wavespectra.read_ww3(filename_or_fileglob, file_format='netcdf', mapping={'direction': 'dir', 'efth': 'efth', 'frequency': 'freq', 'latitude': 'lat', 'longitude': 'lon', 'station': 'site', 'time': 'time', 'wnd': 'wspd', 'wnddir': 'wdir'}, chunks={})[source]#
Read Spectra from WAVEWATCHIII native netCDF format.
- Args:
filename_or_fileglob (str, list, fileobj): filename, fileglob specifying multiple files, or a file object to read.
file_format (str): format of file to open, one of netcdf or zarr.
mapping (dict): coordinates mapping from original dataset to wavespectra.
chunks (dict): chunk sizes for dimensions in dataset. By default dataset is loaded using single chunk for all dimensions (see xr.open_mfdataset documentation). Dimension names from original dataset or from wavespectra can be used to specify chunks dict.
- Returns:
dset (SpecDataset): spectra dataset object read from ww3 file.
- Note:
If file is large to fit in memory, consider specifying chunks for ‘time’ and/or ‘station’ dims.