Interior aging, k = 1 .. nz-1 (subsurface layers only —
k = nz is the surface and is owned exclusively by
ocean_ideal_age_reset_step):
hTr_age(i,j,k) += dt * h_layer(i,j,k)
dt here is the caller’s therm_dt, so this is a per-RK2-
stage source; two stages + rk2_average_field_3d net exactly
one +dt per outer step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | hTr_age(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | h_layer(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | dt | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | k |
pure subroutine ocean_ideal_age_age_step(hTr_age, h_layer, dt, nx, ny, nz) !! Interior aging, `k = 1 .. nz-1` (subsurface layers only — !! `k = nz` is the surface and is owned exclusively by !! `ocean_ideal_age_reset_step`): !! `hTr_age(i,j,k) += dt * h_layer(i,j,k)` !! `dt` here is the caller's `therm_dt`, so this is a per-RK2- !! stage source; two stages + `rk2_average_field_3d` net exactly !! one `+dt` per outer step. integer, intent(in) :: nx, ny, nz real(wp), intent(inout) :: hTr_age(nx, ny, nz) real(wp), intent(in) :: h_layer(nx, ny, nz) real(wp), intent(in) :: dt integer :: i, j, k do concurrent(k=1:nz - 1, j=1:ny, i=1:nx) hTr_age(i, j, k) = hTr_age(i, j, k) + dt*h_layer(i, j, k) end do end subroutine ocean_ideal_age_age_step