wavespectra.read_ndbc#

wavespectra.read_ndbc(url, directional=True, dd=10.0, chunks={})[source]#

Read Spectra from NDBC netCDF format.

Args:
  • url (str): Thredds URL or local path of file or fileobj to read.

  • directional (bool): Constructs 2D spectra if True, returns 1D if False.

  • dd (float): Directional resolution for 2D spectra (deg).

  • chunks (dict): Chunk sizes for dimensions in dataset. By default dataset is loaded using single chunk for all dimensions.

Returns:
  • dset (SpecDataset): spectra dataset object read from NDBC file.

Note:
  • Any missing values within directional variables in the NDBC dataset will result in NaN in the directional spectra for the respective timestamps. These spectra can only be read as 1D by setting directional=False.

  • If file is large to fit in memory, consider specifying chunks for ‘time’ or other non-spectral dims.