anchor.diff:        real*8 angle
         external angle
   c
  +      continue
   c     print *, 'stnserod in initialize:', stnserod
         rho = 1000.d0
         grav = 9.8d0
  
positive.code: c           approximate Engelund diagram for subcritical flow:
              if (shields .ge. 0.1d0 .and. shields .lt. 1.d0 ) then
                 grainshields = 10.d0 ** (0.74d0 
       +                        * (log10(shields) + 1.03d0) ** 2.d0
       +                        - 1.18d0)
              else if (shields .ge. 1.d0 .and. shields .lt. 2.d0) then
                 grainshields = 0.4d0 * shields ** 2.d0
              else
                 ! if (shields .ge. 2.0 .or. shields .lt. 0.1) then
                 grainshields = shields
  
negative.code:       implicit none
        real*8 y, x
        intrinsic atan2
        continue
        if (x .ne. 0.0d0 .or. y .ne. 0.0d0) then
           angle = atan2(y, x)
        else
  