Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/core_atmosphere/dynamics/mpas_atm_time_integration.F
Original file line number Diff line number Diff line change
Expand Up @@ -7127,12 +7127,12 @@ subroutine atm_compute_solve_diagnostics_work(nCells, nEdges, nVertices, &
logical :: reconstruct_v



call mpas_timer_start('atm_comp_solve_diag_7134')
!
! Compute height on cell edges at velocity locations
!
!$acc parallel default(present)
!$acc loop gang
!$acc loop gang worker
do iEdge=edgeStart,edgeEnd
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
Expand All @@ -7145,30 +7145,31 @@ subroutine atm_compute_solve_diagnostics_work(nCells, nEdges, nVertices, &
! the first openmp barrier below is set so that ke_edge is computed
! it would be good to move this somewhere else?

efac = dcEdge(iEdge)*dvEdge(iEdge)
!$acc loop vector
do k=1,nVertLevels
ke_edge(k,iEdge) = efac*u(k,iEdge)**2
ke_edge(k,iEdge) = dcEdge(iEdge)*dvEdge(iEdge)*u(k,iEdge)**2
end do

end do

!
! Compute circulation and relative vorticity at each vertex
!
!$acc loop gang
!$acc loop gang worker
do iVertex=vertexStart,vertexEnd
!$acc loop vector
do k=1,nVertLevels
vorticity(k,iVertex) = 0.0_RKIND
end do
!$acc loop seq
do i=1,vertexDegree
iEdge = edgesOnVertex(i,iVertex)
s = edgesOnVertex_sign(i,iVertex) * dcEdge(iEdge)
!DIR$ IVDEP
!$acc loop vector
do k=1,nVertLevels
!$acc loop vector
do k=1,nVertLevels
!$acc loop seq
do i=1,vertexDegree
iEdge = edgesOnVertex(i,iVertex)
s = edgesOnVertex_sign(i,iVertex) * dcEdge(iEdge)


vorticity(k,iVertex) = vorticity(k,iVertex) + s * u(k,iEdge)
end do
end do
Expand All @@ -7183,7 +7184,7 @@ subroutine atm_compute_solve_diagnostics_work(nCells, nEdges, nVertices, &
!
! Compute the divergence at each cell center
!
!$acc loop gang
!$acc loop gang worker
do iCell=cellStart,cellEnd
!$acc loop vector
do k=1,nVertLevels
Expand All @@ -7206,7 +7207,7 @@ subroutine atm_compute_solve_diagnostics_work(nCells, nEdges, nVertices, &
end do
end do
!$acc end parallel

call mpas_timer_stop('atm_comp_solve_diag_7134')

!$OMP BARRIER

Expand Down