mle_mu_shape Function

public pure function mle_mu_shape(sigma) result(mu)

FK08 second-order vertical structure function mu(sigma). sigma in [-1,0]: 0 = surface interface, -1 = ML base. mu = 0 at sigma=0 (surface) and sigma <= -1 (ML base); peaks near sigma=-0.5.

mu(sigma) = max(0, (1-(2 sigma+1)^2) * (1 + (5/21)(2 sigma+1)^2))

Reference: FK08 eq. 21 / FK11 eq. 5.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: sigma

Return Value real(kind=wp)


Called by

proc~~mle_mu_shape~~CalledByGraph proc~mle_mu_shape mle_mu_shape proc~mle_layer_weights mle_layer_weights proc~mle_layer_weights->proc~mle_mu_shape proc~mle_compute_transports mle_compute_transports proc~mle_compute_transports->proc~mle_layer_weights 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

Variables

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

Source Code

   pure function mle_mu_shape(sigma) result(mu)
      !$acc routine seq
      !! FK08 second-order vertical structure function mu(sigma).
      !! sigma in [-1,0]: 0 = surface interface, -1 = ML base.  mu = 0 at
      !! sigma=0 (surface) and sigma <= -1 (ML base); peaks near sigma=-0.5.
      !!
      !!     mu(sigma) = max(0, (1-(2 sigma+1)^2) * (1 + (5/21)(2 sigma+1)^2))
      !!
      !! Reference: FK08 eq. 21 / FK11 eq. 5.
      real(wp), intent(in) :: sigma
      real(wp) :: mu, x
      x = 2.0_wp*sigma + 1.0_wp          ! maps sigma in [-1,0] -> x in [-1,1]
      mu = (1.0_wp - x*x)*(1.0_wp + (5.0_wp/21.0_wp)*x*x)
      mu = max(0.0_wp, mu)
   end function mle_mu_shape