Aim: Returns sum of offsets through mask.
The routine declaration is:
integer function inMask(offX, offY, patabove) ! offX, offY: local column and row offsets ! patabove : 1 means count, 0 means ignore (like output of getpixelInE2) integer, dimension(-1:1), intent(in) :: offX, offY integer(kind=int16), dimension(-1:1,-1:1), intent(in) :: patabove