Byte-for-byte copy of apply_surface_src_2d_impl with the
budget dummy and its accumulation line removed — the
pseudo-salt mirror of salinity’s surface flux, which by
contract (budget_id = TRACER_BUDGET_NONE) must not touch
salt_budget_surface. Separate _impl, not an in-loop
present(budget) test (house idiom, see
apply_surface_src_2d_dyn_impl’s docstring) — this keeps the
production S/T impl untouched and the increment hTr receives
bit-identical to salinity’s.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | hTr(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | wet_mask(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | Q_field(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | inv_scale | |||
| integer, | intent(in) | :: | k_top(nx,ny) |
See |
||
| integer, | intent(in) | :: | nz | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | cell | ||||
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
pure subroutine apply_surface_src_2d_nobudget_impl(hTr, wet_mask, Q_field, & inv_scale, k_top, nz, nx, ny) !! Byte-for-byte copy of `apply_surface_src_2d_impl` with the !! `budget` dummy and its accumulation line removed — the !! pseudo-salt mirror of salinity's surface flux, which by !! contract (`budget_id = TRACER_BUDGET_NONE`) must not touch !! `salt_budget_surface`. Separate `_impl`, not an in-loop !! `present(budget)` test (house idiom, see !! `apply_surface_src_2d_dyn_impl`'s docstring) — this keeps the !! production S/T impl untouched and the increment `hTr` receives !! bit-identical to salinity's. integer, intent(in) :: nz, nx, ny real(wp), intent(inout) :: hTr(nx, ny, nz) real(wp), intent(in) :: wet_mask(nx, ny) real(wp), intent(in) :: Q_field(nx, ny) real(wp), intent(in) :: inv_scale integer, intent(in) :: k_top(nx, ny) !! See `apply_surface_src_2d_impl`. The SAME index salinity !! used, so the pseudo-salt increment stays bit-identical to !! salinity's and the deviation keeps measuring transport. integer :: i, j real(wp) :: cell do concurrent(j=1:ny, i=1:nx) local(cell) cell = inv_scale*Q_field(i, j)*wet_mask(i, j) hTr(i, j, k_top(i, j)) = hTr(i, j, k_top(i, j)) + cell end do end subroutine apply_surface_src_2d_nobudget_impl