wavespectra.core.utils.scaled#

wavespectra.core.utils.scaled(spec, hs)[source]#

Scale spectra.

The energy density in each spectrum is scaled by a single factor so that

significant wave height calculated from the scaled spectrum corresponds to hs.

Args:
  • spec (SpecArray, SpecDataset): Wavespectra object to be scaled.

  • hs (DataArray, float): Hs values to use for scaling, if float it will scale each spectrum in the dataset, if a DataArray it must have all non-spectral coordinates as the spectra dataset.

Returns:
  • spec (SpecArray, SpecDataset): Scaled wavespectra object.