Forward-Euler velocity update from the tendencies the compute step wrote into pv_flux_x / pv_flux_y. u_face_x(i, j) <- u_face_x(i, j) + dt * pv_flux_x(i, j) v_face_y(i, j) <- v_face_y(i, j) + dt * pv_flux_y(i, j) Split-explicit RK2 (Phase 4) wraps a pair of these around an RK2 averaging pass.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(coriolis_adv_t), | intent(in) | :: | this | |||
| type(barotropic_state_t), | intent(inout) | :: | bs | |||
| real(kind=wp), | intent(in) | :: | dt |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | nx_face | ||||
| integer, | private | :: | nx_vface | ||||
| integer, | private | :: | ny_face | ||||
| integer, | private | :: | ny_uface |
pure subroutine coriolis_adv_apply_tendencies_barotropic(this, bs, dt) !! Forward-Euler velocity update from the tendencies the !! compute step wrote into pv_flux_x / pv_flux_y. !! u_face_x(i, j) <- u_face_x(i, j) + dt * pv_flux_x(i, j) !! v_face_y(i, j) <- v_face_y(i, j) + dt * pv_flux_y(i, j) !! Split-explicit RK2 (Phase 4) wraps a pair of these around an !! RK2 averaging pass. type(coriolis_adv_t), intent(in) :: this type(barotropic_state_t), intent(inout) :: bs real(wp), intent(in) :: dt integer :: i, j, nx_face, ny_uface, nx_vface, ny_face nx_face = size(bs%u_face_x, 1) ny_uface = size(bs%u_face_x, 2) do concurrent(j=1:ny_uface, i=1:nx_face) bs%u_face_x(i, j) = bs%u_face_x(i, j) + dt*this%pv_flux_x%data(i, j, 1) end do nx_vface = size(bs%v_face_y, 1) ny_face = size(bs%v_face_y, 2) do concurrent(j=1:ny_face, i=1:nx_vface) bs%v_face_y(i, j) = bs%v_face_y(i, j) + dt*this%pv_flux_y%data(i, j, 1) end do end subroutine coriolis_adv_apply_tendencies_barotropic