wavespectra.SpecArray.scale_by_hs#

SpecArray.scale_by_hs(expr, hs_min=-inf, hs_max=inf, tp_min=-inf, tp_max=inf, dpm_min=-inf, dpm_max=inf)[source]#

Scale spectra using expression based on Significant Wave Height hs.

Parameters:
  • expr (-) – expression to apply, e.g. ‘0.13*hs + 0.02’.

  • hs_min (-) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

  • hs_max (float) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

  • tp_min (float) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

  • tp_max (float) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

  • dpm_min (float) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

  • dpm_max (float) – Ranges of hs, tp and dpm over which the scaling defined by expr is applied.

Returns:

Scaled spectra, returned as a Dataset with the

non-spectral variables preserved when called from the Dataset accessor.

Return type:

  • efth (DataArray)