Two-band (Paulson & Simpson 1977) normalised downward
irradiance transmission at depth d below the free surface,
T(d) = R·exp(-d/zeta1) + (1-R)·exp(-d/zeta2), T(0) = 1.
This is THE single shared definition — the SW deposition
kernel, the KPP MXL_SW/LV1_SW boundary-layer correction, and
the EPBL in-layer PE-cost ledger all consume it, so the three
consumers cannot disagree about where the sunlight went. Marked
!$acc routine seq so it inlines into same-module device kernels
and is callable from cross-module do concurrent kernels.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | d | |||
| real(kind=wp), | intent(in) | :: | R | |||
| real(kind=wp), | intent(in) | :: | zeta1 | |||
| real(kind=wp), | intent(in) | :: | zeta2 |
pure function sw_transmission(d, R, zeta1, zeta2) result(trans) !! Two-band (Paulson & Simpson 1977) normalised downward !! irradiance transmission at depth `d` below the free surface, !! `T(d) = R·exp(-d/zeta1) + (1-R)·exp(-d/zeta2)`, `T(0) = 1`. !! This is THE single shared definition — the SW deposition !! kernel, the KPP `MXL_SW`/`LV1_SW` boundary-layer correction, and !! the EPBL in-layer PE-cost ledger all consume it, so the three !! consumers cannot disagree about where the sunlight went. Marked !! `!$acc routine seq` so it inlines into same-module device kernels !! and is callable from cross-module `do concurrent` kernels. !$acc routine seq real(wp), intent(in) :: d, R, zeta1, zeta2 real(wp) :: trans trans = R*exp(-d/zeta1) + (1.0_wp - R)*exp(-d/zeta2) end function sw_transmission