Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | i | |||
integer, | intent(in) | :: | j | |||
integer, | intent(in) | :: | k |
function interp_velocity_w(i, j, k) ! interpolates the velocity at w-grid location i,j,k use modfields, only : u0, v0, w0 real :: interp_velocity_w(3) integer, intent(in) :: i, j, k interp_velocity_w(1) = 0.25 * (u0(i,j,k) + u0(i+1,j,k) + u0(i,j-1,k) + u0(i+1,j-1,k)) interp_velocity_w(2) = v0(i,j,k) interp_velocity_w(3) = 0.25 * (w0(i,j,k) + w0(i,j,k+1) + w0(i,j-1,k) + w0(i,j-1,k+1)) !only for equidistant grid! return end function interp_velocity_w