wavespectra.read_triaxys#

wavespectra.read_triaxys(filename_or_fileglob, toff=0, magnetic_variation=None, regrid_dir=True)[source]#

Read spectra from TRIAXYS wave buoy ASCII files.

Parameters:
  • filename_or_fileglob (-) – filename or fileglob specifying one or more files to read.

  • toff (-) – time-zone offset from UTC in hours.

  • magnetic_variation (-) – The angle between the magnetic and geographic meridians to correct from magnetic north to true north. Positive and negative values indicate East and West declination respectively.

  • regrid_dir (-) – Regrid directions after correcting for the magnetic variation so the direction coordinate remains the same.

Returns:

spectra dataset object read from Triaxys file.

Return type:

  • dset (SpecDataset)

Note

  • frequencies and directions from first file are used as reference to interpolate spectra from other files in case they differ.

  • Duplicate dir coordinates (e.g., 0 and 360) are removed when correcting for the magnetic variation since indices must be unique to regrid.