anchor.diff:       +       Acs(*), dels(*), deln(*), 
        +       forcefactor, xmagcurvep1, xmagcurve, latvel,
        +       delAcs
  -      intrinsic cos
  +      intrinsic abs, cos
  +      continue
   c
         if (stations .ne. stnserod) then
            do s = 1, stations - 1
               if (width(s) .ne. 0.d0 .and. 
        +          width(s) .gt. 2.d0 * depth(s)) then
  -               forcefactor = rho * vel(s) ** 2.d0 / depth(s) 
  +               forcefactor = rho * vel(s) ** 2 / depth(s) 
        +              * (1.d0 - 2.d0 * depth(s) / width(s))
                  latforce(s) = 0.d0
                  lag(s) = 0.d0
  -               xmagcurvep1 = sign(curvature(s + 1), 1.d0) 
  -               xmagcurve = sign(curvature(s), 1.d0) 
  +               xmagcurvep1 = abs(curvature(s + 1)) 
  +               xmagcurve = abs(curvature(s)) 
                  if ((curvature(s + 1) * curvature(s) .gt. 0.d0 .and.
        +           xmagcurvep1 .gt. xmagcurve .and.
        +           xmagcurvep1 * width(s) .le. 2.d0) .or.
  
positive.code:       real*8 angle
        external angle
  c
  c     print *, 'stnserod in initialize:', stnserod
        rho = 1000.d0
        grav = 9.8d0
  
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
  