Returns the 3-d array with values of Eulerian velocity (mean current) in x-direction [m/s].
Note: this implementation assumes that all u and v velocity arrays in the domain instance are of same length in depth, such that the resulting u and v arrays are regular 3-d arrays.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(domain_type), | intent(in) | :: | self | Domain instance |
Eulerian u-velocity [m/s]
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 getCurrent_u(self) result(u)
!! Returns the 3-d array with values of Eulerian velocity (mean current) in
!! x-direction [m/s].
!!
!! Note: this implementation assumes that all u and v velocity arrays in
!! the domain instance are of same length in depth, such that the resulting
!! u and v arrays are regular 3-d arrays.
class(domain_type),intent(in) :: self
!! Domain instance
real(kind=rk),dimension(:,:,:),allocatable :: u
!! Eulerian u-velocity [m/s]
integer(kind=ik) :: i,j
integer(kind=ik) :: kdm
associate(lb => self % lb,ub => self % ub)
kdm = size(self % spectrum(1,1) % getCurrent_u())
allocate(u(lb(1):ub(1),lb(2):ub(2),kdm))
do concurrent(i=lb(1):ub(1),j=lb(2):ub(2))
u(i,j,:) = self % spectrum(i,j) % getCurrent_u()
enddo
endassociate
endfunction getCurrent_u