Mirror-h at a land neighbour (spec §14 C2 / MOM6’s
reflected-coast PPM): substitute the LOCAL cell’s
thickness (or tracer) for a LAND neighbour’s held floor value
so the PPM parabola sees a flat, reflected coast and the
wet-side face value is not biased by the dry column. Branchless:
h_out = w_nbr·h_nbr + (1-w_nbr)·h_loc.
Wet neighbour (w_nbr=1) ⇒ h_out = h_nbr (literal no-op);
land neighbour (w_nbr=0) ⇒ h_out = h_loc.
Consumer: rdb_ice_transport (sea-ice PR 4b) reuses this
verbatim for the category-summed ice/snow PPM parabola —
SIS2’s mask2dT substitution (SIS_continuity.F90:1478-1479).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | h_nbr |
neighbour value |
||
| real(kind=wp), | intent(in) | :: | h_loc |
local-cell value (the mirror target) |
||
| real(kind=wp), | intent(in) | :: | w_nbr |
neighbour wet mask (0/1) |
pure elemental function ppm_mirror_h(h_nbr, h_loc, w_nbr) result(h_out) !$acc routine seq !! Mirror-h at a land neighbour (spec §14 C2 / MOM6's !! reflected-coast PPM): substitute the LOCAL cell's !! thickness (or tracer) for a LAND neighbour's held floor value !! so the PPM parabola sees a flat, reflected coast and the !! wet-side face value is not biased by the dry column. Branchless: !! `h_out = w_nbr·h_nbr + (1-w_nbr)·h_loc`. !! Wet neighbour (`w_nbr=1`) ⇒ `h_out = h_nbr` (literal no-op); !! land neighbour (`w_nbr=0`) ⇒ `h_out = h_loc`. !! !! Consumer: `rdb_ice_transport` (sea-ice PR 4b) reuses this !! verbatim for the category-summed ice/snow PPM parabola — !! SIS2's mask2dT substitution (`SIS_continuity.F90:1478-1479`). real(wp), intent(in) :: h_nbr !! neighbour value real(wp), intent(in) :: h_loc !! local-cell value (the mirror target) real(wp), intent(in) :: w_nbr !! neighbour wet mask (0/1) real(wp) :: h_out h_out = w_nbr*h_nbr + (1.0_wp - w_nbr)*h_loc end function ppm_mirror_h