cavity_comp_scale_tracer_impl Subroutine

public pure subroutine cavity_comp_scale_tracer_impl(nx, ny, nz, scale, hTr)

Apply the compensation sink’s top-layer ratio to one PASSIVE tracer’s load. Unconditional (scale = 1 off the sink), so there is no mask branch inside the kernel.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

First dimension.

integer, intent(in) :: ny

Second dimension.

integer, intent(in) :: nz

Layer count.

real(kind=wp), intent(in) :: scale(nx,ny)

h_new/h_old from cavity_comp_apply_impl.

real(kind=wp), intent(inout) :: hTr(nx,ny,nz)

The tracer’s h*C.


Called by

proc~~cavity_comp_scale_tracer_impl~~CalledByGraph proc~cavity_comp_scale_tracer_impl cavity_comp_scale_tracer_impl proc~ocean_cavity_mass_step ocean_cavity_mass_step proc~ocean_cavity_mass_step->proc~cavity_comp_scale_tracer_impl proc~run_stage run_stage proc~run_stage->proc~ocean_cavity_mass_step proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_cavity_mass_step 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

Source Code

   pure subroutine cavity_comp_scale_tracer_impl(nx, ny, nz, scale, hTr)
      !! Apply the compensation sink's top-layer ratio to one PASSIVE
      !! tracer's load.  Unconditional (`scale = 1` off the sink), so
      !! there is no mask branch inside the kernel.
      integer, intent(in) :: nx
         !! First dimension.
      integer, intent(in) :: ny
         !! Second dimension.
      integer, intent(in) :: nz
         !! Layer count.
      real(wp), intent(in) :: scale(nx, ny)
         !! `h_new/h_old` from `cavity_comp_apply_impl`.
      real(wp), intent(inout) :: hTr(nx, ny, nz)
         !! The tracer's `h*C`.
      integer :: i, j
      do concurrent(j=1:ny, i=1:nx)
         hTr(i, j, nz) = hTr(i, j, nz)*scale(i, j)
      end do
   end subroutine cavity_comp_scale_tracer_impl