anchor.diff:        do while (iarg <= narg - 1)
            call get_command_argument(iarg, arg)
            select case(arg)
  -            case('-g');     output_geog = .true.;      iarg = iarg + 1
  -            case('-t');     output_triangles = .true.; iarg = iarg + 1
  -            case default;   call usage
  +            case('-g');   output_geog = .true.;       iarg = iarg + 1
  +            case('-p');   call get_command_argument(iarg+1, st_cache_dir)
  +                                                      iarg = iarg + 2
  +            case('-t');   output_triangles = .true.;  iarg = iarg + 1
  +            case default; call usage
            end select
         enddo
         ! Get tesselation level
         call get_command_argument(narg, arg)
         read(arg,*) n
  +      t%level = n
         if (n < 0) call usage
      end subroutine get_args
   
  
positive.code: !===============================================================================
  program sph_tess
  !===============================================================================
  ! Dump the points for a level-n tesselation of a sphere, starting with an
  ! icosahedron.
  
     use sphere_tesselate
     use spherical_geometry
  
negative.code:          'icosahedron.  x, y, z values on the unit sphere are output to stdout.', &
           'n must be >= 0', &
           'Options:', &
           '   -g        : Write values as lon, lat instead of x, y, z', &
           '   -p [path] : Set directory path to precomputed tesselations', &
           '   -t        : Dump the triangles as multisegment lines'
        stop
     end subroutine usage
  
  