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