Skip to content

Commit

Permalink
Merge PR #165 into e3sm/maint-1.0
Browse files Browse the repository at this point in the history
Vertical index k=1 on activeTracerVerticalAdvectionTopFlux is the ocean
surface, so is always zero. It was using some uninitialized values when
using k=1, so start loop at k=2.

PR #165 was originally into ocean/develop, I'm just repeating into
e3sm/maint-1.0
  • Loading branch information
mark-petersen committed Jul 12, 2019
2 parents 95e121a + 4c61e09 commit ceac0bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core_ocean/shared/mpas_ocn_tracer_advection_mono.F
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,10 @@ subroutine ocn_tracer_advection_mono_tend(tracers, adv_coefs, adv_coefs_3rd, nAd
if (tracerGroupName == 'activeTracers') then
!$omp do schedule(runtime) private(k)
do iCell = 1, nCells
do k = 1, maxLevelCell(iCell)
do k = 2, maxLevelCell(iCell)
activeTracerVerticalAdvectionTopFlux(iTracer,k,iCell) = low_order_flux(k,iCell) + high_order_flux(k,iCell)
end do
do k = 1, maxLevelCell(iCell)
activeTracerVerticalAdvectionTendency(iTracer,k,iCell) = work_tend(k,iCell)
end do
end do ! iCell loop
Expand Down

0 comments on commit ceac0bc

Please sign in to comment.