Re-weight a tracer’s thickness-weighted content onto a new layer thickness, holding the CONCENTRATION fixed:
hTr := hTr · h_new / h_old (⇒ hTr/h_new ≡ hTr/h_old)
Used by the windowed (dt_tracer_advect_ratio > 1) path, whose
prognostic is the CONTENT hTr while MOM6’s is the CONCENTRATION
Tr. Freezing a content across a window over which continuity
keeps advancing h silently corrupts every consumer that derives
T = hTr/h_layer — the EOS above all — by δT/T = −δh/h. Freezing
a concentration (what MOM6 does) does not. See
continuity_tracer_step_split / continuity_tracer_drain.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| real(kind=wp), | intent(in) | :: | h_new(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | h_old(nx,ny,nz) | |||
| real(kind=wp), | intent(inout) | :: | hTr(nx,ny,nz) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | k |
pure subroutine drain_rescale_hTr(nx, ny, nz, h_new, h_old, hTr) !! Re-weight a tracer's thickness-weighted content onto a new layer !! thickness, holding the CONCENTRATION fixed: !! !! hTr := hTr · h_new / h_old (⇒ hTr/h_new ≡ hTr/h_old) !! !! Used by the windowed (`dt_tracer_advect_ratio > 1`) path, whose !! prognostic is the CONTENT `hTr` while MOM6's is the CONCENTRATION !! `Tr`. Freezing a content across a window over which continuity !! keeps advancing `h` silently corrupts every consumer that derives !! `T = hTr/h_layer` — the EOS above all — by `δT/T = −δh/h`. Freezing !! a concentration (what MOM6 does) does not. See !! `continuity_tracer_step_split` / `continuity_tracer_drain`. integer, intent(in) :: nx, ny, nz real(wp), intent(in) :: h_new(nx, ny, nz), h_old(nx, ny, nz) real(wp), intent(inout) :: hTr(nx, ny, nz) integer :: i, j, k do concurrent(k=1:nz, j=1:ny, i=1:nx) hTr(i, j, k) = hTr(i, j, k)*h_new(i, j, k)/max(h_old(i, j, k), DRAIN_MIN_H) end do end subroutine drain_rescale_hTr