In-layer potential-energy-cost shape function Phi(tau) for the
EPBL TKE ledger, tau = h/zeta the in-layer optical depth of a
single band. It is the fraction of the pure-skin PE cost that
homogenising an EXPONENTIALLY distributed in-layer heating
actually incurs (Paulson & Simpson 1977 profile; the EPBL
energetics of Reichl & Hallberg 2018):
Phi(tau) = [ tau·(1+e^-tau) - 2·(1-e^-tau) ] / [ tau·(1-e^-tau) ]
Limits: Phi(0) = 0 (heating already uniform through the layer
⇒ homogenising it costs nothing) and Phi(∞) = 1 (all heating
at the layer top ⇒ full skin cost, recovering Roundabout’s existing
ctke_sfc skin form exactly). The closed form is 0/0 as
tau -> 0 and cancels catastrophically for small tau; a thin
layer (h << zeta2 = 23 m) is the COMMON case, so the Taylor
branch Phi ≈ (tau/6)·(1 - tau²/60) is mandatory below the
tau = 1e-2 seam. !$acc routine seq for cross-module device
calls (the EPBL prep sweep).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | tau |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | parameter | :: | C1_6 | = | 1.0_wp/6.0_wp | |
| real(kind=wp), | private, | parameter | :: | C1_60 | = | 1.0_wp/60.0_wp | |
| real(kind=wp), | private, | parameter | :: | TAU_TAYLOR | = | 1.0e-2_wp | |
| real(kind=wp), | private | :: | em1 |
pure function sw_pe_cost_shape(tau) result(phi) !! In-layer potential-energy-cost shape function `Phi(tau)` for the !! EPBL TKE ledger, `tau = h/zeta` the in-layer optical depth of a !! single band. It is the fraction of the pure-skin PE cost that !! homogenising an EXPONENTIALLY distributed in-layer heating !! actually incurs (Paulson & Simpson 1977 profile; the EPBL !! energetics of Reichl & Hallberg 2018): !! !! Phi(tau) = [ tau·(1+e^-tau) - 2·(1-e^-tau) ] / [ tau·(1-e^-tau) ] !! !! Limits: `Phi(0) = 0` (heating already uniform through the layer !! ⇒ homogenising it costs nothing) and `Phi(∞) = 1` (all heating !! at the layer top ⇒ full skin cost, recovering Roundabout's existing !! `ctke_sfc` skin form exactly). The closed form is `0/0` as !! `tau -> 0` and cancels catastrophically for small `tau`; a thin !! layer (`h << zeta2 = 23 m`) is the COMMON case, so the Taylor !! branch `Phi ≈ (tau/6)·(1 - tau²/60)` is mandatory below the !! `tau = 1e-2` seam. `!$acc routine seq` for cross-module device !! calls (the EPBL prep sweep). !$acc routine seq real(wp), intent(in) :: tau real(wp) :: phi real(wp) :: em1 real(wp), parameter :: TAU_TAYLOR = 1.0e-2_wp real(wp), parameter :: C1_6 = 1.0_wp/6.0_wp real(wp), parameter :: C1_60 = 1.0_wp/60.0_wp if (tau <= TAU_TAYLOR) then phi = C1_6*tau*(1.0_wp - C1_60*tau*tau) else em1 = 1.0_wp - exp(-tau) phi = (tau*(1.0_wp + exp(-tau)) - 2.0_wp*em1)/(tau*em1) end if end function sw_pe_cost_shape