relax_map_v_impl Subroutine

private pure subroutine relax_map_v_impl(v, v_ref, idamp_v, nx, nyv, nz, dt)

Relax v_face_y_layer toward v_ref at rate idamp_v. Mirror of relax_map_u_impl for the y-direction.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: v(nx,nyv,nz)
real(kind=wp), intent(in) :: v_ref(nx,nyv,nz)
real(kind=wp), intent(in) :: idamp_v(nx,nyv)
integer, intent(in) :: nx
integer, intent(in) :: nyv
integer, intent(in) :: nz
real(kind=wp), intent(in) :: dt

Calls

proc~~relax_map_v_impl~~CallsGraph proc~relax_map_v_impl relax_map_v_impl local local proc~relax_map_v_impl->local proc~relax_toward relax_toward proc~relax_map_v_impl->proc~relax_toward

Called by

proc~~relax_map_v_impl~~CalledByGraph proc~relax_map_v_impl relax_map_v_impl proc~ocean_sponge_apply_maps ocean_sponge_apply_maps proc~ocean_sponge_apply_maps->proc~relax_map_v_impl proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_sponge_apply_maps 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 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
real(kind=wp), private :: decay
integer, private :: i
integer, private :: j
integer, private :: k

Source Code

   pure subroutine relax_map_v_impl(v, v_ref, idamp_v, nx, nyv, nz, dt)
      !! Relax `v_face_y_layer` toward `v_ref` at rate `idamp_v`. Mirror of
      !! `relax_map_u_impl` for the y-direction.
      integer, intent(in)    :: nx, nyv, nz
      real(wp), intent(inout) :: v(nx, nyv, nz)
      real(wp), intent(in)    :: v_ref(nx, nyv, nz)
      real(wp), intent(in)    :: idamp_v(nx, nyv)
      real(wp), intent(in)    :: dt
      integer :: i, j, k
      real(wp) :: decay
      do concurrent(k=1:nz, j=1:nyv, i=1:nx) local(decay)
         if (idamp_v(i, j) > 0.0_wp) then
            decay = exp(-idamp_v(i, j)*dt)
            v(i, j, k) = relax_toward(v(i, j, k), v_ref(i, j, k), decay)
         end if
      end do
   end subroutine relax_map_v_impl