Returns the phase speed [m/s] array of the spectrum instance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(spectrum_type), | intent(in) | :: | self | Spectrum instance |
Phase speed [m/s]
pure function getPhaseSpeed2d(self) result(cp)
!! Returns the phase speed [m/s] array of the spectrum instance.
class(spectrum_type),intent(in) :: self !! Spectrum instance
real(kind=rk),dimension(:,:),allocatable :: cp !! Phase speed [m/s]
integer :: ndirs,nfreqs
integer :: ndir
nfreqs = size(self % f)
ndirs = size(self % th)
allocate(cp(nfreqs,ndirs))
do concurrent(ndir = 1:ndirs)
cp(:,ndir) = self % cp
enddo
endfunction getPhaseSpeed2d