wavespeed_rd Function

public pure function wavespeed_rd(cg1, fabs, beta) result(rd)

Smooth equatorial Rd blend: Rd = cg1/sqrt(f^2 + 2betacg1). Reduces to cg1/|f| away from the equator and sqrt(cg1/(2*beta)) at f=0; a small inside-sqrt guard + denominator floor handle f = beta = 0.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: cg1
real(kind=wp), intent(in) :: fabs
real(kind=wp), intent(in) :: beta

Return Value real(kind=wp)


Called by

proc~~wavespeed_rd~~CalledByGraph proc~wavespeed_rd wavespeed_rd proc~wavespeed_compute_impl wavespeed_compute_impl proc~wavespeed_compute_impl->proc~wavespeed_rd proc~wavespeed_compute wavespeed_compute proc~wavespeed_compute->proc~wavespeed_compute_impl proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~wavespeed_compute 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

Variables

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

Source Code

   pure function wavespeed_rd(cg1, fabs, beta) result(rd)
      !! Smooth equatorial Rd blend: Rd = cg1/sqrt(f^2 + 2*beta*cg1).
      !! Reduces to cg1/|f| away from the equator and sqrt(cg1/(2*beta))
      !! at f=0; a small inside-sqrt guard + denominator floor handle
      !! f = beta = 0.
      !$acc routine seq
      real(wp), intent(in) :: cg1, fabs, beta
      real(wp) :: rd
      real(wp) :: denom
      denom = sqrt(fabs*fabs + 2.0_wp*beta*cg1 + RD_GUARD)
      rd = cg1/max(denom, F_DENOM_FLOOR)
   end function wavespeed_rd