water = b - z_draft — the reference water-column thickness the
datum, the layer split and the wet-mask seed all work on. Kept
as one named routine so the three call sites cannot drift.
Explicit-shape by the house rule; host-only (setup).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(out) | :: | water(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | b(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | z_draft(nx,ny) | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
pure subroutine cavity_water_column_impl(water, b, z_draft, nx, ny) !! `water = b - z_draft` — the reference water-column thickness the !! datum, the layer split and the wet-mask seed all work on. Kept !! as one named routine so the three call sites cannot drift. !! !! Explicit-shape by the house rule; host-only (setup). integer, intent(in) :: nx, ny real(wp), intent(out) :: water(nx, ny) real(wp), intent(in) :: b(nx, ny) real(wp), intent(in) :: z_draft(nx, ny) integer :: i, j do j = 1, ny do i = 1, nx water(i, j) = b(i, j) - z_draft(i, j) end do end do end subroutine cavity_water_column_impl