ocean_ideal_age_age_step Subroutine

public 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.

Arguments

Type IntentOptional 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

Called by

proc~~ocean_ideal_age_age_step~~CalledByGraph proc~ocean_ideal_age_age_step ocean_ideal_age_age_step proc~ocean_ideal_age_apply ocean_ideal_age_apply proc~ocean_ideal_age_apply->proc~ocean_ideal_age_age_step proc~run_stage run_stage proc~run_stage->proc~ocean_ideal_age_apply proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_ideal_age_apply proc~ocean_dyn_step ocean_dyn_step proc~ocean_dyn_step->proc~run_stage proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j
integer, private :: k

Source Code

   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