Skip to content

Commit

Permalink
Loop over computational domain in calculateBuoyancyFlux2d()
Browse files Browse the repository at this point in the history
- Replaced : with G%isc:G%iec for computation of buoyancy flux
  in calculateBuoyancyFlux2d().
- No answer changes.
  • Loading branch information
adcroft committed Jul 18, 2015
1 parent 9c37a3e commit 8c34e99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -756,15 +756,15 @@ subroutine calculateBuoyancyFlux2d(G, fluxes, optics, h, Temp, Salt, tv, &
real, dimension( SZI_(G) ) :: netS ! net saln flux (ppt m/s)
integer :: j

netT(:) = 0. ; netS(:) = 0.
netT(G%isc:G%iec) = 0. ; netS(G%isc:G%iec) = 0.

!$OMP parallel do default(none) shared(G,fluxes,optics,h,Temp,Salt,tv,buoyancyFlux,&
!$OMP netHeatMinusSW,netSalt) &
!$OMP firstprivate(netT,netS)
do j = G%jsc, G%jec
call calculateBuoyancyFlux1d(G, fluxes, optics, h, Temp, Salt, tv, j, buoyancyFlux(:,j,:), netT, netS )
if (present(netHeatMinusSW)) netHeatMinusSW(:,j) = netT(:)
if (present(netSalt)) netSalt(:,j) = netS(:)
if (present(netHeatMinusSW)) netHeatMinusSW(G%isc:G%iec,j) = netT(G%isc:G%iec)
if (present(netSalt)) netSalt(G%isc:G%iec,j) = netS(G%isc:G%iec)
enddo ! j

end subroutine calculateBuoyancyFlux2d
Expand Down

0 comments on commit 8c34e99

Please sign in to comment.