mle_face_ustar_x Function

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

Friction velocity u* = sqrt(|tau|/rho0) at the u-face from the surface wind stress, averaged onto the face. Only used by the FK11 mixrate form. Returns 0 if stress fields are absent.

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_x~~CalledByGraph proc~mle_face_ustar_x mle_face_ustar_x proc~mle_compute_transports mle_compute_transports proc~mle_compute_transports->proc~mle_face_ustar_x 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_x(ss, rho0, i, j) result(ustar)
      !$acc routine seq
      !! Friction velocity u* = sqrt(|tau|/rho0) at the u-face from the
      !! surface wind stress, averaged onto the face.  Only used by the
      !! FK11 mixrate form.  Returns 0 if stress fields are absent.
      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_x already lives on the u-face (i,j); tau_y on v-faces is
      ! averaged from the four neighbours straddling this u-face.
      tx = ss%tau_x(i, j)
      ty = 0.25_wp*(ss%tau_y(i - 1, j) + ss%tau_y(i, j) + &
                    ss%tau_y(i - 1, j + 1) + ss%tau_y(i, j + 1))
      ustar = sqrt(sqrt(tx*tx + ty*ty)/rho0)
   end function mle_face_ustar_x