sup3r.qa.utilities.wavenumber_spectrum

sup3r.qa.utilities.wavenumber_spectrum#

wavenumber_spectrum(var, x_range=None, axis=0)[source]#

Wavenumber Spectrum. Gives the portion of the given variable associated with each wavenumber.

Parameters:
  • var (ndarray) – (lat, lon)

  • x_range (list | None) – List with min and max wavenumber. When comparing spectra for different domains this needs to be tailored to the specific domain. e.g. k = [1/max_length, …, 1/min_length] If this is not specified k with be set to [0, …, len(y)] where y is the fft output.

  • axis (int) – Axis to average over to get a 1D field. If axis=0 this returns the zonal spectrum

Returns:

  • ndarray – Array of wavenumbers corresponding to amplitudes

  • ndarray – 1D array of amplitudes corresponding to the portion of the given variable with a given wavenumber