wavespectra.SpecDataset.to_octopus#

SpecDataset.to_octopus(filename, site_id='spec', fcut=0.125, missing_val=-99999, ntime=None)#

Save spectra in Octopus format.

Args:
  • filename (str): name for output OCTOPUS file.

  • site_id (str): used to construct LPoint header.

  • fcut (float): frequency for splitting spectra.

  • missing_value (int): missing value in output file.

  • ntime (int, None): number of times to load into memory before dumping output file if full dataset does not fit into memory, choose None to load all times.

Note:
  • dataset needs to have lon/lat/time coordinates.

  • dataset with multiple locations dumped at same file with one location header per site.

  • 1D spectra not supported.

  • ntime=None optimises speed as the dataset is loaded into memory however the dataset may not fit into memory in which case a smaller number of times may be prescribed.