Skip to content

Commit

Permalink
Merge pull request #561 from adcroft/avoid-segv-obc-hor-visc
Browse files Browse the repository at this point in the history
Avoids a SEGV when OBC are not in use with bi-harmonic friction
  • Loading branch information
Hallberg-NOAA authored Jul 25, 2017
2 parents 3768379 + 552dc4c commit 8dc9bcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS,
v0(i,J) = CS%IDXDY2v(i,J)*(CS%DY2q(I,J)*sh_xy(I,J) - CS%DY2q(I-1,J)*sh_xy(I-1,J)) - &
CS%IDX2dyCv(i,J)*(CS%DX2h(i,j+1)*sh_xx(i,j+1) - CS%DX2h(i,j)*sh_xx(i,j))
enddo ; enddo
if (apply_OBC .and. OBC%zero_biharmonic) then
if (apply_OBC) then; if (OBC%zero_biharmonic) then
do n=1,OBC%number_of_segments
I = OBC%segment(n)%HI%IsdB ; J = OBC%segment(n)%HI%JsdB
if (OBC%segment(n)%is_N_or_S .and. (J >= Jsq-1) .and. (J <= Jeq+1)) then
Expand All @@ -594,7 +594,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS,
enddo
endif
enddo
endif
endif; endif
endif

do j=Jsq,Jeq+1 ; do i=Isq,Ieq+1
Expand Down

0 comments on commit 8dc9bcc

Please sign in to comment.