anchor.diff:  alpha=t*sigma*vth*fwc**beta/2./vg
   g=nt*2.*vg/fwc**beta
   
  -DO i=1,xdim
  +DO i=1,ydim
      gamm = g * REAL(i)
      DO k=1,zdim
  -      DO j=1,ydim
  +      DO j=1,xdim
            nc=0.
            
            IF(s(i,j).gt.0.01)THEN
  
positive.code: REAL, DIMENSION(xdim,ydim), INTENT(in)  :: sinp
  REAL, DIMENSION(xdim,ydim), INTENT(out) :: sout
  REAL, INTENT(in) :: dob,rdose
  REAL :: no(ydim,zdim),sno(xdim,zdim)
  REAL :: s(ydim, ydim)
  INTEGER :: i,j,k
  
  
negative.code: ! flip data back to the input orientation
  DO i=1,xdim
     DO j=1,ydim
        sout(i+iflip*(xdim+1-2*i),j+jflip*(ydim+1-2*j)) = s(j,i)
     ENDDO
  ENDDO
  
  