Returns the saturation spectrum B(k) = F(k)k^4.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(spectrum_type), | intent(in) | :: | self | Spectrum instance |
Saturation spectrum result
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
pure function saturationSpectrum(self)
!! Returns the saturation spectrum B(k) = F(k)k^4.
class(spectrum_type),intent(in) :: self
!! Spectrum instance
real(kind=rk),dimension(:,:),allocatable :: saturationSpectrum
!! Saturation spectrum result
real(kind=rk),dimension(:,:),allocatable :: wavenumber_spectrum
integer :: nfreqs,ndirs
integer :: n
nfreqs = size(self % f)
ndirs = size(self % th)
allocate(saturationSpectrum(nfreqs,ndirs))
wavenumber_spectrum = self % wavenumberSpectrum()
do concurrent(n=1:ndirs)
saturationSpectrum(:,n) = wavenumber_spectrum(:,n) * self % k**4
enddo
endfunction saturationSpectrum