This text file contains the instructions for running and compiling 
  the Single Resolution Subsetting code.


The program is set up such that you have to compile the code once.
  After this initial compilation, you can tailor run parameters, 
  such as directory paths, file names, and input parameters by 
  altering the PERL script and three data files (in ./inputs, a
  Location List, an SDS list, a input granule path list).  These 
  changes in the PERL script and data files do NOT affect the 
  compiled code, such that a new compilation is NOT required.


To run this program, you must follow these steps:

1)  Run the shell script (in ./)to set up environmental variables.
	This is done through the source command.
    You need to set the directory paths for the HDF library and include files
       as well as f90 compiling flags.
        ex. source Environmental_Script

2)  If the code is not compiled, or you make adjustmens to 
	the code:
	a) Remove all old object and executables in the directory:
	        make -f *mk cleanall
	   or	rm -f *.exe. *.o *.mod *.exe
	b) Make the executable and object files:
	   make -f *mk

3)  Adjust the Location List file (in ./inputs/) to include the locations
        (lat/lon) that you wish to have subsetted.  This file includes 
	location names,	which will be a prefix to the subsetted granules
	 subsetted granule list file, and lat/lon/epsilon values.  
	(Note:  Use this file to specify the location of N number of 
	locations, N >= 1.)

4)  Adjust the list of SDS names (in ./inputs/) to be outputted to the 
	subsetted granules.
	(Note:  Lat and Lon are automatically outputted to the new granules,
	 so do not include these in your list).

5)  Adjust the Granule Path List (in ./inputs/) to include the locations
	of the L2 input	granules that you wish to be checked for subsetting.  
	Note that this list will be used for all locations.  (I.E. Each location
	can not have seperate lists of files; to do this set up the code
	to run seperately for each location).

6)  Adjust the PERL script (in ./) for your current run.  This includes 
	altering input and output file names and paths, print flags, minimum 
	useable box dimension, and MODXY being examined.

7)  Run the PERL script by typing in it's name on the command line.
	ex. RunSubsetter.pl


!**********************************************************************
Some important notes:

1)  The PERL script will create a text file containing the inputted parameters.
    It is hardwired into the F90 code that this file is named "F90Inputs.dat" and
    resides in the ./inputs directory.  If you alter the name of this file, or
    the path to something other than ./inputs/F90Inputs.dat, then you must make
    the same alterations to the F90 code.  Edit the file "inputs.f90".  The 
    variable ProgInputFileName will contain the path and file name.  Change this
    path and file name to the new path and file name used in the PERL script.
    Then you MUST recompile the code.

2)  There are three text files that are to be altered by the user to specify 
    the run.  Two of these files are read in by the PERL script (Locations file
    and the Paths of the L2 input granules.)  The other file is read in directly
    by the F90 code and specifies the SDS to be outputted.

3)  The PERL script generates a list of input L2 granules, whose name and path
    are specified in the PERL script, and is read in by the F90 code.

4)  The PERL script handles multiple locations by running the code multiple times.
    It accomplishes this by reading in data for just one location from the 
    locations file, creates an appropriate F90Inputs.dat and runs the F90 code.

5)  If you copy the code to a new directory, you must make sure that the perl script
    is executable.  If the perl script is not executable, you can change this 
    with the following command:
        	chmod 744 RunSubsetter.pl 

6)  If you wish to remove the object and mod files after the successful  
    compilation, use the following command:
		make -f *mk clean
    If you wish to remove the executable file as well, use the following
    command:
	        make -f make cleanall

7)  If an error occurs (such as file handling, HDF calls, etc.), the program 
    will print an error message to the screen and then exit the program.  The 
    error messages should provide sufficient detail to determine the cause
    of the error.
    
8)  The code was written by Eric Moody, Cloud Retrival Group, NASA GSFC, during
    the fall of 1999, with many of the modules and code design inspired by 
    codes written by Robert Pincus, former NASA GSFC programmer.
