anchor.diff:          enddo
       enddo
   elseif (auto_mode.eq.'v') then
  +    proj_sta_file = 'station.proj'
  +    write(stdout,*) 'update_auto_stations: writing projected station coordinates to ', &
  +                    trim(proj_sta_file)
  +    open(unit=372,file=proj_sta_file,status='unknown')
       if (ymin.lt.2d3) then
           ymin = 0.0d0
       endif
       do i = 1,auto_n
  +        d = xmin + dble(i-1)*(xmax-xmin)/dble(auto_n-1)
  +        if (coord_type.eq.'geographic') then
  +            call distaz2lola(centroid(1),centroid(2),d/radius_earth_km,auto_az,lon,lat, &
  +                             'radians','degrees',ierr)
  +        elseif (coord_type.eq.'cartesian') then
  +            lon = centroid(1) + d*sin(auto_az*d2r)
  +            lat = centroid(2) + d*cos(auto_az*d2r)
  +        else
  +            call usage('update_auto_stations: no coord_type named '//trim(coord_type)//' (usage:misc)')
  +        endif
           do j = 1,auto_n
  -            d = xmin + dble(i-1)*(xmax-xmin)/dble(auto_n-1)
  -            if (coord_type.eq.'geographic') then
  -                call distaz2lola(centroid(1),centroid(2),d/radius_earth_km,auto_az,lon,lat, &
  -                                 'radians','degrees',ierr)
  -            elseif (coord_type.eq.'cartesian') then
  -                lon = centroid(1) + d*sin(auto_az*d2r)
  -                lat = centroid(2) + d*cos(auto_az*d2r)
  -            else
  -                call usage('update_auto_stations: no coord_type named '//trim(coord_type)//' (usage:misc)')
  -            endif
               stations((i-1)*auto_n+j,1) = lon
               stations((i-1)*auto_n+j,2) = lat
               stations((i-1)*auto_n+j,3) = ymin + dble(j-1)*(ymax-ymin)/dble(auto_n-1)
  +            write(372,'(3F12.4)') d,0.0d0,stations((i-1)*auto_n+j,3)
           enddo
       enddo
  +    close(372)
   else
       call usage('update_auto_stations: no auto_mode named '//trim(auto_mode)//' (usage:station)')
   endif
  
positive.code: if (verbosity.ge.1) then
      write(stdout,*) 'update_auto_stations: finished'
      write(stdout,*)
  endif
  
  return
  
negative.code: if (auto_mode.eq.'h'.or.auto_mode.eq.'v') then
      call update_auto_stations()
      call calc_deformation()
      if (auto_mode.eq.'v') then
          call project_deformation()
      endif
  endif
  
  end
  