mle_face_ustar_y Function

private pure function mle_face_ustar_y(ss, rho0, i, j) result(ustar)

u* at the v-face; mirror of mle_face_ustar_x.

Arguments

Type IntentOptional Attributes Name
type(ocean_surface_stress_t), intent(in) :: ss
real(kind=wp), intent(in) :: rho0
integer, intent(in) :: i
integer, intent(in) :: j

Return Value real(kind=wp)


Called by

proc~~mle_face_ustar_y~~CalledByGraph proc~mle_face_ustar_y mle_face_ustar_y proc~mle_compute_transports mle_compute_transports proc~mle_compute_transports->proc~mle_face_ustar_y proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~mle_compute_transports proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private :: tx
real(kind=wp), private :: ty

Source Code

   pure function mle_face_ustar_y(ss, rho0, i, j) result(ustar)
      !$acc routine seq
      !! u* at the v-face; mirror of `mle_face_ustar_x`.
      type(ocean_surface_stress_t), intent(in) :: ss
      real(wp), intent(in) :: rho0
      integer, intent(in) :: i, j
      real(wp) :: ustar, tx, ty
      ustar = 0.0_wp
      if (.not. allocated(ss%tau_x) .or. .not. allocated(ss%tau_y)) return
      ! tau_y already lives on the v-face (i,j); tau_x on u-faces is
      ! averaged from the four neighbours straddling this v-face.
      ty = ss%tau_y(i, j)
      tx = 0.25_wp*(ss%tau_x(i, j - 1) + ss%tau_x(i + 1, j - 1) + &
                    ss%tau_x(i, j) + ss%tau_x(i + 1, j))
      ustar = sqrt(sqrt(tx*tx + ty*ty)/rho0)
   end function mle_face_ustar_y