anchor.diff:  C Get parameters from the command line
   C----
         call gcmdln(x1,x2,nx,dx,y1,y2,ny,dy,z,ofile,p,ref,xsec,xz)
  -      !print *,'X1',x1,'X2',x2
  -      !print *,'Y1',Y1,'Y2',Y2
  -      !print *,'DX',dx,'NX',nx
  -      !print *,'DY',dy,'NY',ny
  -      !print *,(ref(i),i=1,5)
   C Check that limits and increments are properly defined
  -      if (x2.le.x1) call usage('!! Error: X2 is smaller than X1')
  -      if (y2.le.y1) call usage('!! Error: Y2 is smaller than Y1')
  +      if (x2.le.x1) call usage('!! Error: X2 must be greater than X1')
  +      if (y2.lt.y1) call usage('!! Error: Y2 must be greater than Y1')
         if (dx.le.0.0d0.and.nx.le.0.0d0) then
             call usage('!! Error: DX/NX unspecified')
         endif
  
positive.code:           dx = (x2-x1)/dble(nx-1)
        endif
  
        if (dy.gt.0.0d0) then
            ny = int((y2-y1)/dy)+1
        elseif (ny.lt.1) then
            call usage('!! Error: NY must be 1 or greater')
        elseif (ny.eq.1) then
            dy = 0.0d0
        else
            dy = (y2-y1)/dble(ny-1)
        endif
        !print *,'DX',dx,'NX',nx
        !print *,'DY',dy,'NY',ny
  
  C----
  C Generate grid
  
negative.code:       CHARACTER*40 tag,ofile
        REAL*8 x1,x2,y1,y2,z,dx,dy,ref(5)
        INTEGER narg,i,j,nx,ny,p,xsec,xz
  C Initialize variable values
        x1 = 0.0d0
        x2 = 0.0d0
        nx = -1
        dx = -1.0d0
        y1 = 0.0d0
        y2 = 0.0d0
        ny = -1
        dy = -1.0d0
        z = 0.0d0
  