Console out term for a conserved tracer: the boundary transport
out of the domain, from the horizontal-advection + horizontal-
diffusion budgets.
out = −RK2_STAGE_WEIGHT · (adv_sum + hdiff_sum) · RHO_WATER
adv_sum / hdiff_sum are the already-area-weighted interior
reductions of the per-cell budget arrays (PRE-weight, PRE-RHO_WATER).
The leading MINUS converts an interior loss (negative divergence
integral) into a positive “left the domain” quantity. Sole home of
the weight + sign + ρ scaling on the transport side.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | adv_sum | |||
| real(kind=wp), | intent(in) | :: | hdiff_sum | |||
| real(kind=wp), | intent(in), | optional | :: | stage_weight |
See |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | w |
pure function ocean_budget_out(adv_sum, hdiff_sum, stage_weight) result(out) !! Console `out` term for a conserved tracer: the boundary transport !! out of the domain, from the horizontal-advection + horizontal- !! diffusion budgets. !! !! out = −RK2_STAGE_WEIGHT · (adv_sum + hdiff_sum) · RHO_WATER !! !! `adv_sum` / `hdiff_sum` are the already-area-weighted interior !! reductions of the per-cell budget arrays (PRE-weight, PRE-`RHO_WATER`). !! The leading MINUS converts an interior loss (negative divergence !! integral) into a positive "left the domain" quantity. Sole home of !! the weight + sign + ρ scaling on the transport side. real(wp), intent(in) :: adv_sum, hdiff_sum real(wp), intent(in), optional :: stage_weight !! See `ocean_budget_src`. Absent ⇒ `RK2_STAGE_WEIGHT` (0.5). real(wp) :: out real(wp) :: w w = RK2_STAGE_WEIGHT if (present(stage_weight)) w = stage_weight out = -w*(adv_sum + hdiff_sum)*RHO_WATER end function ocean_budget_out