Program e : llfxy, mscale, xyfll

      program proge
      implicit none

      real dlat,dlon,x,y,msf(20,20)
      
# compute latitude and longitude of a point
      print *,'( 6.0, 5.0 ) will be converted from polar'
      print *,'stereographic to lat-long and then back to p.s.'
      print *,''
# convert to ll
      call llfxy(dlat,dlon,6.0,5.0,20000.0,0.0,1)
      print *,'( 6.0, 5.0 ) p.s. equals (',dlat,',',dlon,' )',
     * ' lat-long'
# convert back to ps
      call xyfll(x,y,dlat,dlon,20000.0,0.0,1)
      print *,'The rms error on reconversion was:',
     * sqrt(0.5*((x-6.0)**2+(y-5.0)**2))
      print *,''
      
# compute the map-scale factor
      call mscale(msf,20000.0,10.0,10.0,20,20)
      print *,'The map-scale factor at (6.0,5.0) is:',msf(6,5)
      print *,msf
      stop
      end