Donor mass fraction h_avail(k)/rsum_above(k) (0 when no mass is
available above). rsum_above(k) is the cumulative availability
from the surface down to and including layer k, so hf in [0,1].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | h_avail_k | |||
| real(kind=wp), | intent(in) | :: | rsum_k |
pure function gm_h_frac(h_avail_k, rsum_k) result(hf) !$acc routine seq !! Donor mass fraction `h_avail(k)/rsum_above(k)` (0 when no mass is !! available above). `rsum_above(k)` is the cumulative availability !! from the surface down to and including layer k, so `hf in [0,1]`. real(wp), intent(in) :: h_avail_k, rsum_k real(wp) :: hf hf = 0.0_wp if (h_avail_k > 0.0_wp) hf = h_avail_k/(rsum_k + H_DIV_EPS) end function gm_h_frac