continuity_apply_fluxes_barotropic Subroutine

public pure subroutine continuity_apply_fluxes_barotropic(bs, dt)

Forward-Euler step: h <- h - dt * flux_h. The full split-explicit RK2 scheme (Phase 4) wraps two of these calls around an RK2 averaging pass; for Phase 2 this single-stage step is enough to exercise the kernel under the lake-at-rest, Gaussian-hump, and mass-conservation tests.

Arguments

Type IntentOptional Attributes Name
type(barotropic_state_t), intent(inout) :: bs
real(kind=wp), intent(in) :: dt

Called by

proc~~continuity_apply_fluxes_barotropic~~CalledByGraph proc~continuity_apply_fluxes_barotropic continuity_apply_fluxes_barotropic proc~ocean_dyn_step_barotropic ocean_dyn_step_barotropic proc~ocean_dyn_step_barotropic->proc~continuity_apply_fluxes_barotropic

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j
integer, private :: nx
integer, private :: ny

Source Code

   pure subroutine continuity_apply_fluxes_barotropic(bs, dt)
      !! Forward-Euler step: h <- h - dt * flux_h.  The full
      !! split-explicit RK2 scheme (Phase 4) wraps two of these calls
      !! around an RK2 averaging pass; for Phase 2 this single-stage
      !! step is enough to exercise the kernel under the lake-at-rest,
      !! Gaussian-hump, and mass-conservation tests.
      type(barotropic_state_t), intent(inout) :: bs
      real(wp), intent(in) :: dt
      integer :: i, j, nx, ny

      nx = size(bs%h, 1)
      ny = size(bs%h, 2)

      do concurrent(j=1:ny, i=1:nx)
         bs%h(i, j) = bs%h(i, j) - dt*bs%flux_h(i, j)
      end do
   end subroutine continuity_apply_fluxes_barotropic