Skip to content

Commit

Permalink
Make sure that MEKE%GME_snk is only used when the array is allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Jul 30, 2019
1 parent 06a7c46 commit 21fd427
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1288,8 +1288,12 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US,
if (k==1) then
do j=js,je ; do i=is,ie
MEKE%mom_src(i,j) = 0.
MEKE%GME_snk(i,j) = 0.
enddo ; enddo
if (associated(MEKE%GME_snk)) then
do j=js,je ; do i=is,ie
MEKE%GME_snk(i,j) = 0.
enddo ; enddo
endif
endif
if (MEKE%backscatter_Ro_c /= 0.) then
do j=js,je ; do i=is,ie
Expand Down

0 comments on commit 21fd427

Please sign in to comment.