redi_budget_accumulate Subroutine

private pure subroutine redi_budget_accumulate(nx, ny, nz, hTr, snap, budget)

budget += hTr - snap (device-side): book the realised Redi increment of one budgeted tracer into its lateral-diffusion budget accumulator (ms%salt_budget_hdiff / heat_budget_hdiff).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz
real(kind=wp), intent(in) :: hTr(nx,ny,nz)
real(kind=wp), intent(in) :: snap(nx,ny,nz)
real(kind=wp), intent(inout) :: budget(nx,ny,nz)

Called by

proc~~redi_budget_accumulate~~CalledByGraph proc~redi_budget_accumulate redi_budget_accumulate proc~redi_apply_flux redi_apply_flux proc~redi_apply_flux->proc~redi_budget_accumulate proc~run_continuity_chain run_continuity_chain proc~run_continuity_chain->proc~redi_apply_flux proc~run_stage_split run_stage_split proc~run_stage_split->proc~run_continuity_chain 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_split

Variables

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

Source Code

   pure subroutine redi_budget_accumulate(nx, ny, nz, hTr, snap, budget)
      !! `budget += hTr - snap` (device-side): book the realised Redi
      !! increment of one budgeted tracer into its lateral-diffusion
      !! budget accumulator (`ms%salt_budget_hdiff` / `heat_budget_hdiff`).
      integer, intent(in) :: nx, ny, nz
      real(wp), intent(in) :: hTr(nx, ny, nz)
      real(wp), intent(in) :: snap(nx, ny, nz)
      real(wp), intent(inout) :: budget(nx, ny, nz)
      integer :: i, j, k
      do concurrent(k=1:nz, j=1:ny, i=1:nx)
         budget(i, j, k) = budget(i, j, k) + (hTr(i, j, k) - snap(i, j, k))
      end do
   end subroutine redi_budget_accumulate