$! VAX/VMS command file 
$!
$! Purpose:
$!
$! This is an instruction of how to access the magnetic field, plasma waves,
$! low energy proton and electron fluxes and trajectory of Hawkeye. 
$!  
$!
$! Program required:
$!	hk_req.com    (included in the end of this file)
$!	request.exe      (the source code is request.for)
$!      hkmag_reform2vax.exe (the source code is hkmag_reform2vax.for)
$!      hkpwi_reform2vax.exe
$!	hkramp_reform2vax.exe
$!	mag_bin_xdr.pro
$!	pwi_bin_xdr.pro
$!	ramp_bin_xdr.pro
$!	traj_bin_xdr.pro
$!	tplot_hkmag.pro  (runs with IDL graphic package)
$!	rampcontour.pro (with rampload.pro ,etc.)
$!
$! Procedure:
$!
$! 1) submit a request to 	NDADSA::ARCHIVES
$!    with a subject		request Hawkeye all
$!
$!    an example of the content of the request: 
$! 
$!    7418412
$!    7418413
$!    7418414
$!    7418415
$!    7418416
$!    ...
$!    7418505
$!
$!
$!    This will request data for the time interval between 
$!    day 184 1200 UT,1974 to day 185 0500 UT, 1974.
$!
$!    >>> To Do this: run the batch file hk_req.com under vax/vms prompt
$!    "$@hk_req.com" and follow the instruction.
$!
$!
$!
$! 2) Wait for e-mail messages from NDADS which will tell you
$!    the status of the data requested. After you have the data
$!    ready to retrieve, ftp to ndads.gsfc.nasa.gov anonymously
$!    and type the following commands under ftp prompt:
$!    ...>binary
$!    ...>structure vms       (<---this works only for vax/vms system)
$!    ...>cd [data_dist.hawkeye]
$!    ...>get filename...
$!    ...>...
$!
$!
$! 3) To convert the magnetic field data and hk trajectory in the science 
$!    file to vax binary format of simple structure:
$!
$!    file hkmag*.dat
$!
$!    epoch, bt,colat,long
$!
$!    and
$!
$!    file hktra*.dat
$!
$!    epoch, r,mlat,mlt,lshell,xgsm,ygsm,zgsm
$!
$!    where epoch is in millisecond bt in nT, 
$!    colat (the polar angle), long (the azimuthal) in degrees and 
$!    the postion of Hawkeye r, xgsm, ygsm, zgsm in Re and mlat in 
$!    degrees and mlt in hours. All are in GSM coordinate.
$!
$!    >>> To do this, run hkmag_reform2vax under vms prompt and follow the 
$!    instructions.
$!
$!  4) to convert plasma wave data to vax binary format
$!
$!	run hkpwi_reform2vax.exe
$!
$!  5) to convert proton and electron flux to vax binary format
$!
$!	run hkramp_reform2vax.exe
$!
$!  6) To convert the binary format to xdr format (a machine independent format)
$!	under IDL prompt
$!     
$!     IDL>.run mag_bin_xdr.pro
$!
$!     to convert magnetic field data
$!     and
$!
$!     and the others...
$!
$!     IDL>.run pwi_bin_xdr.pro
$!     IDL>.run ramp_bin_xdr.pro
$!     IDL>.run traj_bin_xdr.pro
$!
$!  7) To plot magnetic field using IDL graphic package
$!     run tplot_hkmag.pro under IDL prompt and follow the instructions.
$!
$!
$!     On a VAX/VMS machine:
$!
$!	(to be added)
$!
$!     On a UNIX machine:
$!
$!	(to be added)
$!
$!   8) to plot ramp data (pie plot)
$!
$!   	on a unix or vax machine
$!
$!	IDL>.run rampcontour.pro
$!
$!    9) to be added
$!
$!------------------------------------------------------------------------
$!    The following commands are to request hawkeye data through NDADS
$!    automatic data extraction system. You must run it on the NSSDC 
$!    VAX Cluster. To run, type "@hkmag.readme", the file name of this file, 
$!    under VAX/VMS prompt.
$!    It will created a file called data.req containing the intervals you 
$!    requested and send the file to NDADS automatically.
$!    Note that you need an executable program called "request.exe", 
$!    the source code is called request.for.
$!
$IF P1 .EQS. "" THEN INQUIRE P1 "START TIME yydddhr? "
$IF P2 .EQS. "" THEN INQUIRE P2 " STOP TIME yydddhr? "
$open out_file temp.dat/write
$open out_file2 temp2.dat/write
$write out_file ''p1''
$write out_file ''p2''
$close out_file
$assign temp.dat sys$input
$assign temp2.dat sys$output
$ r request.exe
$ mail data.req ndadsa::archives/subject="request hawkeye all"
$close out_file2
$delete temp.dat;*
$delete temp2.dat;
$exit