ice_mass_update_x_impl Subroutine

private pure subroutine ice_mass_update_x_impl(iareaT, uh, mca, dt_adv, nghost, nx_phys, ncat, nx, ny)

SIS2 :183-191: mca(c) -= dt_adv*iareaT*(uh(I)-uh(I-1)), physical cells only. No race (reads faces, writes cells).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: iareaT(nx,ny)
real(kind=wp), intent(in) :: uh(nx+1,ny,ncat)
real(kind=wp), intent(inout) :: mca(nx,ny,ncat)
real(kind=wp), intent(in) :: dt_adv
integer, intent(in) :: nghost
integer, intent(in) :: nx_phys
integer, intent(in) :: ncat
integer, intent(in) :: nx
integer, intent(in) :: ny

Called by

proc~~ice_mass_update_x_impl~~CalledByGraph proc~ice_mass_update_x_impl ice_mass_update_x_impl proc~ice_pass_x ice_pass_x proc~ice_pass_x->proc~ice_mass_update_x_impl proc~ice_transport_step ice_transport_step proc~ice_transport_step->proc~ice_pass_x proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_transport_step proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step_ice proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
integer, private :: c
integer, private :: i
integer, private :: i_hi
integer, private :: i_lo
integer, private :: j

Source Code

   pure subroutine ice_mass_update_x_impl(iareaT, uh, mca, dt_adv, nghost, nx_phys, ncat, nx, ny)
      !! SIS2 `:183-191`: `mca(c) -= dt_adv*iareaT*(uh(I)-uh(I-1))`,
      !! physical cells only.  No race (reads faces, writes cells).
      integer, intent(in) :: nghost, nx_phys, ncat, nx, ny
      real(wp), intent(in) :: iareaT(nx, ny)
      real(wp), intent(in) :: uh(nx + 1, ny, ncat)
      real(wp), intent(inout) :: mca(nx, ny, ncat)
      real(wp), intent(in) :: dt_adv
      integer :: i, j, c, i_lo, i_hi

      i_lo = nghost + 1
      i_hi = nghost + nx_phys

      do concurrent(j=1:ny, i=i_lo:i_hi, c=1:ncat)
         mca(i, j, c) = mca(i, j, c) - dt_adv*iareaT(i, j)*(uh(i + 1, j, c) - uh(i, j, c))
      end do
   end subroutine ice_mass_update_x_impl