Skip to content

Commit

Permalink
Move subgrid subroutine call out of openacc parallel region
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrus89 committed Jun 13, 2024
1 parent 9741e0b commit 8edf0a5
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
Original file line number Diff line number Diff line change
Expand Up @@ -2621,28 +2621,29 @@ subroutine ocn_diagnostic_solve_z_coordinates(layerThickness, zMid, zTop, ssh)!{
+ layerThickness(k ,iCell)
end do
if (config_use_subgrid_wetting_drying) then
call ocn_subgrid_ssh_lookup(layerThickness(1,iCell), &
subgridWetVolumeCellTable(:,iCell), &
subgridSshCellTableRange(:,iCell), &
bottomDepth(iCell), &
subgridCellBathymetryMin(iCell), &
ssh(iCell))
zTop(1,iCell) = ssh(iCell)
zMid(1,iCell) = -bottomDepth(iCell) + 0.5_RKIND*layerThickness(1,iCell)
else
! copy zTop(1,iCell) into sea-surface height array
ssh(iCell) = zTop(minLevelCell(iCell),iCell)
end if
! copy zTop(1,iCell) into sea-surface height array
ssh(iCell) = zTop(minLevelCell(iCell),iCell)
end do
#ifndef MPAS_OPENACC
!$omp end do
!$omp end parallel
#endif
if (config_use_subgrid_wetting_drying) then
do iCell = 1, nCells
call ocn_subgrid_ssh_lookup(layerThickness(1,iCell), &
subgridWetVolumeCellTable(:,iCell), &
subgridSshCellTableRange(:,iCell), &
bottomDepth(iCell), &
subgridCellBathymetryMin(iCell), &
ssh(iCell))
zTop(1,iCell) = ssh(iCell)
zMid(1,iCell) = -bottomDepth(iCell) + 0.5_RKIND*layerThickness(1,iCell)
end do
end if
end subroutine ocn_diagnostic_solve_z_coordinates!}}}
!***********************************************************************
Expand Down

0 comments on commit 8edf0a5

Please sign in to comment.