      program rocot_example
c
c     ***************************************************************0**
c *   Rocot_Example: show example of Rocotlib use.
c     P. Robert, July 2000                                       
c     ***************************************************************0**
c
c
      print 100
      print 100, '*****************************************************'
      print 100
      print 100, 'ROCOTEXP:'
      print 100
c 
      call r_date(iyear,imonth,iday)
      call r_time(ih,im,is)
      call cv_date_to_doty(iyear,imonth,iday,idoy)
c
      print 100
      print 100, 'date: MM/JJ/YY =', imonth,iday,iyear
      print 100, 'time: HH/MM/SS =', ih,im,is
      print 100, 'day of the year=', idoy
c
      call cp_time_param(iyear,imonth,iday,ih,im,is)
      call g_gei_geo_sun_dir(sxgei,sygei,szgei,sxgeo,sygeo,szgeo)
      call t_gei_to_gsm(sxgei,sygei,szgei,sxgsm,sygsm,szgsm)
c
      print 100
      print 200, 'Sun in GEI:',sxgei,sygei,szgei
      print 200, 'Sun in GEO:',sxgeo,sygeo,szgeo
      print 200, 'Sun in GSM:',sxgsm,sygsm,szgsm
c
      call g_gei_geo_dipole_dir(dxgei,dygei,dzgei,dxgeo,dygeo,dzgeo)
      call t_gei_to_gsm(dxgei,dygei,dzgei,dxgsm,dygsm,dzgsm)
      call t_gei_to_mag(dxgei,dygei,dzgei,dxmag,dymag,dzmag)
      call t_gei_to_sm(dxgei,dygei,dzgei,dxsma,dysma,dzsma)
c
      print 100
      print 200, 'Dip in GEI:',dxgei,dygei,dzgei
      print 200, 'Dip in GEO:',dxgeo,dygeo,dzgeo
      print 200, 'Dip in GSM:',dxgsm,dygsm,dzgsm
      print 200, 'Dip in MAG:',dxmag,dymag,dzmag
      print 200, 'Dip in SM :',dxsma,dysma,dzsma
c
      print 100
      print 300, 'xyz in GEO=', -5.5, -12.5, -7.10
c
      call t_geo_to_gsm(-5.5, -12.5, -7.10,xgsm,ygsm,zgsm)
      call t_geo_to_gse(-5.5, -12.5, -7.10,xgse,ygse,zgse)
c
      print 300, 'xyz in GSM:', xgsm, ygsm, zgsm
      print 300, 'xyz in GSE:', xgse, ygse, zgse
c
      print 100
      print 100, '*****************************************************'
      print 100
c
  100 format(a,3i6)
  200 format(a,3f14.6)
  300 format(a,3f14.4)
       
      stop 'rocot_example.exe: normal termination'
      end
