wavespectra.read_ndbc_ascii#

wavespectra.read_ndbc_ascii(filename, dirs=array([0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350]))[source]#

Read spectra from NDBC wave buoy ASCII files.

Both the history and realtime formats are supported. Realtime formats are decribed at https://www.ndbc.noaa.gov/measdes.shtml.

Args:
  • filename (str) or filenames (list): filename of 1D spectral density file or list of the five component files for directional spectra as [spec, swdir, swdir2, swr1, swr2]. There is no way to verify the component files for the historical directional spectra, so the order entered in the list is what is used. The history and realtime formats are automatically detected.

  • dirs (array): vector of directional bins for spectral reconstruction.

  • attrs (dict): additional global attributes.

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