You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a bug in rigde_ana.F90. This code:
DO np = 1, 6
DO j=1-nhalo+1,ncube+nhalo-1,bloc
DO i=1-nhalo+1,ncube+nhalo-1,bloc
aa = terr_dev_halo(i:i+bloc,j:j+bloc,np)
ijaa = MAXLOC( aa )
im = ijaa(1)-1 + i
jm = ijaa(2)-1 + j
if ( terr_dev_halo(im,jm,np) >= thsh ) terr_max_halo(im,jm,np)= terr_dev_halo(im,jm,np)
END DO
END DO
can make terr_dev_halo go out of bounds when bloc>1 (array bounds for terr_dev_halo is DIMENSION(1-nhalo:ncube+nhalo, 1-nhalo:ncube+nhalo, 6).
My temporary fix is:
DO np = 1, 6
DO j=1-nhalo+1,ncube+nhalo-1,bloc
DO i=1-nhalo+1,ncube+nhalo-1,bloc
if (i-bloc<1-nhalo.or.j-bloc<1-nhalo.or.i+bloc>ncube+nhalo.or.j+bloc>ncube+nhalo) then
!out of bounds - skip
else
aa = terr_dev_halo(i:i+bloc,j:j+bloc,np)
ijaa = MAXLOC( aa )
im = ijaa(1)-1 + i
jm = ijaa(2)-1 + j
if ( terr_dev_halo(im,jm,np) >= thsh ) terr_max_halo(im,jm,np)= terr_dev_halo(im,jm,np)
end if
END DO
END DO
@JulioTBacmeister
I think there is a bug in rigde_ana.F90. This code:
can make terr_dev_halo go out of bounds when bloc>1 (array bounds for terr_dev_halo is DIMENSION(1-nhalo:ncube+nhalo, 1-nhalo:ncube+nhalo, 6).
My temporary fix is:
Discovered problem on Casper with:
The text was updated successfully, but these errors were encountered: