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.

Args:
  • filename_or_fileglob (str): filename or fileglob specifying one or more files to read.

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

  • magnetic_variation (float): 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 (bool): Regrid directions after correcting for the magnetic variation so the direction coordinate remains the same.

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

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.