diff --git a/distro/scripts/adl_cots.sh b/distro/scripts/adl_cots.sh
index e8b82f369fb92f33fbf40ec8e27ddf4bfbd6487c..eae3c5b18baf4956b78301425db5bcba77717454 100755
--- a/distro/scripts/adl_cots.sh
+++ b/distro/scripts/adl_cots.sh
@@ -449,17 +449,47 @@ mk_cminpak(){
 
 where()
 {
-    cd ${BUILD}
-    mkdir where
-    cd where
-    rm *.o
-    cp ${ADL_COTS}/getday.c .
-    cp ${ADL_COTS}/gettim.c .
-    cp ${ADL_COTS}/where.f .
-    
-    gfortran where.f gettim.c getday.c -o where
-    
-    cp where ${USER_COTS_PATH}/bin
+    echo "${FUNCNAME[0]}"
+    cd ${BUILD}  && \
+    mkdir where  && \
+    cd where  && \
+    rm "*.o"  && \
+    cp ${ADL_COTS}/getday.c .  && \
+    cp ${ADL_COTS}/gettim.c .  && \
+    cp ${ADL_COTS}/where.f .  && \
+    gfortran where.f gettim.c getday.c -o where  && \
+    cp where ${USER_COTS_PATH}/bin  && \
+    echo "${FUNCNAME[0]} finished" && \
+    return 0
+}
+
+
+nagg(){
+    echo "${FUNCNAME[0]}"
+
+    cd ${BUILD}  && \
+    tar_name=hdf5_HL_REGION-1.1.5.tar.gz  && \
+    rm -fr ${BUILD}/hdf5_HL_REGION*  && \
+    install_the_source ${tar_name}  && \
+    cd /hdf5_HL_REGION*  && \
+    export HDF5_INSTALL_DIR=${USER_COTS_PATH}  && \
+    export LDFLAGS="-static"  && \
+    make
+    make install
+    cd  ${BUILD}  && \
+    tar_name=nagg-1.6.2.tar.gz  && \
+    rm -fr ${BUILD}/nagg*  && \
+    install_the_source ${tar_name}  && \
+    cd nagg-1.6.2   && \ 
+    # Build nagg
+    patch -p1 <  ${COTS_HOME}/scripts/revised_nagg.patch   && \
+    ./configure --with-hlregion=${USER_COTS_PATH}/lib   && \
+    make   && \
+    make install   && \ 
+    cp nagg/bin/nagg ${USER_COTS_PATH}/bin   && \
+    unset LDFLAGS   && \ 
+    echo "${FUNCNAME[0]} finished" && \
+    return 0
 }
 
 wipe()
@@ -516,8 +546,50 @@ fix_links()
     return 0
 }
 
+_rpath_setter() {
+
+    DESIRED_RPATH=$1
+    ORIGIN_DIRECTORY=$2
+    cd $ORIGIN_DIRECTORY
+    EXES=$(ls *)
+    printf "Desired %s\n" '$DESIRED_RPATH'
+    for exe in ${EXES}; do
+        printf "Start for %s\n" $exe
+        #patchelf --remove-rpath $exe
+        patchelf --set-rpath $DESIRED_RPATH $exe
+        patchelf --shrink-rpath $exe
+        printf "Final for %s\n" $exe
+        patchelf --print-rpath $exe
+        ldd $exe
+    done
+}
+export ADL_HOME=${COTSBASE}/libexec/ADL
+patch_adl_rpaths() {
+
+    DESIRED_RPATH='$ORIGIN:$ORIGIN/../../bin:$ORIGIN/../../lib:$ORIGIN/../../lib64:$ORIGIN/../bin:$ORIGIN/../lib:'
+    _rpath_setter $DESIRED_RPATH ${ADL_HOME}/lib
+    _rpath_setter $DESIRED_RPATH ${ADL_HOME}/bin
+    DESIRED_RPATH='$ORIGIN:$ORIGIN/../../../bin:$ORIGIN/../../../lib:$ORIGIN/../../../lib64:$ORIGIN/../../bin:$ORIGIN/../../lib:'
+
+    _rpath_setter $DESIRED_RPATH ${ADL_HOME}/tools/bin
+
+    cd ${ADL_HOME}/bin
+    special=$(ls *.exe)
+    for spec in $special; do
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrAtmsController.so libProSdrAtmsController.so $spec
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrViirsGeoController.so libProSdrViirsGeoController.so $spec
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrViirsCalController.so libProSdrViirsCalController.so $spec
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrCrisFSController.so libProSdrCrisFSController.so $spec
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrOmpsNpEarthController.so libProSdrOmpsNpEarthController.so $spec
+        patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrOmpsTcEarthController.so libProSdrOmpsTcEarthController.so $spec
+
+    done
+
+}
+
 all()
 {
+        DESIRED_RPATH='$ORIGIN:$ORIGIN/../bin:$ORIGIN/../lib:$ORIGIN/../lib64:'
         wipe
     for_container && \
     mk_xerces && \
@@ -538,8 +610,14 @@ all()
     mk_libtool && \
     mk_cminpak && \
     mk_proto && \
+    where  && \
+    nagg && \
     fix_links && \
-    echo "COTS Built"
+    echo "COTS Built" && \
+    _rpath_setter $DESIRED_RPATH $USER_COTS_PATH/lib && \
+    _rpath_setter $DESIRED_RPATH $USER_COTS_PATH/lib64 && \
+    _rpath_setter $DESIRED_RPATH $USER_COTS_PATH/bin && \
+    echo "Rpaths patched"
 }
 
 adl()
diff --git a/distro/scripts/revised_nagg.patch b/distro/scripts/revised_nagg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d4eaec0e4b84baf53bba0cc788feb37fce0016b1
--- /dev/null
+++ b/distro/scripts/revised_nagg.patch
@@ -0,0 +1,620 @@
+diff --git a/src/nagg.h b/src/nagg.h
+index cc40e3d..aaaf194 100644
+--- a/src/nagg.h
++++ b/src/nagg.h
+@@ -51,10 +51,11 @@
+ #define NAGG_GRANVER_size       15	/* Granule version info size */
+ #define NAGG_DATE_size     	 8	/* Granule date info size */
+ #define NAGG_TIME_size     	14	/* Granule time info size */
++#define NAGG_PSN_size		 4      /* Granule platform short name (spacecraft) size */
+ #define NAGG_Granule_info_max	20000	/* Max number of granules managed */
+ #define NAGG_Product_list_max	42	/* Max number of products requested */
+ #define NAGG_outputfiles_max	42	/* Max number of output file names */
+-#define NPP_Product_max        123	/* Max number of NPP Products */
++#define NPP_Product_max        124	/* Max number of NPP Products */ /* add fs cris */
+ #define NPP_Geo_Location_max	20	/* Max number of NPP Geolocations products */
+ #define NPP_EQ_GEO_Products_max  3      /* Max number of GEO products with terrain corrected equivalents */
+ #define NAGG_Granules_selected_max 20000 /* Max number of granules selected */
+@@ -154,11 +155,12 @@ struct granule_t {
+ 						     */
+     iet_t   granule_start_time_IET;        	    /*granule start time. micro-sec since 1958 jan 1. */
+     iet_t   granule_end_time_IET;          	    /*granule end time */
+-    char    beginning_date[NAGG_DATE_size+1];  /*granule beginning date */
+-    char    beginning_time[NAGG_TIME_size+1];  /*granule beginning time */
+-    char    ending_time[NAGG_TIME_size+1];     /*granule ending time */
++    char    beginning_date[NAGG_DATE_size+1];       /*granule beginning date */
++    char    beginning_time[NAGG_TIME_size+1];       /*granule beginning time */
++    char    ending_time[NAGG_TIME_size+1];          /*granule ending time */
+     uint64_t    orbit_number;			    /*orbit number */
+     const char	*geofile;			    /*geolocation filename */
++    char    platform_sname[NAGG_PSN_size+1];        /*platform short name (spacecraft) */
+     const char	*file_in;       		    /*file in which the granule is */
+ };
+ 
+@@ -183,7 +185,7 @@ struct nppfileinfo_t {
+     int	 nproduct_id;			/* number of products in the file */
+     char product_id_list[DPID_NUM_MAX][DPID_size];
+     char geolocation_id[DPID_size];
+-    char *spacecraft;
++    char spacecraft[NAGG_PSN_size+1];
+     char *Start_date;
+     char Start_time[Data_time_size];
+     char Stop_time[Data_time_size];
+diff --git a/src/nagg_get_granules.c b/src/nagg_get_granules.c
+index dbd687a..4584f10 100644
+--- a/src/nagg_get_granules.c
++++ b/src/nagg_get_granules.c
+@@ -32,6 +32,7 @@ typedef struct {
+     int granule_input_index;
+     hid_t grpid;
+     char *geofile;
++    char platform_sname[NAGG_PSN_size+1];
+     granule_t **granArr;
+     /* number of granules added to the granule table */
+     int gran_num;
+@@ -45,9 +46,10 @@ static int g_gran_num;
+ static int process_input_files(char **file_list, int number_of_files,
+                char **products_list, int nproducts, geolocation_t geofiles_arg,
+                char *geoproduct, char **geofile_list, int *geo_file_number,
+-               granule_p_t *granule_info_p, unsigned long max_granules);
++               granule_p_t granule_info_p, unsigned long max_granules);
+ static int get_geofile_refs(char *geoproduct, char *geofile_buf, 
+                             geolocation_t geofiles_arg, hid_t file, GranF_data *grp_dat_p);
++
+ static int get_input_file_granules(hid_t grp, char **products_list, int nproducts, 
+                                    int *nproducts_found, GranF_data *grp_dat_p); 
+ static int get_input_file_geo_granules(hid_t grp, char *geoproduct, GranF_data *grp_dat_p);
+@@ -55,6 +57,7 @@ void add_file_to_geofile_list(int addpath, char *geofilepath, int *geo_file_numb
+                               char **geofile_list, GranF_data *grp_dat_p);
+ static int check_products_found(char **products_list, int nproducts, char *geoproduct); 
+ static int get_n_geo_ref_value(hid_t file, char *geofile_buf);
++static int get_platform_value(hid_t file, char *platform_buf);
+ static int get_group_granules (hid_t loc_id, const char *name, void *operator_data);
+ static int get_granule_info (hid_t loc_id, const char *name, void *operator_data);
+ static int get_string_attribute_value(hid_t loc_id, const char * dsetname, 
+@@ -351,7 +354,7 @@ static int
+ process_input_files(char **file_list, int number_of_files,
+     char **products_list, int nproducts, geolocation_t geofiles_arg,
+     char *geoproduct, char **geofile_list, int *geo_file_number,
+-    granule_p_t *granule_info_p, unsigned long max_granules) 
++    granule_p_t granule_info_p, unsigned long max_granules)
+ {
+     int status = SUCCEED;
+     int i, j;
+@@ -360,6 +363,7 @@ process_input_files(char **file_list, int number_of_files,
+     hid_t subgrp = -1;  /* File and group identifiers */
+     char *geofilepath = NULL;
+     char *geofile_buf = NULL;
++    char *platform_buf=NULL;
+     htri_t retval;
+     char *pos = NULL;
+     int nproducts_found = 0;
+@@ -435,7 +439,17 @@ process_input_files(char **file_list, int number_of_files,
+             NAGG_ERROR("process_input_files(): Failed to get geofile reference from product file.\n");
+             goto done; 
+         }
+- 
++
++        /*
++         * get the 3 character spacecraft code from the input file's 
++         * Platform_Short_Name attribute. The attribute should always exist
++         * so it's an error if it's missing.
++         */
++        if ((status = get_platform_value(file, grp_dat.platform_sname)) < 0) {
++            NAGG_ERROR("process_input_files(): Failed to get platform reference from product file.\n");
++            goto done;
++        }
++        
+         /* for debugging, add all granules.  This will add all product
+            and geoproduct granules in the input file as well as in the GEO files*/
+         if(get_option_debug) {
+@@ -918,6 +932,51 @@ done:
+ }
+ 
+ /*-------------------------------------------------------------------------
++ * Function:   get_platform_value
++ *
++ * Purpose:    get 3 character spacecraft ID code from Platform_Short_Name
++ *             attribute in input file
++ *
++ * Parameters:
++ *    file:          IN: id of file containing Platform_Short_Name attribute
++ *    platform_buf:  IN-OUT: buffer to return value
++ *
++ * Return:     0 if successful, -1 otherwise
++ *-------------------------------------------------------------------------
++ */
++static int
++get_platform_value(hid_t file, char *platform_buf)
++{
++    int status = SUCCEED;
++    hid_t   attr;
++    hid_t   atype, atype_mem;    /* Attribute type */
++    H5T_class_t  type_class;
++
++    if((attr = H5Aopen(file, "Platform_Short_Name", H5P_DEFAULT)) < 0) {
++        fprintf(stderr, "Failed to open attribute /Platform_Short_Name.\n");
++        status = FAIL;
++        goto done;
++    } else if(( atype = H5Aget_type(attr))< 0) {
++        fprintf(stderr, "Failed to get type for attribute /Platform_Short_Name.\n");
++        status = FAIL;
++    } else if((type_class = H5Tget_class(atype)) < 0) {
++        fprintf(stderr, "Failed to get type class for attribute /Platform_Short_Name.\n");
++        status = FAIL;
++    } else if ((atype_mem = H5Tget_native_type(atype, H5T_DIR_ASCEND)) < 0) {
++        fprintf(stderr, "Failed to get type class for attribute /Platform_Short_Name.\n");
++        status = FAIL;
++    } else if ((status  = H5Aread(attr, atype_mem, platform_buf)) < 0) {
++        fprintf(stderr, "Failed to read attribute /Platform_Short_Name.\n");
++        status = FAIL;
++    }
++
++    status = H5Aclose(attr);
++done:
++    return status;
++}
++
++
++/*-------------------------------------------------------------------------
+  * Function:   get_last_created_geofile
+  *
+  * Purpose:    Get the filename with the latest creation time from multiple 
+@@ -1304,6 +1363,16 @@ get_geo_granules(hid_t file, char *geofile, char *geoproduct,
+     GranF_data grp_dat;
+ 
+     /*
++     * get the 3 character spacecraft code from the input file's 
++     * N_Platform_Short_Name attribute. The attribute should always exist
++     * so it's an error if it's missing.
++     */
++    if ((status = get_platform_value(file, grp_dat.platform_sname)) < 0) {
++        NAGG_ERROR("get_geo_granules(): Failed to get platform reference from product file.\n");
++        goto done;
++    }
++        
++    /*
+      * Open each subgroup of /Data_Products, get attributes of each Gran_n dataset
+      * and add each granule to the list.
+      */
+@@ -1505,8 +1574,14 @@ static int get_group_granules (hid_t loc_id, const char *name, void *operator_da
+              * the path is relative or absolute in the case of the testfiles
+              * depends on which was used for configure.  Using just the file
+              * name so make check will not fail. 
++             * Advance pointer to character after '/' if it is found, otherwise
++             * set it to granf_dat->filepath to print the filename.
+              */
+-            pos = 1 + strrchr(granf_dat->filepath, '/');
++            if (pos = strrchr(granf_dat->filepath, '/'))
++                pos +=1;
++            else
++                pos = granf_dat->filepath;
++
+             NAGG_ERROR("get_group_granules():  The /Data_Products/");            
+             fprintf(stderr, "%s group in the file %s has fewer than the %d granules claimed in its %s/AggregateNumberGranules attribute.\n", name, pos, aggr_num_granules, aggrName);
+             goto done;
+@@ -1564,7 +1639,7 @@ get_granule_info (hid_t loc_id, const char *name, void *operator_data)
+ 	status = FAIL;
+ 	goto done;
+     }
+-    granf_dat->granArr[g_gran_num] = (granule_t *)HDmalloc(sizeof(granule_t));
++    granf_dat->granArr[g_gran_num] = (granule_t *)HDcalloc(1, sizeof(granule_t));
+     if (granf_dat->granArr[g_gran_num] == NULL) {
+         fprintf(stderr, "Error allocating memory for granule_info_array[%d].\n", g_gran_num);
+         status = FAIL;
+@@ -1604,6 +1679,9 @@ get_granule_info (hid_t loc_id, const char *name, void *operator_data)
+         }
+     }
+ 
++    HDstrncpy(granf_dat->granArr[g_gran_num]->platform_sname,
++              granf_dat->platform_sname, NAGG_PSN_size+1);
++
+     if((status = get_string_attribute_value(dset, name, "N_Granule_Version",
+         granf_dat->granArr[g_gran_num]->granule_version, H5P_DEFAULT)) < 0)
+        goto done;
+@@ -1761,12 +1839,12 @@ nagg_print_granules(granule_t *granArr[], int number_of_granules)
+ 
+     /* print header first time only. */
+     printf("Printing Granules Read\n");
+-    printf("Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Filename, Geo Filename\n");
++    printf("Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Platform Short Name, Filename, Geo Filename\n");
+     }
+ 
+     for(i = 0; i<number_of_granules; ++i) {
+ 
+-        printf("%s, %s, %s, %d, %s, %d, %llu, %llu, %s, %s, %s, %llu, %s, %s\n",
++        printf("%s, %s, %s, %d, %s, %d, %llu, %llu, %s, %s, %s, %llu, %s, %s, %s\n",
+            granArr[i]->granule_id,
+            granArr[i]->product_id,
+            granArr[i]->product_name,
+@@ -1779,6 +1857,7 @@ nagg_print_granules(granule_t *granArr[], int number_of_granules)
+            granArr[i]->beginning_time,
+            granArr[i]->ending_time,
+            granArr[i]->orbit_number,
++           granArr[i]->platform_sname,
+            granArr[i]->file_in,
+            stringval(granArr[i]->geofile));
+ 
+diff --git a/src/nagg_main.c b/src/nagg_main.c
+index df5f9ab..e0a63e1 100644
+--- a/src/nagg_main.c
++++ b/src/nagg_main.c
+@@ -83,9 +83,9 @@ nagg_report(const char *outfile, int ngranules)
+ int
+ main(int argc, char * const argv[]){
+     granule_p_t granule_info;
+-    granule_p_t *sensor_p;		/* sensor data granule */
+-    granule_p_t *geo_p;			/* Geolocation granule */
+-    granule_p_t *next_p;		/* Next granule in granule table*/
++    granule_p_t sensor_p;		/* sensor data granule */
++    granule_p_t geo_p;			/* Geolocation granule */
++    granule_p_t next_p;		/* Next granule in granule table*/
+     granule_p_t *granules_selected;
+     					/* selected granules to be written */
+     int		total_granules_file;	/* total granules per file */
+@@ -103,6 +103,9 @@ main(int argc, char * const argv[]){
+     char       *max_granules_ptr;
+     unsigned long max_granules_info;
+     unsigned long max_granules_selected;
++    const char *spcrft="j01";
++
++    spcrft=getenv("CRAFT");
+ 
+     max_granules_ptr = getenv("NAGG_MAX_GRANULES");
+     if (max_granules_ptr) {
+@@ -113,7 +116,7 @@ main(int argc, char * const argv[]){
+         max_granules_selected = NAGG_Granules_selected_max;
+     }
+     granule_info_array = (granule_t *)HDcalloc(max_granules_info, sizeof(granule_t *));
+-    granules_selected = (granule_t *)HDcalloc(max_granules_selected, sizeof(granule_t *));
++    granules_selected = (granule_t **)HDcalloc(max_granules_selected, sizeof(granule_t *));
+     /* initialization */
+     granule_info = granule_info_array;
+     /* initialization */
+@@ -191,7 +194,7 @@ main(int argc, char * const argv[]){
+     /*=============================*/
+     /* sort the granules info list */
+     /*=============================*/
+-    nagg_sort_granules(granule_info, number_of_granules);
++    nagg_sort_granules(granule_info_array, number_of_granules);
+ #ifdef DEBUG
+     printf("After return from nagg_sort_granules, dumping granule_info:\n");
+     printf("number_of_granules=%d\n", number_of_granules);
+diff --git a/src/nagg_product.c b/src/nagg_product.c
+index 1401e6e..d3ebbc4 100644
+--- a/src/nagg_product.c
++++ b/src/nagg_product.c
+@@ -56,6 +56,7 @@ nppproduct_t product_table[NPP_Product_max] =
+ "SATMR",        "ATMS-REMAP-SDR",        		31997000,	"GATRO",
+ "SATMS",        "ATMS-SDR",                        	31997000, 	"GATMO",
+ "SCRIS",        "CrIS-SDR",                             31997000, 	"GCRSO",
++"SCRIF",        "CrIS-FS-SDR",                          31997000,       "GCRSO",
+ "SOMPS",        "OMPS-NP-SDR",                	        37405000, 	"GONPO",
+ "SOMTC",        "OMPS-TC-SDR",                 	        37405000, 	"GOTCO",
+ "SOMSC",        "OMPS-TC-Cal-SDR",     		        2700000000ULL, 	"GOSCO",
+diff --git a/src/nagg_select_granules.c b/src/nagg_select_granules.c
+index 9b8f3c8..a7d60c9 100644
+--- a/src/nagg_select_granules.c
++++ b/src/nagg_select_granules.c
+@@ -121,7 +121,7 @@ static int add_tmp_granule(granule_p_t granule_info_p[], int number_of_granules,
+ 
+     oldp = granule_info_p[number_of_granules-1];
+ 
+-    if (NULL==(newp=(granule_p_t)HDmalloc(sizeof(granule_t)))){
++    if (NULL==(newp=(granule_p_t)HDcalloc(1, sizeof(granule_t)))){
+ 	NAGG_ERROR("add_tmp_granule(): malloc failed\n");
+ 	return(FAIL);
+     };
+@@ -343,7 +343,7 @@ compose_output_fname(granule_p_t selected_granules[], int number_of_granules,
+     granule_p_t	firstgranule_p=NULL, lastgranule_p;
+     char   buf[64];
+     const char *const_pt;
+-    int    i;
++    int    i, j = 0;
+     int	   total_products;	/* Sensor plus possible Geolocation */
+     int	   noutfiles=0;		/* number of output file names generated. */
+     int	   ret_code=SUCCEED;
+@@ -397,7 +397,10 @@ compose_output_fname(granule_p_t selected_granules[], int number_of_granules,
+ 
+     /* Gather information to generate the Tail. */
+     /* get spacecraft from 1st granule */
+-    newfile.spacecraft = "npp"; /*not available now. set to "npp" */
++    do {
++        newfile.spacecraft[j] = tolower(firstgranule_p->platform_sname[j]);
++    } while (j++ < NAGG_PSN_size);
++    newfile.spacecraft[j] = 0;
+ 
+     /* get Start_date, Start_time and orbilastgranule_p number from 1st granule.
+      * Format of time in granules is: HHMMSS.ssssssZ.
+@@ -418,7 +421,7 @@ compose_output_fname(granule_p_t selected_granules[], int number_of_granules,
+     /* get Stop_time from last granule for this file */
+     HDcpyFileTimeFromGranTime(newfile.Stop_time, lastgranule_p->ending_time);
+ 
+-    /* CalculaTe Creation_date (current date/time in UTC)*/
++    /* Calculate Creation_date (current date/time in UTC)*/
+     {
+ 	struct  timeval now;
+ 	struct  tm	*tm;
+@@ -430,7 +433,7 @@ compose_output_fname(granule_p_t selected_granules[], int number_of_granules,
+ 	    goto done;
+ 	}
+ 	/* user %06ld for tv_usec which is a long */
+-	sprintf(buf, "%04d%02d%02d%02d%02d%02d%06ld",
++	snprintf(buf, Creation_date_size + 1, "%04d%02d%02d%02d%02d%02d%06ld",
+ 	    1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
+ 	    tm->tm_hour, tm->tm_min, tm->tm_sec, now.tv_usec);
+ 	HDmemcpy(newfile.Creation_date, buf, Creation_date_size);
+diff --git a/test/testfiles/redro1-dump.txt b/test/testfiles/redro1-dump.txt
+index b6bb778..0db4f68 100644
+--- a/test/testfiles/redro1-dump.txt
++++ b/test/testfiles/redro1-dump.txt
+@@ -15,36 +15,36 @@ Produced   1 granules in GCRIO-REDRO_npp_d20030125_t0709519_e0710217_b00014_cYYY
+ Produced   1 granules in GCRIO-REDRO_npp_d20030125_t0710239_e0710537_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Produced   1 granules in GCRIO-REDRO_npp_d20030125_t0710559_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Printing Granules Read
+-Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Filename, Geo Filename
+-NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703253_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703253_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014043, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, GCRIO-REDRO_npp_d20030125_t0703253_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, GCRIO-REDRO_npp_d20030125_t0703253_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0704292_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0704292_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014682, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, GCRIO-REDRO_npp_d20030125_t0704292_e0705012_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, GCRIO-REDRO_npp_d20030125_t0704292_e0705012_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015002, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, GCRIO-REDRO_npp_d20030125_t0705012_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, GCRIO-REDRO_npp_d20030125_t0705012_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0706057_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0706057_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015642, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0706079_e0706377_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0706079_e0706377_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015962, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0706399_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0706399_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0707417_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0707417_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016602, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707439_e0708137_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707439_e0708137_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016922, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708159_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708159_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0709177_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0709177_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017562, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0709199_e0709497_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0709199_e0709497_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017882, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0709519_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0709519_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0710537_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0710537_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018522, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710559_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710559_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Platform Short Name, Filename, Geo Filename
++NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703253_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703253_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014043, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703253_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703253_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0704292_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0704292_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014682, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0704292_e0705012_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0704292_e0705012_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015002, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0705012_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0705012_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0706057_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0706057_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015642, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0706079_e0706377_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0706079_e0706377_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015962, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0706399_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0706399_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0707417_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0707417_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016602, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707439_e0708137_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707439_e0708137_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016922, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708159_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708159_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0709177_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0709177_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017562, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0709199_e0709497_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0709199_e0709497_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017882, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0709519_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0709519_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0710537_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0710537_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018522, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710559_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710559_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+diff --git a/test/testfiles/redro3-dump.txt b/test/testfiles/redro3-dump.txt
+index 6e5e560..b0e97f4 100644
+--- a/test/testfiles/redro3-dump.txt
++++ b/test/testfiles/redro3-dump.txt
+@@ -5,36 +5,36 @@ Produced   3 granules in GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYY
+ Produced   3 granules in GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Produced   2 granules in GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Printing Granules Read
+-Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Filename, Geo Filename
+-NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014043, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014682, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015002, REDRO, CrIMSS-EDR, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015642, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015962, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016602, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016922, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017562, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017882, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018522, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Platform Short Name, Filename, Geo Filename
++NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014043, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014682, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015002, REDRO, CrIMSS-EDR, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, GCRIO-REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015642, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015962, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016602, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016922, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017562, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017882, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018522, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, GCRIO-REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+diff --git a/test/testfiles/redro3S-dump.txt b/test/testfiles/redro3S-dump.txt
+index 512fa6c..b25c0a8 100644
+--- a/test/testfiles/redro3S-dump.txt
++++ b/test/testfiles/redro3S-dump.txt
+@@ -11,36 +11,36 @@ Produced   3 granules in GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDH
+ Produced   2 granules in REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Produced   2 granules in GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Printing Granules Read
+-Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Filename, Geo Filename
+-NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212014043, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212014682, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212015002, REDRO, CrIMSS-EDR, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212015642, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212015962, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212016602, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212016922, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212017562, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212017882, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212018522, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+-NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Platform Short Name, Filename, Geo Filename
++NPP001212013723, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212014043, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, REDRO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212013723, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169405306000, 1422169437303000, 20030125, 070253.306000Z, 070325.303000Z, 993, NPP, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014043, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169437303000, 1422169469300000, 20030125, 070325.303000Z, 070357.300000Z, 993, NPP, GCRIO_npp_d20030125_t0702533_e0703573_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014363, REDRO, CrIMSS-EDR, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212014682, REDRO, CrIMSS-EDR, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212015002, REDRO, CrIMSS-EDR, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, REDRO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212014363, GCRIO, CrIMSS-EDR-GEO-TC, 0, N/A, -1, 1422169469300000, 1422169501297000, 20030125, 070357.300000Z, 070429.297000Z, 993, NPP, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212014682, GCRIO, CrIMSS-EDR-GEO-TC, 1, N/A, -1, 1422169501297000, 1422169533294000, 20030125, 070429.297000Z, 070501.294000Z, 993, NPP, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015002, GCRIO, CrIMSS-EDR-GEO-TC, 2, N/A, -1, 1422169533294000, 1422169565291000, 20030125, 070501.294000Z, 070533.291000Z, 993, NPP, GCRIO_npp_d20030125_t0703573_e0705332_b00993_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015322, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212015642, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212015962, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, REDRO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212015322, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169567941156, 1422169597741156, 20030125, 070535.941156Z, 070605.741156Z, 14, NPP, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015642, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169599941156, 1422169629741156, 20030125, 070607.941156Z, 070637.741156Z, 14, NPP, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212015962, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169631941156, 1422169661741156, 20030125, 070639.941156Z, 070709.741156Z, 14, NPP, GCRIO_npp_d20030125_t0705359_e0707097_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016282, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212016602, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212016922, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, REDRO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212016282, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169663941156, 1422169693741156, 20030125, 070711.941156Z, 070741.741156Z, 14, NPP, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016602, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169695941156, 1422169725741156, 20030125, 070743.941156Z, 070813.741156Z, 14, NPP, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212016922, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169727941156, 1422169757741156, 20030125, 070815.941156Z, 070845.741156Z, 14, NPP, GCRIO_npp_d20030125_t0707119_e0708457_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017242, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212017562, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212017882, REDRO, CrIMSS-EDR, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, REDRO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212017242, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169759941156, 1422169789741156, 20030125, 070847.941156Z, 070917.741156Z, 14, NPP, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017562, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169791941156, 1422169821741156, 20030125, 070919.941156Z, 070949.741156Z, 14, NPP, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212017882, GCRIO, CrIMSS-EDR-GEO-TC, 2, A1, 1, 1422169823941156, 1422169853741156, 20030125, 070951.941156Z, 071021.741156Z, 14, NPP, GCRIO_npp_d20030125_t0708479_e0710217_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018202, REDRO, CrIMSS-EDR, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212018522, REDRO, CrIMSS-EDR, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, REDRO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
++NPP001212018202, GCRIO, CrIMSS-EDR-GEO-TC, 0, A1, 1, 1422169855941156, 1422169885741156, 20030125, 071023.941156Z, 071053.741156Z, 14, NPP, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP001212018522, GCRIO, CrIMSS-EDR-GEO-TC, 1, A1, 1, 1422169887941156, 1422169917741156, 20030125, 071055.941156Z, 071125.741156Z, 14, NPP, GCRIO_npp_d20030125_t0710239_e0711257_b00014_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+diff --git a/test/testfiles/satms_tatms2m-dump.txt b/test/testfiles/satms_tatms2m-dump.txt
+index 5597e87..45f99d3 100644
+--- a/test/testfiles/satms_tatms2m-dump.txt
++++ b/test/testfiles/satms_tatms2m-dump.txt
+@@ -2,19 +2,19 @@ Produced   2 granules in GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b0225
+ Produced   2 granules in GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Produced   1 granules in GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5
+ Printing Granules Read
+-Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Filename, Geo Filename
+-NPP000141695514, SATMS, ATMS-SDR, 0, A1, 1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 2250, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141695834, SATMS, ATMS-SDR, 1, A1, 1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 2250, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141695514, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 2250, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141695834, GATMO, ATMS-SDR-GEO, 1, A1, 1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 2250, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-N/A, TATMS, ATMS-TDR, 0, N/A, -1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 993, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-N/A, TATMS, ATMS-TDR, 1, N/A, -1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 993, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696154, SATMS, ATMS-SDR, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696474, SATMS, ATMS-SDR, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696154, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696474, GATMO, ATMS-SDR-GEO, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696154, TATMS, ATMS-TDR, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696474, TATMS, ATMS-TDR, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696794, SATMS, ATMS-SDR, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696794, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+-NPP000141696794, TATMS, ATMS-TDR, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++Granule ID, DPID, Product Name, Gran Index, Granule Version, Granule Version Number, Granule Start Time IET,Gran End Time IET, Beginning Date, Beginning Time, Ending Time, Beginning Orbit Number, Platform Short Name, Filename, Geo Filename
++NPP000141695514, SATMS, ATMS-SDR, 0, A1, 1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141695834, SATMS, ATMS-SDR, 1, A1, 1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141695514, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141695834, GATMO, ATMS-SDR-GEO, 1, A1, 1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++N/A, TATMS, ATMS-TDR, 0, N/A, -1, 1712188786351413, 1712188817973018, 20120403, 235912.351413Z, 235943.973018Z, 993, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++N/A, TATMS, ATMS-TDR, 1, N/A, -1, 1712188818351406, 1712188849973022, 20120403, 235944.351406Z, 000015.973022Z, 993, NPP, GATMO-SATMS-TATMS_npp_d20120403_t2359123_e0000159_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696154, SATMS, ATMS-SDR, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696474, SATMS, ATMS-SDR, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696154, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696474, GATMO, ATMS-SDR-GEO, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696154, TATMS, ATMS-TDR, 0, A1, 1, 1712188850351402, 1712188881973026, 20120404, 000016.351402Z, 000047.973026Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696474, TATMS, ATMS-TDR, 1, A1, 1, 1712188882351406, 1712188913973014, 20120404, 000048.351406Z, 000119.973014Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0000163_e0001199_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696794, SATMS, ATMS-SDR, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696794, GATMO, ATMS-SDR-GEO, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
++NPP000141696794, TATMS, ATMS-TDR, 0, A1, 1, 1712188914351402, 1712188945973019, 20120404, 000120.351402Z, 000151.973019Z, 2250, NPP, GATMO-SATMS-TATMS_npp_d20120404_t0001203_e0001519_b02250_cYYYYMMDDHHMMSSssssss_XXXX_XXX.h5, (null)
+diff --git a/test/testfiles/usage.txt b/test/testfiles/usage.txt
+index d711d0e..2e7e400 100644
+--- a/test/testfiles/usage.txt
++++ b/test/testfiles/usage.txt
+@@ -27,6 +27,7 @@ IICMS     VIIRS-CM-IP-SUB                 	  85350000  GMODO
+ SATMR     ATMS-REMAP-SDR                  	  31997000  GATRO
+ SATMS     ATMS-SDR                        	  31997000  GATMO
+ SCRIS     CrIS-SDR                        	  31997000  GCRSO
++SCRIF     CrIS-FS-SDR                     	  31997000  GCRSO
+ SOMPS     OMPS-NP-SDR                     	  37405000  GONPO
+ SOMTC     OMPS-TC-SDR                     	  37405000  GOTCO
+ SOMSC     OMPS-TC-Cal-SDR                 	2700000000  GOSCO
diff --git a/distro/tars/getday.c b/distro/tars/getday.c
new file mode 100755
index 0000000000000000000000000000000000000000..b366ac89e154b29cf3fd6be0a8d8621b7cda0b2e
--- /dev/null
+++ b/distro/tars/getday.c
@@ -0,0 +1,33 @@
+#include <time.h>
+	
+#if defined(sun)
+  void getday_(int *);
+#else
+  void getday_(int *iday);
+#endif
+	
+#if defined(sun)
+  void getday_(int *iday)
+#else
+  void getday_(int *iday)
+#endif
+	
+/**** McIDAS-AIX Revision History *** */
+/* 1 GETDAY.C 25-Sep-90,11:46:52,`DAVES' First release                       */
+/* 2 GETDAY.C 2-Jan-91,11:54:18,`SMG' change revision history lines          */
+/* 3 GETDAY.C 3-Jan-91,10:48:38,`DAVES' Released                             */
+/* 4 GETDAY.C 11-Feb-91,14:55:24,`SMG' add conditional compile option        */
+/* 5 GETDAY.C 8-Jul-91,15:52:00,`SUEG' conform to ANSI standards             */
+/* 6 GETDAY.C 9-Jul-91,13:43:04,`SUEG' ta e getgrax.c                        */
+/**** McIDAS-AIX Revision History *** */
+/*
+   Return current day (YYDDD)
+*/
+{
+   struct tm *timexx;
+   time_t nowtime;
+	
+   time(&nowtime);
+   timexx = gmtime(&nowtime);
+   *iday = timexx->tm_year * 1000 + timexx->tm_yday + 1;
+}
diff --git a/distro/tars/gettim.c b/distro/tars/gettim.c
new file mode 100755
index 0000000000000000000000000000000000000000..4bc440834bf4c91164f0571d914e40f4d0b58961
--- /dev/null
+++ b/distro/tars/gettim.c
@@ -0,0 +1,33 @@
+#include <time.h>
+	
+#if defined(sun)
+   void gettim_(long int *);
+#else
+   void gettim_(long int *);
+#endif
+	
+#if defined(sun)
+   void gettim_(long int *itime)
+#else
+   void gettim_(long int *itime)
+#endif
+	
+/**** McIDAS-AIX Revision History *** */
+/* 1 GETTIM.C 25-Sep-90,11:46:46,`DAVES' First release                       */
+/* 2 GETTIM.C 2-Jan-91,11:54:18,`SMG' change revision history comment lines  */
+/* 3 GETTIM.C 3-Jan-91,12:12:20,`SMG' released                               */
+/* 4 GETTIM.C 11-Feb-91,14:55:22,`SMG' add conditional compile option        */
+/* 5 GETTIM.C 8-Jul-91,16:41:24,`SUEG' conform to ANSI standards             */
+/* 6 GETTIM.C 9-Jul-91,13:43:56,`SUEG' resequence                            */
+/**** McIDAS-AIX Revision History *** */
+/*
+   Return current time (HHMMSS)
+*/
+{
+   struct tm *timexx;
+   time_t nowtime;
+	
+   time(&nowtime);
+   timexx = gmtime(&nowtime);
+   *itime = timexx->tm_hour * 10000 + timexx->tm_min * 100 + timexx->tm_sec;
+}
diff --git a/distro/tars/hdf5_HL_REGION-1.1.5.tar.gz b/distro/tars/hdf5_HL_REGION-1.1.5.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..963a760cbd8638ba15928aeea1436d381f7ecf47
Binary files /dev/null and b/distro/tars/hdf5_HL_REGION-1.1.5.tar.gz differ
diff --git a/distro/tars/nagg-1.6.2.tar.gz b/distro/tars/nagg-1.6.2.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..afb121b384d78df30cb3de36e69eed36cad684f0
Binary files /dev/null and b/distro/tars/nagg-1.6.2.tar.gz differ
diff --git a/distro/tars/where.f b/distro/tars/where.f
new file mode 100755
index 0000000000000000000000000000000000000000..a9e5f784a2411f2372c06de9f3ef6d80a8b3b8d9
--- /dev/null
+++ b/distro/tars/where.f
@@ -0,0 +1,2716 @@
+	Program WHERE
+*     -----------------------------------------------
+*     24 Feb 12; see also xwhere
+*     7 Dec 11; computes a viewed ground point if a scan angle is given
+*     12 Nov 11; Universal ===> UT in print-out
+*     2 Apr 10; corrected error in VEL; VEL0 is now used throughout;
+*       The problem was that VEL is changed by numorb.
+*     27 Aug 09; Areal Velocity is now displayed.
+*
+*     To display the instantaneous position of a satellite:
+*     usage:  where   satellite  yymmdd  hhmmss
+*
+*     23 May 08; Velocity over the ground is now shown.
+*     20 May 08; reports that satellite is or is not in sunlight
+*     8 Jun 06; working on TP
+*
+C     Implicit Double Precision(d), Vector(U-V)
+	implicit double precision(d)
+	parameter(d0=0.d+0,
+     x  eseq=1.00273791*6378.*6.283185307/86400.d+0,
+     x  d101=101.d+0/1440.d+0)
+	double precision dtxs(100)
+	character*32 csat
+	character*8 comsat,clites(2)
+	character*4 cmon,cmons(12),cmode
+	character*132 caplet
+	real verneq
+*
+*     Vector (f)VNORAX,(f)VCROSS,(f)VCOORD,(f)U4,(f)VCONIC,(f)VEARTH,
+*    x  (f)VNADIR
+*     Vector UK/0.,0.,1./
+	real uk(3)/0.,0.,1./
+	double precision rq81
+	real vq41(3),vq42(3)
+	real  vsat(3),vel0(3),vx(3),ue(3),un(3),vsatt(3),vog(3),usunt(3),v
+     xert(3),vhoriz(3),view(3),vgr(3),vdl(3),vll(3)
+	dimension dummy(7),vel(3)
+	common/e1/dtelem,dummy,vel
+	equivalence(comsat,dummy(1))
+cxr   RV4QQ,VEC4QQ,ANG4QQ
+*
+*     Integer*2 iy,im,id,ih,is,ic
+*     common/norb/numorb
+*
+	data clites/'Sunlight', 'Darkness'/
+	data cmons/ 'Jan ', 'Feb ', 'Mar ', 'Apr ', 'May ',
+     1  'Jun ', 'Jul ', 'Aug ', 'Sep ', 'Oct ', 'Nov ', 'Dec '/
+cxr   vnorax,vcross,vcoord,u4,numarg,arctan,rv4qq,tcivil,geodet
+cxr   erad84,dtgmt,vec4qq,numorb,soleph,fltarg,caplet,vnadir,vconic
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*
+	init = 0
+	dtadj = 0.d+0
+	call getarg(1,csat)
+*
+	if(csat=='help' .or. csat=='HELP') then
+	write(*, '(/ '' where   satl-id   yymmdd  hhmmss ''/)')
+	call exit(0)
+	end if
+*
+	jymd = numarg(2)
+	jhms = numarg(3)
+*     csat = caplet(&,8)
+	csat=caplet(csat,8)
+	scan = fltarg(4)
+	if(jymd+jhms == 0) then
+	dt = dtgmt(0)
+	call tcivil(dt, jy,jm,jd,kh,km,sec,nth)
+	jymd = 10000*jy + 100*jm + jd
+	jhms = 10000*kh + 100*km + ifix(sec)
+	else
+	dt = dtmjdn(jymd/10000, mod(jymd/100,100), mod(jymd,100),
+     1  jhms/10000, mod(jhms/100,100), mod(jhms,100)) + dtadj
+	end if
+*
+	call tcivil(dt, jy,jm,jd,kh,km,sec,nth)
+*     VSAT = VNORAX(dt,csat, slat,slong,cd)
+	call vnorax(dt,csat,slat,slong,cd,vsat)
+*     --------------------------------------------*
+*     areavel = .5*[VSAT <x> VEL]   !  areal velocity
+	vq41(1) = vsat(2)*vel(3) - vel(2)*vsat(3)
+	vq41(2) = vsat(3)*vel(1) - vel(3)*vsat(1)
+	vq41(3) = vsat(1)*vel(2) - vel(1)*vsat(2)
+	rq41=rv4qq(vq41)
+	areavel=.5*rq41
+*     --------------------------------------------*
+*     VEL0 = VEL  !  VEL is changed by nortab
+	vel0(1) = vel(1)
+	vel0(2) = vel(2)
+	vel0(3) = vel(3)
+*     --------------------------------------------*
+	if( cd <= 0.) stop 99
+*
+	nor = numorb(dt,csat,init,0, dtx,xlong)
+	init = 1
+*     VX = VCROSS(csat,dt,dtx)
+	call vcross(csat,dt,dtx,vx)
+*     --------------------------------------------*
+*     VX = VCROSS(csat,dtx-d101,dtxx)
+	rq81=dtx-d101
+	call vcross(csat,rq81,dtxx,vx)
+*     --------------------------------------------*
+*     speed = [VEL0]  !  [V] denotes the magnitude of a vector
+	speed=rv4qq(vel0)
+*     --------------------------------------------*
+*     UE = U4(UK <x> VSAT)  !  local east vector
+	vq41(1) = uk(2)*vsat(3) - vsat(2)*uk(3)
+	vq41(2) = uk(3)*vsat(1) - vsat(3)*uk(1)
+	vq41(3) = uk(1)*vsat(2) - vsat(1)*uk(2)
+	call u4(vq41,ue)
+*     --------------------------------------------*
+*     <x> denotes the cross product of two vectors
+*     UN = U4(VSAT <x> UE)   !  local north vector
+	vq41(1) = vsat(2)*ue(3) - ue(2)*vsat(3)
+	vq41(2) = vsat(3)*ue(1) - ue(3)*vsat(1)
+	vq41(3) = vsat(1)*ue(2) - ue(1)*vsat(2)
+	call u4(vq41,un)
+*     --------------------------------------------*
+*     head = 360. + arctan(VEL0*UN,VEL0*UE)
+	rq41= vel0(1)*un(1) + vel0(2)*un(2) + vel0(3)*un(3)
+	rq42= vel0(1)*ue(1) + vel0(2)*ue(2) + vel0(3)*ue(3)
+	head=360.+arctan(rq41,rq42)
+*     --------------------------------------------*
+	if(head.gt.360.)head=head-360.
+*
+	re = erad84(slat)
+*     alt = [VSAT] - re
+	rq41=rv4qq(vsat)
+	alt=rq41-re
+*     --------------------------------------------*
+	cmode = 'Asc '
+*     if(VEL0*UK < 0.) cmode = 'Desc'
+	rq41= vel0(1)*uk(1) + vel0(2)*uk(2) + vel0(3)*uk(3)
+	if(rq41.lt.0.)cmode='Desc'
+*
+	cmon = cmons(jm)
+	jsec = sec + .5
+	write(*, '(/" Position of ", a8, " at ", i8.6, " UT",
+     x  4x, i3,1x,a3,i5, 4x,3f9.2,4x,a4)') csat, jhms, jd,cmon,jy,
+     x  slat,slong,cd,cmode
+*
+	gdlat = geodet(slat)
+	write(*,'(" Geodetic lat/long & earth radius at nadir: ",
+     x  12x,3f9.2)') gdlat,slong,re
+	write(*, '(" Celestial Position Vector:   ", 3f10.2)') vsat
+*     VSATT = VCOORD(dt, VSAT, 'CT')    !  TFR
+	call vcoord(dt,vsat,'CT',vsatt)
+*     --------------------------------------------*
+	write(*, '(" Terrestrial Position Vector: ", 3f10.2)') vsatt
+	write(*, '(" Altitude:",20x, f10.2, " km")') alt
+	write(*, '(" Velocity thru Space: {x,y,z} ", 3f9.3,6x,
+     x  "{heading, speed}", 2f9.2," km/sec")') VEL0,head,speed
+*     VOG = VEL0 - eseq*cosine(slat)*UE  !  velocity over the ground
+	rq41=cosine(slat)
+	rq42=eseq*rq41
+	vq41(1) = ue(1)*rq42
+	vq41(2) = ue(2)*rq42
+	vq41(3) = ue(3)*rq42
+	vog(1) = vel0(1)-vq41(1)
+	vog(2) = vel0(2)-vq41(2)
+	vog(3) = vel0(3)-vq41(3)
+*     --------------------------------------------*
+*     hog = 360. + arctan(VOG*UN,VOG*UE)  !  heading over the ground
+	rq41= vog(1)*un(1) + vog(2)*un(2) + vog(3)*un(3)
+	rq42= vog(1)*ue(1) + vog(2)*ue(2) + vog(3)*ue(3)
+	hog=360.+arctan(rq41,rq42)
+*     --------------------------------------------*
+	if(hog.gt.360.)hog=hog-360.
+*
+*     sog = [VOG]
+	sog=rv4qq(vog)
+*     --------------------------------------------*
+	write(*, '(" Direction & Speed Over the Ground: ", 43x,2f9.2)')
+     x  hog,sog
+*
+	write(*, '(" Areal Velocity", 9x,f14.2, " km**2/sec"/)') areavel
+	call soleph(dt, sunlat,sunlon)
+*     USUNT = VCOORD(d0, {sunlat,sunlon,1.}, 'LLT')
+	call vec4qq(sunlat,sunlon,1.,vq41)
+	call vcoord(d0,vq41,'LLT',usunt)
+*     --------------------------------------------*
+*     zen = USUNT ^ VSATT  !  solar zenith angle at satellite
+	zen=ang4qq(usunt(1),vsatt(1))
+*     --------------------------------------------*
+	jlite = 1  !  Satl is in daylight,darkness?
+*     if(USUNT*VSATT<0. .and. [USUNT<x>VSATT]<6371.) jlite=2
+	vq41(1) = usunt(2)*vsatt(3) - vsatt(2)*usunt(3)
+	vq41(2) = usunt(3)*vsatt(1) - vsatt(3)*usunt(1)
+	vq41(3) = usunt(1)*vsatt(2) - vsatt(1)*usunt(2)
+	rq41=rv4qq(vq41)
+	rq42= usunt(1)*vsatt(1) + usunt(2)*vsatt(2) + usunt(3)*vsatt(3)
+	if(rq42.lt.0..and.rq41.lt.6371.)jlite=2
+*
+*     write(*, '(" Satellite is in ", a8)') clites(jlite)
+	write(*, '(" Satellite is in ", a8,8x,"Solar Zenith Angle: ",
+     x  f9.2, " deg")') clites(jlite),zen
+*
+*     7 Dec 11       Viewed Point on Ground
+	if(abs(scan) > 0.) then
+*     VERT = VSAT - VNADIR(VSAT)   !  CFR local vertical thru satl
+	call vnadir(vsat,vq41)
+	vert(1) = vsat(1)-vq41(1)
+	vert(2) = vsat(2)-vq41(2)
+	vert(3) = vsat(3)-vq41(3)
+*     --------------------------------------------*
+*     VHORIZ = (VSAT<x>VEL0) <x> VERT    !  horiz comp of flight path
+	vq41(1) = vsat(2)*vel0(3) - vel0(2)*vsat(3)
+	vq41(2) = vsat(3)*vel0(1) - vel0(3)*vsat(1)
+	vq41(3) = vsat(1)*vel0(2) - vel0(1)*vsat(2)
+	vhoriz(1) = vq41(2)*vert(3) - vert(2)*vq41(3)
+	vhoriz(2) = vq41(3)*vert(1) - vert(3)*vq41(1)
+	vhoriz(3) = vq41(1)*vert(2) - vert(1)*vq41(2)
+*     --------------------------------------------*
+*     VIEW = VCONIC(-VERT,VHORIZ,scan)   !  viewing vector, satl to ground
+	vq41(1)= -vert(1)
+	vq41(2)= -vert(2)
+	vq41(3)= -vert(3)
+	call vconic(vq41,vhoriz,scan,view)
+*     --------------------------------------------*
+*     VGR = VEARTH(VSAT,VIEW)
+	call vearth(vsat,view,vgr)
+*     --------------------------------------------*
+*     VDL = VCOORD(dt,VGR,'CDL')
+	call vcoord(dt,vgr,'CDL',vdl)
+*     --------------------------------------------*
+	write(*, '(" Viewed Ground Point: ", 2f9.2)') vdl(1),vdl(2)
+	end if
+*
+*     VSAT = VCROSS(csat,dt, dtx)
+	call vcross(csat,dt,dtx,vsat)
+*     --------------------------------------------*
+*     VLL = VCOORD(dtx, VSAT, 'CLL')
+	call vcoord(dtx,vsat,'CLL',vll)
+*     --------------------------------------------*
+	ra = vll(2) - verneq(dtx)
+	if(ra.lt.0.)ra=ra+360.
+*
+	dtm = dt - 101.d+0/1440.d+0   !  one orbit earlier
+*     VSAT = VCROSS(csat, dtm, dtxm)
+	call vcross(csat,dtm,dtxm,vsat)
+*     --------------------------------------------*
+	call tcivil(dtxm, jy,jm,jd,kh,km,sec,nth)
+*     VLL = VCOORD(dtxm,VSAT,'CLL')
+	call vcoord(dtxm,vsat,'CLL',vll)
+*     --------------------------------------------*
+	cmon = cmons(jm)
+*     write(*, '(/'' Mode: '', a4)') cmode
+	write(*, '(" Universal Time and Longitude of Equator Crossing: ",
+     x  i3,1x,a3,i5, 4x,2i3.2, f6.1,4x,f9.2)') jd,cmon,jy,
+     x  kh,km,sec,vll(2)
+	write(*, '(" Right Ascension of Ascending Node: ", f10.2)') ra
+*
+	 jte = dtelem   !  yyddd
+	 dtf = dtelem - dfloat(jte)  !  fraction day in dtelem
+	 dtepoc = dtmjdn(jte/1000, 0, mod(jte,1000), 0,0,0) + dtf
+	if(dabs(dt-dtepoc) > 21.d+0)
+     x  write(*, '(/" Warning: the orbital elements are more than ",
+     x  "21 days from prediction time."/)')
+	 write(*, '(" Orbit number: ", 21x,i10)') nor
+	 call tcivil(dtepoc, jy,jm,jd,kh,km,sec,nth)
+	 write(*, '(" Epoch of Orbital Elements: ", a8,2x,i3,1x,a3,i5,
+     x  4x,2i3,f6.1/)') comsat,jd,cmons(jm),jy,kh,km,sec
+C	call exit(0)
+	end
+*** MeteFor Reprocessed Source Code:
+*     Vector Function VEARTH(VSAT,VIEW)
+	SUBROUTINE VEARTH(VSAT,VIEW,VQARTH)
+*     -----------------------------------------------
+*     16 Dec 11; tested superficially with WHERE; simplified version
+*
+C     Implicit Double Precision(d), Vector(U-V)
+	implicit double precision(d)
+	parameter(d0=0.d+0)
+*
+	real vqarth      (3)
+*     Vector (f)VCOORD,(f)U4
+	real vq41(3),vq42(3)
+	real  vsat(3),view(3),uview(3),ve(3),vll(3)
+cxr   ANG4QQ,RV4QQ
+*
+cnp   vearth
+cxr   ang4qq,sine,u4,rv4qq,vcoord,erad84
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*     scan = 180. - VSAT^VIEW
+	rq41=ang4qq(vsat(1),view(1))
+	scan=180.-rq41
+*     --------------------------------------------*
+	sinscan = sine(scan)
+*     UVIEW = U4(VIEW)
+	call u4(view,uview)
+*     --------------------------------------------*
+	re = 6371.
+*     cd = [VSAT]
+	cd=rv4qq(vsat)
+*     --------------------------------------------*
+*
+	do   2 n=1,3
+	 nn = n
+	 sinbeta = cd*sinscan/re
+	 beta = arcsin(sinbeta)   !  -90 <= beta  <= 90, satellite zenith angle
+	 if(beta > 85.) go to 800
+	 gamma =  beta - scan   !  gamma = 180. - scan - (180. - beta)
+	 slant = sine(gamma) *cd/sinbeta
+*      VE = VSAT + slant*UVIEW
+	vq41(1) = uview(1)*slant
+	vq41(2) = uview(2)*slant
+	vq41(3) = uview(3)*slant
+	ve(1) = vsat(1)+vq41(1)
+	ve(2) = vsat(2)+vq41(2)
+	ve(3) = vsat(3)+vq41(3)
+*     --------------------------------------------*
+*      if(nn == 3) exit
+	if(nn.eq.3)go to     4
+*
+*      VLL = VCOORD(d0, VE, 'TDL')
+	call vcoord(d0,ve,'TDL',vll)
+*     --------------------------------------------*
+	 re = erad84(vll(1))
+    2 Continue
+*
+    4 continue
+*     VEARTH = VE
+	vqarth(1) = ve(1)
+	vqarth(2) = ve(2)
+	vqarth(3) = ve(3)
+*     --------------------------------------------*
+	return
+800   write(*, '(" Elevation is too low for an accurate result",
+     x  f10.2)') elev
+*     VEARTH = 0.
+	vqarth(1)=0.
+	vqarth(2)=0.
+	vqarth(3)=0.
+*     --------------------------------------------*
+	return
+	end
+c     rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr    STANDARD
+	SUBROUTINE VNORAX(DT,CSATX,SLAT,SLONG,CDT,VQORAX)
+*     -----------------------------------------------
+*    Orbital parameters (2-line elements) are available
+*    through the web site:  celestrak.com/pub/elements/weather.txt
+*
+	implicit double precision(d)
+	parameter (nmax=24)  !  max number of satellites
+	character*8 csat,csatx,cslast,csats
+	character*132 caplet
+	real de2ra,buf(13)
+*     Subroutine VNORAX(dt,csat, slat,slong,cdt, VSAT)
+	real vqorax      (3)
+*     Vector (f)VCOORD   !  vector-valued functions
+	real vq41(3)
+	real  vsat(3),vll(3)
+	dimension csats(nmax),parms(13,nmax)
+	common/e1/dtelem,ds50,xmo,xnodeo,omegao,eo,xincl,xno,xndt2o,xndd60
+     x,bstar,x,y,z,xdot,ydot,zdot
+	common/tle/csats,parms
+	common/c1/ck2,ck4,e6a,qoms2t,s,tothrd,xj3,xke,eqrad,xmnpda,ae
+	common/c2/de2ra,pi,pio2,twopi,x3pio2
+	equivalence(buf(1),dtelem)
+	save
+*
+*     This common block has been altered to put dtelem and ds50 at
+c       the beginning, to avoid inefficient common alignment and
+c       a corresponding diagnostic.
+*
+*     If the calling routine wants the satellite vector velocity as
+c     well as the position, it is available through common/e1/ as the
+c     last three items xdot,ydot,zdot.  For instance one can use
+*
+c     common/e1/fdummy(16),VEL            in the calling routine.
+*
+*     New  21 Jun 07
+*
+	data init/0/
+	data  cslast/' '/
+	data xj2,xj4,qo,so/1.082616e-3, -1.65597e-6,120., 78./
+*
+cxr   caplet,inparm,sgp4,vcoord
+cnp   vnorax
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	if(init == 0) then
+*
+	do   2 j=1,nmax
+2     csats(j) = ' '
+*
+	end if
+*
+c     ------------------------------------------
+	jsat = 0
+	csat = csatx
+	csat=caplet(csat,8)
+	iflag = 0  !  for initialization within sgp, sgp4, or sgp4
+*
+	if(csat == ' ') then  !  erase all previous registrations
+*     write(*, '('' Erasing all registrations'')')
+*
+	do   4 j=1,nmax
+4     csats(j) = ' '
+*
+*      VNORAX = 0.
+	vqorax(1)=0.
+	vqorax(2)=0.
+	vqorax(3)=0.
+*     --------------------------------------------*
+	 cslast = ' '
+	 init = 1   !  7 May 08
+	 cdt = 0.  !  added 10 Mar 08
+	 go to 102  !  return
+	end if
+*
+*     Is this satellite registered?
+	if(csat /= cslast) then  !  do we need to (re)-initialize sgp?
+*     write(*, '(''  registering '', a8)') csat
+	 iflag = 1  !  initialize within sgpx
+	 cslast = csat
+	end if
+*
+	do   6 n=1,nmax
+	 if(csats(n) == csat) then
+	  jsat = n
+	  kfetch = 0  !  parms already fetched, not needed again
+	go to     8
+	end if
+*
+    6 Continue
+*
+    8 continue
+*
+	if(jsat == 0) then  !  no, register it now
+	 kfetch = 1
+*
+	do  10 i=1,nmax
+*       if(csats(i) /= ' ') cycle
+	if(csats(i).ne.' ')go to    10
+*
+	  jsat = i
+	  csats(i) = csat
+	go to    12
+   10 Continue
+*
+   12 continue
+*
+	if(jsat == 0) then
+	write(*, '(" VNORAX: There is no slot available for this ",
+     1  "satellite: ", a8)') csat
+*     VNORAX = 0.
+	vqorax(1)=0.
+	vqorax(2)=0.
+	vqorax(3)=0.
+*     --------------------------------------------*
+	go to 102
+	end if
+*
+	end if
+*
+	call tcivil(dt, ny,nm,nd,km,km,sec,nth)
+c     ----------------------------------------------
+	if(kfetch > 0) then  !  fetch two-line orbital elements
+	 jymd = 10000*ny + 100*nm + nd
+*
+	 if(inparm(jymd,csat) /= 0) then
+	 write(*, '(" VNORAX: Error return from INPARM ")')
+*      VNORAX = 0.
+	vqorax(1)=0.
+	vqorax(2)=0.
+	vqorax(3)=0.
+*     --------------------------------------------*
+	 cdt = 0.
+	 go to 102
+	end if
+*
+	do  14 i=1,13
+	 parms(i,jsat) = buf(i)
+   14 Continue
+*
+	end if
+*
+c     ----------------------------------------------
+	do  16 i=1,13
+16    buf(i) = parms(i,jsat)
+*
+	 iflag = 1  !  to be sure SGP8 uses the newly installed parms
+	 jte = dtelem   !  yyddd
+	 dtf = dtelem - dfloat(jte)  !  fraction day in dtelem
+	 dtepoc = dtmjdn(jte/1000, 0, mod(jte,1000), 0,0,0) + dtf
+*
+	tsince = 1440.d+0 * (dt - dtepoc)   !  minutes since epoch
+*     call sgp8(iflag,tsince)  ;  NORAD model
+*
+*     Print warning if eccentricity is zero:
+	if(abs(eo) <= 0.) then
+	write(*, '(" VNORAX Warning: the eccentricity is zero. "/
+     x  " SGP4 divides by eccentricity at one point."/)')
+	end if
+*
+	call sgp4(iflag,tsince)  !  NORAD model! suggested by Kelso
+*     call sgp(iflag,tsince)   ;  NORAD model
+*
+*     eqrad is defined in INPARM; it is the equatorial radius in km.
+*     eqrad = 6378.135  ;  Eq radius in km
+*
+*     The following are returned thru common/e1/
+*     Note: x,y,z are in units of earth radius.
+c     xdot,ydot,zdot are in radians per minute   - Nagle
+*     These values were computed by sgp4.
+*
+	if( x*x + y*y + z*z <= 0.) then
+	write(*,'('' VNORAX: Error return from SGP4; job is ending.'')')
+	stop 99
+	end if
+*
+	xdot = xdot * eqrad / 60.  !  conv to km/sec
+	ydot = ydot * eqrad / 60.
+	zdot = zdot * eqrad / 60.
+*
+c     The subroutine SGP4/8 uses earth-radius (6378.135 km) as its
+c     unit of length.  Velocities returned as radians/minute are hence
+c     numerically equal to earth-radii per minute.  Multiplied by
+c     6378.135/60 we obtain km/sec.  (26 Oct 07)
+*
+*     VSAT = (eqrad/ae)*VEC4(x,y,z)  ;  x,y,z are from common/e1/
+*     fac = eqrad/ae   ;  ae = 1.;  see INPARM     removed 8 Feb 08
+	vsat(1) = eqrad*x
+	vsat(2) = eqrad*y
+	vsat(3) = eqrad*z
+*
+*     VLL = VCOORD(dt, VSAT, 'CLL')  ! celestial to Lat/Long/cd
+	call vcoord(dt,vsat,'CLL',vll)
+*     --------------------------------------------*
+	slat = vll(1)   !  geocentric lat
+	slong = vll(2)
+	cdt = vll(3)
+*     VNORAX = VSAT   !  satellite celestial position vector
+	vqorax(1) = vsat(1)
+	vqorax(2) = vsat(2)
+	vqorax(3) = vsat(3)
+*     --------------------------------------------*
+	init = 1
+*
+102   return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+*     Vector Function VCROSS(csat,dt0, dtxx)
+	SUBROUTINE VCROSS(CSAT,DT0,DTXX,VQROSS)
+*     -----------------------------------------------
+*     1 Jun 11; deltat set to a large value prior to loop
+*
+c     This routine was originally written in Meteorological Fortran (MeteFor)
+c     in order to use MeteFor's vector and matrix notation, and is also
+c     maintained in MeteFor.  The source code appearing below was generated by
+c     the MeteFor processor, not by manual entry.  Some of the original code
+c     may appear in statements which have been commented out.  The original
+c     MeteFor source (with suffix .mtf) is more readable and better documented.
+c     See the document MeteFor.doc
+c                                          F W Nagle  (fredn@ssec.wisc.edu)
+c     ---------------------------------------------------------------------------------
+c     To find the time and satellite position of an Equator crossing
+c     following the time dt0 expressed in MJDN:
+c     The satellite position VCROSS at Equator crossing is celestial.
+*
+C     Implicit Double Precision(d), Vector(U-V)
+	implicit double precision(d)
+	parameter( dtepsi=.01d+0/86400.d+0)  !  .01 secs is probably a little too tight
+	character*8 csat
+*
+	real vqross      (3)
+*     Vector UP/0.,0.,1./, (f)VNORAX
+	real up(3)/0.,0.,1./
+	real vq41(3)
+	real  vsat(3),vop(3)
+	dimension xdum(16),vel(3)
+	common/e1/xdum,vel
+	equivalence(fmean,xdum(10))  !  mean motion in rad/min
+*
+cxr   vnorax,sine,ang4qq
+cnp   vcross
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*     VSAT = VNORAX(dt0,csat, slat0,slong0,cd0)
+	call vnorax(dt0,csat,slat0,slong0,cd0,vsat)
+*     --------------------------------------------*
+*     VOP = VSAT <x> VEL   !  vector orbital plane
+	vop(1) = vsat(2)*vel(3) - vel(2)*vsat(3)
+	vop(2) = vsat(3)*vel(1) - vel(3)*vsat(1)
+	vop(3) = vsat(1)*vel(2) - vel(1)*vsat(2)
+*     --------------------------------------------*
+*     anom = VSAT ^ (UP<x>VOP) !  ang betw sat posn and asc node in orbital plane
+	vq41(1) = up(2)*vop(3) - vop(2)*up(3)
+	vq41(2) = up(3)*vop(1) - vop(3)*up(1)
+	vq41(3) = up(1)*vop(2) - vop(1)*up(2)
+	anom=ang4qq(vsat(1),vq41(1))
+*     --------------------------------------------*
+	if(slat0.gt.0.)anom=360.-anom
+*
+*     anom is the uncompleted portion of an orbit.
+	angroc = 1440.*57.2957795*fmean  !  deg/day vice rad/min
+	dtx = dt0 + anom/angroc  !  first Eq cross guess
+	deltat = 9999.d+0  !  1 Jun 11
+*
+	do   2 n=1,10
+*      if(dabs(deltat) < dtepsi) exit
+	if(dabs(deltat).lt.dtepsi)go to     4
+*
+*      VSAT = VNORAX(dtx,csat,  slat,slong,cd)
+	call vnorax(dtx,csat,slat,slong,cd,vsat)
+*     --------------------------------------------*
+*      orbinc = UP ^ (VSAT <x> VEL)   !  orbital inclination
+	vq41(1) = vsat(2)*vel(3) - vel(2)*vsat(3)
+	vq41(2) = vsat(3)*vel(1) - vel(3)*vsat(1)
+	vq41(3) = vsat(1)*vel(2) - vel(1)*vsat(2)
+	orbinc=ang4qq(up(1),vq41(1))
+*     --------------------------------------------*
+	 roclat = angroc*sine(orbinc)  !  rate of change of lat near Eq
+	 deltat = -slat/roclat
+	dtx=dtx+deltat
+    2 Continue
+*
+4     dtxx = dtx
+*     VCROSS = VSAT
+	vqross(1) = vsat(1)
+	vqross(2) = vsat(2)
+	vqross(3) = vsat(3)
+*     --------------------------------------------*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine VCOORD(dt,vecin,cmode,  vecout)
+*     -----------------------------------------------
+*     8 Sep 12; arctan restored as a statement function
+*     25 Mar 11; NSC, in util.a
+!     24 Jun 09; CT and TC may now be only two bytes vice three.
+!     26 Feb 09; dropped SAVE
+!     23 Feb 08; corrected documentation
+!     2 Mar 07; enhanced to handle geodetic latitudes; in util.a
+!     24 Oct 02; > ===> .gt., etc.
+*     25 Aug 02; sine,cosine,arctan made external vice internal.
+!     26 Feb 00; Double Precision ===> Real*8
+!     12 Jan 00; see Inputs below.
+! -----------------------------------------------------------------
+! DOCUMENTATION:
+*
+! Cooperative Institute for Meteorological Satellite Studies
+! University of Wisconsin
+! 1225 W Dayton Street
+! Madison, Wisconsin  53706      USA
+*
+! Name: VCOORD; a subroutine-type subprogram
+!     This is a vector-valued function under MeteFor,
+!     and a simple subroutine under standard Fortran-77.
+*
+! Inputs: Time, Double Precision, in Julian Day Number  (JDN)
+!          or Modified Julian Day Number (MJDN)
+!         a REAL*4 3-dimensional vector in some coordinate system
+!         a character*3 variable stating the desired transformation
+*
+! Output: a 3-dimensional REAL*4 transformed vector
+*
+! Usage:
+!     To inter-convert among various coordinate systems:
+!      cmode = LLC         Geocentric Lat/Long to Celestial
+!      cmode = LLT         Geocentric Lat/Long to Terrestrial
+!      cmode = CT          Celestial to Terrestrial
+!      cmode = DLC         Geodetic Lat/Long to Celestial
+!      cmode = DLT         Geodetic Lat/Long to Terrestrial
+*
+!     and the inverses of these operations:  (CLL, TLL, TC, CDL, TDL)
+*
+!     Note regarding time:  An input value for time (dt) is required
+!     only if the celestial coordinate system is involved, either as
+!     input or output coordinates.  If the transformation is
+!     strictly between Lat/Long/CD on the one hand, and terrestrial
+!     on the other, a dummy value of time (e.g. zero) can be used.
+!     Time may be expressed either as Julian Day Number (JDN) or as
+!     Modified Julian Day Number (MJDN) (see the document Julian.Day.Number).
+*
+! Modules:  verneq, sine, cosine, geodet, geocen
+*
+! Comment:  The three coordinate systems treated by this routine are
+!   defined as follows:
+*
+!   Celestial: The x-coordinate is directed from the center of
+!   the earth toward the vernal equinox.  The y-coordinate is
+!   directed 90 deg east of the x-coordinate, and the z-coordinate
+!   is directed from the earth's center toward the north pole.
+!   The three coordinates form a right-hand orthonormal basis.
+*
+!   Terrestrial: The x-coordinate is directed from the earth's center
+!   toward the Greenwich meridian; the y-coordinate is directed
+!   90 deg east of the x-coordinate; the z coordinate is directed
+!   from the earth's center toward the north pole.  The terrestrial
+!   coordinates are a right-hand orthonormal basis.
+*
+!   Latitude/Longitude:  The three components are latitude in
+!   degrees, positive north; longitude in degrees, positive east;
+!   and radius vector in arbitrary units from the earth's center
+!   to a given point.  These coordinates do not constitute an orthogonal
+!   Cartesian system.  They constitute a vector only in the sense that
+!   they are three ordered real numbers.  The latitude may be either
+!   geocentric or geodetic, depending on the conversion mode.
+*
+! Programmer: F W Nagle              email:  fredn@ssec.wisc.edu
+!  ---------------------------------------------------------------------
+	double precision dt,deqr2,deqrad
+	character*3 cmodes(10),cmode,ctest
+*
+	dimension vecin(3),vecout(3),vecinp(3)
+*     save  ;  probably not needed
+*
+	data cmodes/'LLC', 'LLT', 'CT ', 'CLL', 'TLL', 'TC ',
+     x  'DLC', 'DLT', 'CDL', 'TDL'/
+*
+*     sine(x) = sin(.0174532925*x)
+*     cosine(x) = cos(.0174532925*x)
+	arctan(x,y) = 57.2957795*atan2(y,x)    !  8 Sep 12
+cnp   vcoord
+cxr   sine,cosine,verneq,geocen,geodet
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	kdetic = 0  !  flag for conv to geodetic on exit
+	lm = 0
+	ctest = ' '
+*
+	do   2 j=1,10
+	lm = j
+	ctest = cmode
+	if(ctest(1:2).eq.'TC' .or. ctest(1:2).eq.'CT') ctest(3:3) = ' '
+	if(cmodes(j) .eq. ctest) go to 8
+    2 Continue
+*
+	write(*, '(" VCOORD: Unrecognized Transformation: ",
+     1  a3)') cmode
+	return
+*
+*     Test for any conversion involving celestial coords, because time is involved
+8     jtest = (lm-1)*(lm-3)*(lm-4)*(lm-6)*(lm-7)*(lm-9)
+	velong= 0.
+*
+	if(jtest .eq. 0) then  !  celestial coords are involved, so time is needed.
+	 if(dt.gt.2.6d+6 .or. dt.lt.0.d+0) go to 920
+	 if(dt.gt.100000.d+0 .and. dt.lt.2.4d+6) go to 920
+*      The range 0 to 100000 may be Mod Jul Day Num
+*
+	  velong= verneq(dt)  !  longitude of the Vernal Equinox
+	end if
+*
+	do 4 j=1,3
+4     vecinp(j) = vecin(j)
+*
+	if(lm.eq.7 .or. lm.eq.8) then  !  geodetic lat is input
+	lm = lm-6
+	vecinp(1) = geocen(vecinp(1))
+	end if
+*
+	if(lm .ge. 9) then
+	lm = lm-5
+	kdetic = 1  !  to make output lat geodetic
+	end if
+*
+*     At this point 1 <= lm <= 6
+	if(lm .ge. 4) lm = 3 - lm
+	if(iabs(lm) .gt. 1) go to 50
+*
+	if(lm .lt. 0) go to 20
+*
+c     Lat/Long to some vector
+10    if(abs(vecinp(1)) .gt. 90.) then
+	write(*, '(" VCOORD: Bad input latitude: ", f12.2)')
+     1  vecinp(1)
+	go to 922
+	end if
+*
+	deqrad = vecinp(3) * cosine(vecinp(1))
+	clong = vecinp(2) - velong
+	vecout(1) = deqrad * cosine(clong)
+	vecout(2) = deqrad * sine(clong)
+	vecout(3) = vecinp(3) * sine(vecinp(1))
+	return
+*
+c     Vector to Lat/Long/cd
+20    clong = arctan(vecinp(1), vecinp(2))
+	deqr2 = dble(vecinp(1))**2 + dble(vecinp(2))**2
+	eqr = dsqrt(deqr2)
+	vecout(1) = arctan(eqr, vecinp(3))  !  geocentric
+	vecout(2) = clong + velong
+	if(vecout(2) .lt. -180.) vecout(2) = vecout(2) + 360.
+	if(vecout(2) .gt. 180.) vecout(2) = vecout(2) - 360.
+	vecout(3) = dsqrt(deqr2 + dble(vecinp(3))**2)
+	if(kdetic.gt.0)vecout(1) = geodet(vecout(1))
+	return
+*
+50    if(iabs(lm) .gt. 2) go to 100
+*
+c     lm = 2 or -2
+	if(lm .lt. 0) go to 20
+*
+c     lm = +2
+c     lat/long/cd to terrestrial
+	go to 10
+c     -----------------------------------------
+c                                       Vector to Vector
+100   if(lm .lt. 0) go to 110
+*
+c     CFR to TFR
+102   vecout(3) = vecinp(3)
+	clong = arctan(vecinp(1), vecinp(2))  !  8 Sep 12, error in arctan.c found at this statement
+	glong = clong + velong
+	deqrad = dsqrt(dble(vecinp(1))**2 + dble(vecinp(2))**2)
+	vecout(1) = deqrad * cosine(glong)
+	vecout(2) = deqrad * sine(glong)
+	return
+*
+c     terrestrial to celestial
+110   velong = -velong
+	go to 102
+*
+920   write(*, '(" VCOORD: The input time is wrong: ", 1pd20.10)')
+     1  dt
+*
+922   vecout(1) = 0.
+	vecout(2) = 0.
+	vecout(3) = 0.
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+c     Vector Function U4(VEC)         same as UNIT4
+	Subroutine U4(vec,uvec)
+*
+*     12 Jul 10; devisor is multiplied by fudge factor 3f800001
+*     10 Jun 10; Princeton round-off added to divisor r1; corrects a problem in smalcx
+*     2 Apr 03; to compute the norm of an arbitrary vector:
+*
+	real vec(3),uvec(3)
+	equivalence(jr2,r2),(sum2,jsum2),(fudge,jfudge),(nan,fnan)
+	data jfudge/ z'3f800001'/, nan/z'7f811111'/
+cnp   u4
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	sum2 = vec(1)*vec(1) + vec(2)*vec(2) + vec(3)*vec(3)
+*
+	if(sum2 .gt. 0.)then
+	jr2 = jsum2/2 + 536870912    !  20000000z
+*
+	do 2 n = 1,6   !  Newton/Raphson iteration
+	r1 = r2
+2     r2 = .5*(r1 + sum2/r1)
+*
+	r2 = r2 * fudge   !  12 Jul 10
+*
+	do 4 j = 1,3
+4     uvec(j) = vec(j)/r2
+*
+	    else
+	do 6 j = 1,3
+6     uvec(j) = fnan   !  set NaN
+*
+	write(*, '(" U4 FAULT: Warning - the given vector argument has ",
+     1  "zero length.")')
+	end if
+*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function NUMARG(jpos)
+*
+c     20 Jan 13; test for blank cin
+	character*24 cin
+cxr   nscan
+cnp   numarg
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	call getarg(jpos, cin)
+	kol = 1
+	num = 0
+	if(cin .ne. ' ') num = nscan(kol,cin)   !     num may be negative
+	numarg = num
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Real Function ARCTAN(xx,yy)    !  plus ARCSIN and ARCCOS
+*     -----------------------------------------------
+*     24 Jan 13; with ARCSIN and ARCCOS ENTRY
+*     8 Sep 12; After much effort it was found that the C version of
+c     arctan is defective in dealing with cardinal angles like 270, and
+c     may lead to errors of 180 deg.  This version seems not have that error.
+*     29 Aug 01; see Approximations for Digital Computers, Hastings.
+*
+	implicit double precision(d)
+	parameter(dpi=3.14159265358979d+0, d1=1.d+0, d90=90.d+0,
+     1  dpio4=dpi/4.d+0, d0=0.d+0, dr2d=180.d+0/dpi, d720=720.d+0,
+     1  dc1=.9999993329d+0, dc3=-.3332985605d+0,
+     2  dc5=.1994653599d+0, dc7=-.1390853351d+0, dc9=.964200441d-1,
+     3  dc11=-.559098861d-1, dc13=.218612288d-1, dc15=-.4054058d-2)
+*
+	equivalence(jatest,atest)
+	data jq01/z'3F800001'/
+*
+cnp   arctan,arcsin,arccos
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	dx = xx    !  arctan entry
+	dy = yy
+	dfac = d1
+	dadd = d0
+*
+2     if(dabs(dx) <= d0) then
+	if(dabs(dy) <= d0) then
+	write(*, '(" ARCfunc: argument error", 2f12.7)') dx,dy
+	dd = d720
+	end if
+*
+	dd = d90
+	if(dy < d0)dd = -d90
+*
+	else  !  dx /= 0
+	dq = dabs(dy/dx)
+	da = (dq - d1)/(dq + d1)
+	da2 = da*da
+	dr = dpio4 + da*(dc1 + da2*(dc3 + da2*(dc5 + da2*(dc7 + da2*(dc9
+     1  + da2*(dc11 + da2*(dc13 + da2*dc15)))))))
+	dd = dr2d*dr
+*
+	if(dx > d0)then
+	if(dy < d0)dd = -dd
+	 else
+	dd = 180.d+0 - dd
+	if(dy < d0) dd = -dd
+	end if
+*
+	end if
+*
+10    dd = dfac*dd + dadd
+	arctan = dd
+	return
+c     ---------------------------------------
+	entry arcsin(aa)
+	dfac = d1
+	dadd = d0
+*
+6     dy = aa
+*
+	if(dabs(dy) > d1) then   !  test for bad argument
+	 atest = abs(aa)
+*
+	if(jatest.eq.jq01)then
+	 dd = d90
+	 if(aa < 0.) dd = -d90
+	 go to 10
+*
+	 else   !  arg too big
+	 write(*, '(" ARCSIN/COS, bad argument: ", 1pe15.8)') aa
+	 stop 99
+	end if
+*
+	end if
+*
+	dx = dsqrt(d1 - dy*dy)	
+	go to 2
+c     --------------------------------
+	entry arccos(aa)
+	dfac = -d1
+	dadd = d90
+	go to 6
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function RV4QQ(VEC)
+*     Length of a Vector*4
+cnp   rv4qq
+*     -----------------------------------------------
+*     This is normally invoked by the MeteFor [...] operator
+*
+*     30 Jun 09; 3F800001z is trapped and set to 3F800000z.
+	real vec(3)
+	equivalence(sum,jsum), (r1,jr1)
+	data jq01/z'3F800001'/,jq02/z'3F800000'/
+c     xxxxxxxxxxxxxxxxxxxxxxxxxx
+	r1 = 0.
+	sum = vec(1)*vec(1) + vec(2)*vec(2) + vec(3)*vec(3)
+*
+	if(sum.gt.0.) then
+	jr1 = jsum/2 + 536870912   !  = 20000000z
+*
+	do 2 n = 1,6   !  Newton Raphson square root
+	r0 = r1
+2     r1 = .5*(sum/r0 + r0)
+*
+	end if
+*
+	if(jr1 .eq. jq01) jr1 = jq02
+*     Sometimes a unit vector may be 3f800001z, thus appearing
+c     greater than unity.
+*
+	rv4qq = r1
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine TCIVIL(dtime,  nyr,nmo,nda,nhr,min,sec,  nthday)
+*
+c     3 Nov 10; d is made implicit DP
+*
+*     To convert time in JDN or MJDN to ordinary civil time units:
+*     An input smaller than 1721060 (beginning of Christian era)
+*     is presumed to be a Modified Julian Day Number, epoch of 12z, 1 Jan 70
+*
+*     Input: dtime - Double Precision time in JDN or MJDN
+*     Outputs - year (4 digits), month, day, hour, minute - all integers
+*               second - real
+*     See the ASCII document Julian.Day.Number
+*
+	implicit double precision(d)
+*
+	character*4 cmon
+cxr   julinv
+cnp   tcivil
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	if(dtime .le. -1.d+0) go to 800
+*
+	dt = dtime + .5d+0
+	jdt = dt
+	jdtx = jdt
+	if(dt.lt.1721060.d+0) jdtx = jdtx + 2440588  !  conv MJDN to JDN
+	call julinv(jdtx,  nyr,nmo,nda,  cmon,nthday)  !  conv JDN to civil date
+	dfrac = dt - dfloat(jdt)   !  fraction of a day
+	secs = 86400.d+0 * dfrac + 1.d-6
+	ksecs = secs
+	nhr = ksecs/3600
+	nhx = 3600*nhr  !  hours attributable entirely to 3600-sec blocks (24 Aug 09)
+	min = (ksecs - nhx)/60
+	nsec = ksecs - nhx - 60*min
+	fksecs = ksecs
+	frac = secs - fksecs
+	fnsec = nsec
+	sec = fnsec + frac
+	if(sec.ge.60.) sec=59.99999
+	return
+*
+800   nyr = 0
+	nmo = 0
+	nda = 0
+	nhr = 0
+	min = 0
+	sec = 0
+	write(*,'(" WARNING: Input to TCIVIL is bad: ",1pd20.10)')dtime
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Real Function GEODET(gcl)
+*
+*     To convert geocentric latitude to geodetic:
+*     24 Oct 08; SAVE removed
+*
+*  Given an elliptical earth with semi-major axis = 1, and
+*  semi-minor axis = b, then from the equation of an ellipse,
+*  we have
+*
+*  b2 x2 + y2 = b2                                  (1)
+*  y = b sqrt(1 - x2)                               (2)
+*  sqrt(1 - x2) = y/b                               (3)
+*  dy/dx = -bx/sqrt(1 - x2)        from (2)         (4)
+*
+*  But the slope dy/dx of a point on the ellipse is the negative
+*  reciprocal of the tangent of the geodetic latitude, i.e.
+*
+*  tan D = sqrt(1 - x2)/bx          where D = geodetic latitude
+*  bx tan D = sqrt(1 - x2) = y/b    using (3)
+*  b2 tan D = y/x
+*
+*  On the other hand, y/x is the tangent of the geocentric
+c  latitude C.  Hence
+*
+c   b2 tan D = tan C    or    tan D = (tan C)/b2    (5)
+*
+c   which can be used to interconvert latitudes in either direction.
+c     ------------------------------------------------
+	parameter (smajx=6378388., sminx=6356911.946,
+     1  b=sminx/smajx, b2 = b*b)
+c     These values of semi-major and semi-minor axis were taken
+c     from  the Encyclopedia Britannica (see Geodesy).
+*
+*     These values are also shown as the
+*     "International Ellipsoid" as defined in
+*     "American Practical Navigator" (Bowditch), Pub. No. 9,
+*     Volume I, p. 1119, Defense Mapping Agency.
+*
+cnp   geodet
+cxr   arctan,tangent
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	gc = abs(gcl)
+*
+	if(gc .ge. 90.)then
+	 gd = 90.
+	  else
+	 tanc = tangent(gc)
+	 gd = arctan(b2, tanc)
+	end if
+*
+	geodet = gd*sign(1., gcl)
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function ERAD84(gdlat)
+*
+c     To compute the local radius of the earth in kilometers as a
+c     function of geodetic latitude:
+*
+*     5 Jan 03; Liam Gumley reports that MODIS uses the WGS
+c     spheroid of 1984, in which the Equatorial radius is
+c     6378.137 km, and eccentricity .081819190843, which implies
+c     a polar radius of 6356.75231424498 km, i.e.
+*     b2 = a2(1 - e2)
+*
+	implicit double precision (d)
+*
+	parameter (dmajor=6378.137d+0, dminor=6356.752314245d+0,
+     1  b = dminor/dmajor, dmaj2=dmajor*dmajor,
+     2  dratio=dminor/dmajor, degrad=3.1415926535898d+0/180.d+0)
+*     This is the WGS84 Spheroid.
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	if(abs(gdlat) .gt. 90.) then
+	write(*, '(" ERAD84: Given Latitude Is Out of Range: ",
+     1  1pe16.4)') gdlat
+	erad84 = -1.
+	end if
+*
+	gclat = geocen(gdlat)  !  convert to geocentric
+	dxe = dmajor * dcos(degrad * gclat)
+	dxe2 = dxe*dxe
+	dye = dratio*dsqrt(dmaj2 - dxe2)
+	erad84 = dsqrt(dxe2 + dye*dye)
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Double Precision Function DTGMT(jaddtv)
+*     To get Greenwich time now in MJDN:
+*     -----------------------------------------------
+*     The argument in hours will be algebraically added to the
+c     returned time (e.g. to adjust for a time zone).
+*
+*     29 May 06; tested superficially
+	implicit double precision(d)
+*
+cxr   klock,dtmjdn
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	call klock(jymd,jhms)
+*     write(*, '('' dtgmt, from klock '', 2i10)') jymd,jhms
+	open(10, file='/home/fredn/gmt.adj', form='formatted',
+     x  status='old', access='sequential')
+	read(10, *) dgmt
+	close(10)
+	dt = dtmjdn(jymd/10000, mod(jymd/100,100), mod(jymd,100),
+     x  jhms/10000, mod(jhms/100,100), mod(jhms,100)) + dgmt/1440.d+0
+	dtgmt = dt + dfloat(jaddtv)/24.d+0
+*     call tcivil(dt, jy,jm,jd,kh,km,sec,nth)
+*     write(*, '('' Lv dtgmt: '', i5,4i3,f6.1)') jy,jm,jd,kh,km,sec
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+c     Vector*4 Function VEC4QQ(x,y,z)
+	Subroutine VEC4QQ(x,y,z,  vec)
+c     To return a vector whose components are the three given
+c     values x,y,z;  invoked by the MeteFor vector operator {...}
+*
+	real vec(3)
+cnp   vec4qq
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	vec(1) = x
+	vec(2) = y
+	vec(3) = z
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Integer Function NUMORB(dt0,csat,init,kpr,  dtx,xlong)
+*     -----------------------------------------------
+*     4 Dec 11; nortab is set to -999 if it is otherwise negative (e.g. before l
+c     3 Dec 11; numtab is enlarged to encompass 100 orbits before & after epoch
+*
+*     The returned functional value is the orbit number of
+c       the orbit within which the time dt0 falls.
+c       dt0 must lie within 100 orbits before or after the epoch of the
+c       installed parameters.
+c       The time dt0 is expressed in MJDN; see the document Julian.Day.Number.
+*       (See the document TLINSET.doc)
+*
+*     Arguments:
+*     The time dt0 is an arbitrary MJDN time within an orbit.
+c     csat is character*8 satellite identifier
+c     init must be zero on the first call, and 1 thereafter,
+c       unless a new satellite or epoch is involved.
+*     kpr is a print flag which will cause the Equator crossing table to be
+c       printed.  The tables are printed only in initialization, so if
+c       init>0, print-out will not occur.
+*     dtx is the time of the preceding Equa crossing.
+*     xlong is the corresponding longitude at preceding Equa  crossing.
+*
+cnp   numorb
+cxr   dtepoc,vnorax,vcross,vcoord,tcivil
+c     --------------------------------------------------------
+	implicit double precision(d)
+	parameter(d90=90.d0/1440.d+0,nmax=200, d106=106.d+0/1440.d+0)
+	double precision dtxs(nmax)
+	real xlongs(nmax)
+	integer nortab(nmax)
+	character*8 csat
+*
+*     Vector (f)VNORAX,(f)VCROSS,(f)VCOORD
+	real vq41(3)
+	real  vpos(3),vel(3),vpos0(3),vel0(3),vx(3),vll(3)
+	dimension xdum(19)
+	dimension jdum(5)
+	common/e1/xdum
+	common/norb/no
+	common/c2/jdum
+	save  !  needed, else the Eq cross tables are not preserved
+	data jq01/z'40490FDB'/
+*
+*     equivalence(dttle,xdum(1)),(VPOS,xdum(14)),(VEL,xdum(17)),
+*    x  (pi,jdum(2))
+	equivalence(dttle,xdum(1)),(vpos,xdum(14)),(vel,xdum(17)),(pi,jdum
+     x(2))
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*     VPOS0 = VPOS  !  preserve any pre-existing VEL and VPOS:
+	vpos0(1) = vpos(1)
+	vpos0(2) = vpos(2)
+	vpos0(3) = vpos(3)
+*     --------------------------------------------*
+*     VEL0 = VEL  !  This is VEL-zero
+	vel0(1) = vel(1)
+	vel0(2) = vel(2)
+	vel0(3) = vel(3)
+*     --------------------------------------------*
+	if(init == 0) then
+*     The tables computed below are based on the parameters installed at the tim
+c     the initial call, and are not altered even if the calling routine changes
+c     the parameters between calls.  If  no parameters are installed,
+*     they will be installed by the following statement.
+*     write(*, '(" jdum(2),pi ", 2(1x,z8))') jdum(2),pi
+*
+*     Are TLEs already installed.  If so, jdum(2) will contain pi.
+*     if(jdum(2) /= 40490fdbz)
+*    x  VX = VNORAX(dt0,csat,  slat,slong,cd)   !  test against pi in hex, jdum(2) is defined in inparm
+*
+	if(jdum(2).ne.jq01)then
+*     VX=VNORAX(DT0,CSAT,SLAT,SLONG,CD)
+	call vnorax(dt0,csat,slat,slong,cd,vx)
+	end if
+*
+c     This defines NO in common/norb/
+	dte = dtepoc(dttle)  !  epoch as MJDN
+	dt = dte - .01d+0  !  TLE epoch minus 14 min
+*
+	do   2 n=101,nmax
+	 nn = n
+*      VX = VCROSS(csat,dt, dtxx)
+	call vcross(csat,dt,dtxx,vx)
+*     --------------------------------------------*
+*      VLL = VCOORD(dtxx, VX, 'CLL')
+	call vcoord(dtxx,vx,'CLL',vll)
+*     --------------------------------------------*
+	 xlongs(n) = vll(2)
+	 dtxs(n) = dtxx
+	 nortab(n) = no + nn - 101 !  orbit number
+2      dt = dtxx + d90  !  first guess for next asc node
+*
+	dt = dte - 104.d+0/1440.d+0  !  1st guess time for orbiting preceding
+*
+	do   4 n=100,1,-1
+	 nn = n
+*      VX = VCROSS(csat,dt,dtxx)
+	call vcross(csat,dt,dtxx,vx)
+*     --------------------------------------------*
+*      VLL = VCOORD(dtxx,VX,'CLL')
+	call vcoord(dtxx,vx,'CLL',vll)
+*     --------------------------------------------*
+	 xlongs(n) = vll(2)
+	 dtxs(n) = dtxx
+	 nortab(n) = no + nn - 101
+	 if(nortab(n) < 1) nortab(n) = -999    !  4 Dec 11
+4      dt = dtxx - 104.d+0/1440.d+0
+*
+	if(kpr > 0) then
+	write(*,'(/" Orbits, Equator Crossing Times and Longitudes:"/)')
+*
+	do   6 j=1,nmax
+	call tcivil(dtxs(j), jy,jm,jd,kh,km,sec,nth)
+	write(*,'(1h ,i8,4x,i5,4i3,f6.1,f12.2)')nortab(j),jy,jm,jd,kh,km,
+     x  sec,xlongs(j)
+    6 Continue
+*
+	write(*, '(1h )')
+	end if
+*
+	end if
+*
+c     -------------------------------------------
+*                                 after initialization
+	do   8 j=1,199
+	jj = j
+	if(dt0>=dtxs(j) .and. dt0<dtxs(j+1)) go to 102
+    8 Continue
+*
+	numorb = -999
+	return
+*
+102   vel(1) = vel0(1)
+	vel(2) = vel0(2)
+	vel(3) = vel0(3)
+*     --------------------------------------------*
+*     VPOS = VPOS0
+	vpos(1) = vpos0(1)
+	vpos(2) = vpos0(2)
+	vpos(3) = vpos0(3)
+*     --------------------------------------------*
+	numorb = nortab(jj)
+	xlong = xlongs(jj)
+	dtx = dtxs(jj)
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine SOLEPH(dt,  slat,slong)
+*
+*     This routine computes the instantaneous geocentric latitude and longitude of
+c     the sub-solar point as a function of either JDN or MJDN:
+*
+*     24 Jun 06; Montenbruck & Pfleger
+*     dt may be either JDN or MJDN.
+*
+	implicit double precision(a-z)
+	parameter(p2=6.28318530717959d+0)
+	real slat,slong,verneq
+cxr   dfrac,verneq
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	dtl = dt
+*
+*     Check for MJDN vs JDN
+	if(dtl .lt. 1721060.d+0) dtl = dtl + 2440588.d+0
+*
+	t = (dtl - 2451545.d0)/36525.d0
+	m = p2 * dfrac(.993133d0 + 99.997361*t)
+	dl = 6893.d0 * dsin(m) + 72.*dsin(2.d0 * m)
+	l = p2*dfrac(.7859453d0 + m/p2 + (6191.2d0*t + dl)/1296.d3)
+	sl = dsin(l)
+	x = dcos(l)
+	y = .91748d0 * sl
+	z = .39778d0 * sl
+	rho = dsqrt(1.d0 - z*z)
+	slat = 57.2957795d0 * datan2(z,rho)
+	ra = (48./p2) * datan2(y, x+rho)
+	ra = dfrac(ra/24.d0)
+	slo = verneq(dtl) + 360.d0 * ra
+	if(slo.gt.180.) slo=slo-360.
+	slong = slo
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function FLTARG(jpos)
+c     To fetch the jpos-th input argument (like IPP in McIdas)
+c     as a REAL
+*
+	character*1 cinput(80), ch
+	character*80 cin
+	equivalence(cin,cinput(1))
+cnp   fltarg
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	cin  = ' '
+	call getarg(jpos, cin)
+	kol = 1
+	jsign = 1
+	nfrac = 0
+	kpt = 0
+	mag = 0
+*
+	if(cinput(1) == '-') then
+	kol = 2
+	jsign = -1
+	end if
+*
+	do   2 n=1,32
+	 ch = cinput(kol)
+	 if(ch == ' ') go to 4
+*
+	 if(ch == '.') kpt = 1
+	 ich = ichar(ch)
+*
+	if(ich>=48 .and. ich<=57) then
+	mag=10*mag+ich-48
+	nfrac=nfrac+kpt
+	end if
+*
+2     kol=kol+1
+*
+4     flt = jsign*mag
+	if(nfrac.gt.0)flt=flt/(10.**nfrac)
+*
+	fltarg = flt
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Character*132 Function CAPLET(cvar,length)
+*
+*     25 Sep 08; revised
+c     To convert any lower case ASCII letters to CAPITALS
+	character*132 cvar,cout
+	character*1 cc,char
+	save   !  needed?
+cnp   caplet
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	cout = ' '
+*
+	if(length.ge.1 .and. length.le.132) then
+	cout(1:length) = cvar(1:length)
+*
+	do 2  j = 1,length
+	 cc = cout(j:j)
+	 ich = ichar(cc)
+	 if(ich.ge.97 .and. ich.le.122) cout(j:j) = char(ich-32)
+2     continue
+*
+	else
+	write(*, '(" CAPLET: The length must be > 0 and <= 132")')
+	end if
+*
+	caplet = cout
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+*     Vector Function VNADIR(VSAT)
+	SUBROUTINE VNADIR(VSAT,VQADIR)
+*     -----------------------------------------------
+c     This routine was originally written in Meteorological Fortran (MeteFor)
+c     in order to use MeteFor's vector and matrix notation, and is also
+c     maintained in MeteFor.  The source code appearing below was generated by
+c     the MeteFor processor, not by manual entry.  Some of the original code
+c     may appear in statements which have been commented out.  The original
+c     MeteFor source (with suffix .mtf) is more readable and better documented.
+c     See the document MeteFor.doc
+c                                          F W Nagle  (fredn@ssec.wisc.edu)
+c     ---------------------------------------------------------------------------------
+cxr   vcoord,arctan,geodet,erad84,vec4qq
+cnp   vnadir
+*
+*     Given a celestial or terrestrial satellite position vector,
+c     this routine computes in the same coordinate system the
+c     position vector of the point on the ground at the satellite
+c     nadir, taking into account the ellipsoidal shape of the
+c     earth.   This point in general is not at the geocentric
+c     latitude of the satellite.
+*
+	implicit double precision(d)
+	parameter (smajx=6378.388, sminx=6356.911946,
+     1  b=sminx/smajx, b2=b*b, d0=0.d+0, epsi=.000001)
+	integer jqmax/z'7fffffff'/
+*
+	real vqadir  (3)
+*     Vector (f)VCOORD
+	real vq41(3),vq42(3)
+	real  vbl(3),vsat(3),vll(3),vs(3),vtan(3),vg(3),view(3)
+	save
+*
+c     These values of semi-major and semi-minor axis were taken
+c     from the Encyclopedia Britannica (see Geodesy).
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*     VBL = VSAT
+	vbl(1) = vsat(1)
+	vbl(2) = vsat(2)
+	vbl(3) = vsat(3)
+*     --------------------------------------------*
+*     VLL = VCOORD(d0, VBL, 'TLL')  !  VBL may also be celestial
+*     because the longitude is irrelavent.
+	call vcoord(d0,vbl,'TLL',vll)
+*     --------------------------------------------*
+	gclat = vll(1)  !  geocentric lat of satellite
+	kase = 0
+	if(abs(gclat) < 45.) kase = 1
+*
+	if(kase == 0) then  !  high latitude case
+*      VS = VBL/smajx   !  use equatorial plane as x-axis
+	vs(1) = vbl(1)/smajx
+	vs(2) = vbl(2)/smajx
+	vs(3) = vbl(3)/smajx
+*     --------------------------------------------*
+*     VS={SQRT(VS(1)**2+VS(2)**2),ABS(VS(3)),0.}
+	rq41=vs(1)
+	rq42=vs(2)
+	rq43=rq41**2
+	rq44=rq42**2
+	rq45=rq43+rq44
+	call vec4qq(sqrt(rq45),abs(vs(3)),0.,vs)
+*     --------------------------------------------*
+	 c = b
+	 c2 = b2
+*
+	   else  !  low latitude
+*      VS = VBL/sminx   !  use Earth axis as x axis
+	vs(1) = vbl(1)/sminx
+	vs(2) = vbl(2)/sminx
+	vs(3) = vbl(3)/sminx
+*     --------------------------------------------*
+*     VS={ABS(VS(3)),SQRT(VS(1)**2+VS(2)**2),0.}
+	rq41=vs(1)
+	rq42=vs(2)
+	rq43=rq41**2
+	rq44=rq42**2
+	rq45=rq43+rq44
+	call vec4qq(abs(vs(3)),sqrt(rq45),0.,vs)
+*     --------------------------------------------*
+	 c = 1./b
+	 c2 = 1./b2
+	end if
+*
+*     We have now transformed to the meridional plane of
+c     the satellite.   Its longitude is unimportant.
+	x = vs(1)/sqrt(vs(1)*vs(1) + vs(2)*vs(2))  !  first guess
+	xl = x + .01
+	sdotj = vs(2)
+*
+*     Now seek a point (x,y) on the surface such that the earth-
+c     -to-satellite vector is normal to the tangent at the
+c     earth's surface:
+	vtan(1) = 1.
+	vtan(3) = 0.
+	vg(3) = 0.
+*
+*     do until(abs(x-xl) < epsi)  !  Newton-Raphson approx
+	do   2  kq0001 = 1,jqmax
+	if(abs(x-xl)<epsi)go to     4
+*
+	 x2 = x*x
+	 radic = sqrt(1. - x2)   !  y = c*sqrt(1. - x2)
+	 vg(1) = x
+	 vg(2) = c*radic
+*      VIEW = VS - VG   !  ground-to-satellite vector
+	view(1) = vs(1)-vg(1)
+	view(2) = vs(2)-vg(2)
+	view(3) = vs(3)-vg(3)
+*     --------------------------------------------*
+	 vtan(2) = -x*c/radic   !  VTAN is now defined.
+*      prod =  VIEW*VTAN
+	prod=view(1)*vtan(1)+view(2)*vtan(2)+view(3)*vtan(3)
+*     --------------------------------------------*
+*      if(abs(prod) <= 0.) exit
+	if(abs(prod).le.0.)go to     4
+*
+	 pp = -c*(x2/(radic**3) + radic)*sdotj - 1. + c2
+*      pp = d(prod)/dx
+	 xl = x
+	 x = x - prod/pp
+    2 Continue
+*
+4     y = c*sqrt(1. - x*x)
+*
+	if(kase == 0) then
+	 elat = sign(1.,gclat)*arctan(x,y)
+	   else
+	 elat = sign(1.,gclat)*arctan(y,x)
+	end if
+*
+	rad = erad84(geodet(elat))
+*     VNADIR=VCOORD(D0,{ELAT,VLL(2),RAD},'LLT')
+	call vec4qq(elat,vll(2),rad,vq41)
+	call vcoord(d0,vq41,'LLT',vqadir)
+*     --------------------------------------------*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+*     Vector Function VCONIC(VG,VCONE,rot)
+	SUBROUTINE VCONIC(VG,VCONE,ROT,VQONIC)
+*
+*     1 Apr 13; much shortened with do loop; in util.a
+*     -----------------------------------------------
+*     Imagine a cone whose axis is the vector VCONE with origin at the apex.  Le
+c     vector VG be an element of the cone directed away from the
+c     apex of the cone.  This vector-valued function rotates the
+c     vector VG rightward (clockwise) about the axis VCONE, as
+c     VCONE is pointed toward the viewer. If the cone is degenerate,
+c     i.e. if it is a plane, then this function is the same asc VROT4.
+c       More crudely, imagine looking into the interior of an empty
+c     ice cream cone.  The vector VCONE is the axis of the cone,
+c     directed toward the viewer.  Let the vector VG be any
+c     vector element of the cone extending from the apex of
+c     the cone toward the lip.  If the viewer now rotates the cone
+c     'rot' degrees clockwise from his perspective, around the axis VCONE,
+c     this function computes the new vector value of VG after the
+*     rotation.  If rot<0, then the rotation is counter-clockwise.
+*     The cone may be merely a plane, in which case VCONE and VG are
+c     normal.  A practical application would be determining the direction
+c     of view of a conically-scanning satellite, with the satellite's nadir
+c     view as the axis of the cone.  The length of VCONE is unimportant
+c     provided it is not zero.
+*
+C     Implicit Vector (U-V)
+*
+	real vqonic      (3)
+*     Vector (f)U4
+	real vq41(3),vq42(3),vq43(3),vq44(3),vq45(3),vq46(3)
+	real  uv(3),vcone(3),ur(3),vg(3),uh(3)
+*
+cxr   u4,sine,cosine
+cnp   vconic
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*     UV = U4(VCONE)  !  unit vector along axis of cone
+	call u4(vcone,uv)
+*     --------------------------------------------*
+*     UR = U4(VG <x> UV)  ! clockwise from VG!  <x> denotes cross product
+	vq41(1) = vg(2)*uv(3) - uv(2)*vg(3)
+	vq41(2) = vg(3)*uv(1) - uv(3)*vg(1)
+	vq41(3) = vg(1)*uv(2) - uv(1)*vg(2)
+	call u4(vq41,ur)
+*     --------------------------------------------*
+*     UH = U4(UV <x> UR)  !  UV,UR,UH are a dextral basis.
+	vq41(1) = uv(2)*ur(3) - ur(2)*uv(3)
+	vq41(2) = uv(3)*ur(1) - ur(3)*uv(1)
+	vq41(3) = uv(1)*ur(2) - ur(1)*uv(2)
+	call u4(vq41,uh)
+*     --------------------------------------------*
+*     VCONIC = (UH*VG) * (UR*sine(rot) + UH*cosine(rot)) +
+*    1  (VG*UV) * UV
+	rq41=sine(rot)
+	rq42=cosine(rot)
+	rq43= uh(1)*vg(1) + uh(2)*vg(2) + uh(3)*vg(3)
+	rq44= vg(1)*uv(1) + vg(2)*uv(2) + vg(3)*uv(3)
+*
+	do 10 i = 1,3
+10    vqonic(i) = rq43*(ur(i)*rq41 + uh(i)*rq42) + rq44*uv(i)
+*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Real Function ANG4QQ(V1,V2)
+*
+*     30 Nov 07; virtually the same as ANGBTW
+*     To compute the Real*4 angle in degrees between two  Vector*4:
+*     This function is invoked by MeteFor's ^ operator, e.g. VA^VB
+*
+	implicit none
+	double precision dot,rq81,da1,da2,darg,d0,dtest,dsqrt,dabs
+	double precision d1,dsign,dc,dacos
+	real fnan
+	integer nan
+*
+	parameter(dc = 180.d+0/3.141592653589793d+0, d0=0.d+0,
+     1  d1=1.d+0)
+	double precision vv1(3),vv2(3)
+	real  v1(3),v2(3)
+	equivalence(nan,fnan)
+	data nan/z'7f811111'/
+cnp   ang4qq
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	vv1(1) = v1(1)   !  make double precision
+	vv1(2) = v1(2)
+	vv1(3) = v1(3)
+*
+	vv2(1) = v2(1)
+	vv2(2) = v2(2)
+	vv2(3) = v2(3)
+*
+	dot = vv1(1)*vv2(1) + vv1(2)*vv2(2) + vv1(3)*vv2(3)  !  V1*V2
+	da1 = vv1(1)*vv1(1) + vv1(2)*vv1(2) + vv1(3)*vv1(3)
+	da2 = vv2(1)*vv2(1) + vv2(2)*vv2(2) + vv2(3)*vv2(3)
+	darg = da1*da2
+*
+	if(darg.le.d0)then
+	write(*, '(" ANG4QQ FAULT: an argument is zero ")')
+	write(*, '(" V1,V2 ", 1p6e13.4)') v1,v2
+	ang4qq = fnan
+*     stop 99
+*
+	else
+	dtest = dot/dsqrt(darg)
+	if(dabs(dtest).gt.d1) dtest=dsign(d1,dtest)
+	ang4qq = dc*dacos(dtest)
+	end if
+*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function SINE(xx)
+*     Argument in degrees
+*
+	implicit double precision(d)
+	parameter( dc = 3.141592653589793d+0/180.d+0)
+c     xxxxxxxxxxxxxxxxxxxxxxxxxx
+	dxx = xx
+	ds = dsin(dc*dxx)
+	sine = ds
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	FUNCTION INPARM(JYMD,CSAT)
+*
+*     18 May 13; NSC
+*     15 Oct 12; common/e1/ xndd6o moved to avoid wrap-around
+*     28 Mar 09; change in print format
+*     15 Feb 09; checks for ch13 (Carr Ret) in satellite ident line:
+c     8 Feb 09; inp=1 if TLINSET does not exist
+*     2 Jun 08; orbit number at epoch NORBIT is passed back thru
+*       common/norb/.  It is position 64-68 of line 2 of TLE.
+c     23 Jan 08; in util.a
+*
+*    Orbital parameters (2-line elements) are available
+*    through the web site:  celestrak.com/pub/elements/weather.txt
+*
+*     To install orbital parameters from the 2-line element file:
+*     This routine may fail if it is called from an arbitrary
+c     program.  It is properly called only from VNORAD or another
+c     routine which properly initiates the common blocks.
+*
+*     The requested date jymd is in the form (yy)yymmdd, and the
+c     satellite identifier is character*8, e.g. NOAA11, DMSP14, etc.
+*
+*     The returned functional value is zero if parameters were
+c     correctly installed, and one otherwise.
+cxr   nthday,kpattn,dtmjdn,caplet,isopen
+c     --------------------------------------------------
+	implicit double precision(d)
+	character*1 ch13
+	character*8 csat,cloc
+	character*80 cline
+	character*132 caplet
+	real buf(13),hold(13),de2ra
+	logical lexist
+	integer jqmax/z'7fffffff'/
+*
+	common/e1/dtelem,ds50,xmo,xnodeo,omegao,eo,xincl,xno,xndt2o,
+     x xndd6o,bstar,x,y,z,xdot,ydot,zdot    !  15 Oct 12
+*     xndd6o is used in sgp, but not in sgp4 or sgp8
+	common/c1/ck2,ck4,e6a,qoms2t,s,tothrd,xj3,xke,eqrad,xmnpda,ae
+	common/c2/de2ra,pi,pio2,twopi,x3pio2
+	common/norb/norbit  !  orbit num from line 2 pos 64-68 of TLE
+*
+	equivalence(buf(1),dtelem)
+	save
+*
+	data xj2,xj4,qo,so/1.082616e-3, -1.65597e-6,120., 78./
+	data init/0/
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+*
+	if(init.eq.0)then
+	inquire(file='TLINSET', exist=lexist)
+*
+	if(.not.lexist)then
+	write(*, '(" The Two-Line Element File TLINSET is required,"/
+     1  " but does not exist."/)')
+	dtelem = -1.d+0
+	inp = 1
+	go to 202
+	end if
+*
+	 e6a = 1.e-6
+	 pi = 3.14159265
+	 de2ra = pi/180.
+	 pio2 = pi/2.
+	 tothrd = .66666667
+	 twopi = 2.*pi
+	 x3pio2 = 3.*pio2
+	 xj3 = -.253881e-5
+	 xke = .743669161e-1
+	 eqrad = 6378.135
+	 xmnpda = 1440.
+	 ae = 1.
+	 ck2 = .5*xj2
+	 ck4 = -.375*xj4
+	 qoms2t = ((qo - so)/eqrad)**4
+	 s = (1. + so/eqrad)
+	 init = 1
+	end if
+*
+	inp = 1
+	cloc = ' '
+	ch13 = char(13)  !  carriage return
+*
+	if(abs(pi-3.14159).gt..001.or.abs(xmnpda-1440.).gt..1)then
+	 write(*, '(" INPARM: common blocks c1 and c2 appear not"/
+     1  " to be properly initialized."/)')
+	 write(*,'(" INPARM should be called by VNORAD/VNORAX.")')
+	 go to 202
+	end if
+*
+	do   2 i=1,8
+	if(csat(i:i).eq.' ') go to 4
+*
+2      cloc(i:i) = csat(i:i)
+*
+4     nth = nthday(jymd/10000, mod(jymd/100,100), mod(jymd,100))
+	jyyddd = 1000*(jymd/10000) + nth
+*
+	if(jyyddd.lt.100000)then
+	if(jyyddd.gt.70000) jyyddd = jyyddd + 1900000
+	if(jyyddd.le.70000) jyyddd = jyyddd + 2000000
+	end if
+*
+	cloc = caplet(cloc,8)
+	if(isopen(58).eq.0) open(58,file='TLINSET',
+     x form='formatted',status='old',access='sequential')
+	relmin = 1.e+30
+	kfound = 0
+	dtymd = dtmjdn(jyyddd/1000, 0, mod(jyyddd,1000), 0,0,0)
+*
+	do 6 kq = 1,jqmax
+	 read(58, '(a80)',end=990,err=992) cline
+*
+	 do k = 1,8  !  remove any carriage return;  15 Feb 09
+	 if(cline(k:k) == ch13) cline(k:k) = ' '
+	 end do
+*
+	 kpat = kpattn(cline,80,cloc,8,0)
+	 if(kpat.eq.0) go to 6
+*
+	 kfound = 1
+	 read(58,'(18x,d14.8,1x,f10.8,2(1x,f6.5,i2))',end=992,err=980)
+     1  dtelem,xndt2o,xndd6o,iexp,bstar,ibexp
+	 read(58, '(7x, 2(1x,f8.4), 1x, f7.7, 2(1x,f8.4), 1x, f11.8,i5)',
+     x  err=982) xincl,xnodeo,eo,omegao,xmo,xno,norbit
+*     2 Jun 08; changed here to acquire norbit
+*
+	 jepoch = dtelem
+	 if(jepoch.ge.70000) jepoch=jepoch+1900000
+	 if(jepoch.lt.70000) jepoch=jepoch+2000000
+	 dtep = dtmjdn(jepoch/1000, 0, mod(jepoch,1000),0,0,0)
+	 rel = dtymd - dtep
+	if(abs(rel).lt.1.) go to 20  !  very close
+*
+	if(rel.lt.0. .and. abs(rel).gt.relmin) go to 990
+*
+	if(abs(rel).lt.relmin)then   !  closest thus far
+	 relmin = abs(rel)
+*
+	do 8 i=1,13  !  tentatively store these parameters:
+8     hold(i) = buf(i)
+*
+	end if
+*
+6     Continue
+*
+	write(*, '(" INPARM: no elements found for ", i10)') jymd
+	dtelem = -1.d+0
+	go to 202
+*
+20    xndd6o = xndd6o*(10.**iexp)
+	xnodeo = xnodeo*de2ra
+	omegao = omegao*de2ra
+	xmo = xmo*de2ra
+	xincl = xincl*de2ra
+	temp = twopi/(xmnpda*xmnpda)
+	xno = xno*temp*xmnpda
+	xndt2o = xndt2o*temp
+	xndd6o = xndd6o*temp/xmnpda   !  used in sgp
+	a1 = (xke/xno)**tothrd
+	temp = 1.5*ck2*(3.*cos(xincl)**2-1.)/(1.-eo*eo)**1.5
+	del1 = temp/(a1*a1)
+	ao  = a1*(1. - del1*(.5*tothrd + del1*(1. + 134.*del1/81.)))
+	delo = temp/(ao*ao)
+	xnodp = xno/(1.+delo)
+	ideep = 0
+	if(twopi/(xnodp*xmnpda).ge..15625)ideep=1
+*
+	if(ideep.gt.0)then
+	write(*, '(" INPARM: This orbit requires deep space logic")')
+	dtelem = -1.d+0
+	go to 202
+	end if
+*
+	bstar = bstar*(10.**ibexp)/ae
+	close(58)
+	inp = 0
+*
+202   inparm = inp
+	return
+*
+990   if(kfound.eq.0)then
+	write(*, '(" INPARM: no parameters found for this satellite: ",
+     1  a8)') csat
+	dtelem = -1.d+0
+	go to 202
+	end if
+*
+	do  10 i=1,13
+10    buf(i) = hold(i)
+*
+	go to 20
+*
+992   write(*, '(" INPARM input error ")')
+	kfound = 0
+	go to 990
+*
+980   backspace(58)
+	read(58,*) cline
+	write(*,'(" INPARM: Error in reading Line 1 of elements:"/1h ,
+     x  a80)') cline
+	go to 992
+*
+982   backspace(58)
+	read(58,*) cline
+	write(*,'(" INPARM: Error in reading Line 2 of elements:"/1h ,
+     x  a80)') cline
+	go to 992
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine SGP4(iflag,tsince)
+*
+*     3 May 12; Line 91 cut to 71 spaces for gfortran; in util.a on Codex
+*     5 Oct 11; NSC
+*     7 May 08; This routine divides by eccentricity in computing c3.
+c      A failure will occur at that point if eo = 0.
+c     26 Nov 07; tested using NORPASS; looks OK, recommended by Kelso;
+*       in util.a on laptop
+*     11 Dec 98; received from UW astronomy department, via FTP
+c       from sal.wisc.edu; sign in as anonymous; go to the
+c       directory pub/jwp; then FTP the file spacetrk.zip;  use
+c       the command 'unzip' on Unix
+*
+*     This routine was written by NORAD, not by SSEC.
+*
+*     The flag 'iflag' should be 1 on the first call to perform
+c     needed initialization, and zero thereafter.
+*     The input argument 'tsince' is time since epoch in
+c     minutes.  It may be positive or negative.
+*
+*     The output vectors are celestial, not terrestrial.
+*     The position vector uses earth-radius as its unit of length
+*     The velocity vector (returned thru common) is in
+c     radians/minute.    See common/e1/ for outputs.
+*
+*     Input time 'tsince' is in minutes since epoch, and
+c     may be positive or negative.
+*
+	double precision epoch, ds50
+	common/e1/epoch,ds50,xmo,xnodeo,omegao,eo,xincl,xno,xndt2o,
+     1   xndd6o,bstar,x,y,z,xdot,ydot,zdot
+*     23 Dec 98; epoch,ds50 moved to front of common block to
+c     avoid bad alignment
+*
+	common/c1/ck2,ck4,e6a,qoms2t,s,tothrd,
+     1   xj3,xke,xkmper,xmnpda,ae
+	save
+cxr   fmod2p,arctan
+cnp   sgp4
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	if (iflag .eq. 0) go to 100
+*
+*      Recover original mean motion (xnodp) and semimajor axis (aodp)
+*      from input elements
+	a1 = (xke/xno)**tothrd
+	cosio = cos(xincl)
+	theta2 = cosio*cosio
+	x3thm1 = 3.*theta2-1.
+	eosq = eo*eo
+	betao2 = 1.-eosq
+	betao = sqrt(betao2)
+	del1 = 1.5*ck2*x3thm1/(a1*a1*betao*betao2)
+	ao = a1*(1. - del1*(.5*tothrd + del1*(1. + 134./81.*del1)))
+	delo = 1.5*ck2*x3thm1/(ao*ao*betao*betao2)
+	xnodp = xno/(1.+delo)
+	aodp = ao/(1.-delo)
+*
+*      Initialization
+*
+*   For perigee less than 220 kilometers, the isimp flag is set and
+*   the equations are truncated to linear variation in sqrt a and
+*   quadratic variation in mean anomaly.  Also, the c3 term, the
+*   delta omega term, and the delta m term are dropped.
+*
+	isimp=0
+	if((aodp*(1.-eo)/ae) .lt. (220./xkmper+ae)) isimp=1
+*
+*      For perigee below 156 km, the values of
+*      s and qoms2t are altered
+*
+	s4 = s
+	qoms24 = qoms2t
+	perige = (aodp*(1.-eo)-ae)*xkmper
+	if(perige .ge. 156.) go to 10
+*
+	s4 = perige-78.
+	if(perige .gt. 98.) go to 9
+*
+	s4 = 20.
+*
+    9 qoms24 = ((120.-s4)*ae/xkmper)**4
+	s4 = s4/xkmper+ae
+*
+   10 pinvsq = 1./(aodp*aodp*betao2*betao2)
+	tsi = 1./(aodp-s4)
+	eta = aodp*eo*tsi
+	etasq = eta*eta
+	eeta = eo*eta
+	psisq = abs(1.-etasq)
+	coef = qoms24*tsi**4
+	coef1 = coef/psisq**3.5
+	c2 = coef1*xnodp*(aodp*(1. + 1.5*etasq + eeta*(4. + etasq)) +
+     x  .75*ck2*tsi/psisq*x3thm1*(8. + 3.*etasq*(8. + etasq)))
+*     3 May 12; changed here
+	c1 = bstar*c2
+	sinio = sin(xincl)
+	a3ovk2 = -xj3/ck2*ae**3
+*
+	if(abs(eo) .gt. 0.) then
+	c3 = coef*tsi*a3ovk2*xnodp*ae*sinio/eo
+	 else
+	write(*, '(" SGP4: The routine is about to divide by zero",
+     x  " eccentricity and is ending.")')
+	x = 0.
+	y = 0.
+	z = 0.
+	return
+	end if
+*
+	x1mth2 = 1.-theta2
+	c4 = 2.*xnodp*coef1*aodp*betao2*(eta*
+     1    (2.+.5*etasq)+eo*(.5+2.*etasq)-2.*ck2*tsi/
+     2    (aodp*psisq)*( - 3.*x3thm1*(1. - 2.*eeta + etasq*
+     3    (1.5-.5*eeta))+.75*x1mth2*(2.*etasq-eeta*
+     4    (1.+etasq))*cos(2.*omegao)))
+	c5 = 2.*coef1*aodp*betao2*(1.+2.75*(etasq+eeta)+eeta*etasq)
+	theta4 = theta2*theta2
+	temp1 = 3.*ck2*pinvsq*xnodp
+	temp2 = temp1*ck2*pinvsq
+	temp3 = 1.25*ck4*pinvsq*pinvsq*xnodp
+	xmdot = xnodp + .5*temp1*betao*x3thm1 + .0625*temp2*betao*
+     1     (13. - 78.*theta2 + 137.*theta4)
+	x1m5th=1.-5.*theta2
+	omgdot=-.5*temp1*x1m5th + .0625*temp2*(7.-114.*theta2 +
+     1     395.*theta4) + temp3*(3.-36.*theta2 + 49.*theta4)
+	xhdot1=-temp1*cosio
+	xnodot=xhdot1 + (.5*temp2*(4.-19.*theta2) + 2.*temp3*(3.-
+     1   7.*theta2))*cosio
+	omgcof = bstar*c3*cos(omegao)
+	xmcof = -tothrd*coef*bstar*ae/eeta
+	xnodcf = 3.5*betao2*xhdot1*c1
+	t2cof = 1.5*c1
+	xlcof = .125*a3ovk2*sinio*(3.+5.*cosio)/(1.+cosio)
+	aycof = .25*a3ovk2*sinio
+	delmo = (1.+eta*cos(xmo))**3
+	sinmo = sin(xmo)
+	x7thm1 = 7.*theta2-1.
+	if(isimp .eq. 1) go to 90
+*
+	c1sq=c1*c1
+	d2=4.*aodp*tsi*c1sq
+	temp=d2*tsi*c1/3.
+	d3=(17.*aodp + s4)*temp
+	d4=.5*temp*aodp*tsi*(221.*aodp + 31.*s4)*c1
+	t3cof=d2 + 2.*c1sq
+	t4cof=.25*(3.*d3 + c1*(12.*d2+10.*c1sq))
+	t5cof=.2*(3.*d4 + 12.*c1*d3 + 6.*d2*d2 + 15.*c1sq*(
+     1     2.*d2+c1sq))
+   90 iflag=0
+*
+*      Update for secular gravity and atmospheric drag
+*
+  100 xmdf = xmo + xmdot*tsince
+	omgadf = omegao + omgdot*tsince
+	xnoddf = xnodeo + xnodot*tsince
+	omega = omgadf
+	xmp = xmdf
+	tsq = tsince*tsince
+	xnode = xnoddf + xnodcf*tsq
+	tempa = 1.-c1*tsince
+	tempe = bstar*c4*tsince
+	templ = t2cof*tsq
+	if(isimp .eq. 1) go to 110
+*
+	delomg = omgcof*tsince
+	delm = xmcof*((1. + eta*cos(xmdf))**3-delmo)
+	temp = delomg + delm
+	xmp = xmdf + temp
+	omega = omgadf-temp
+	tcube = tsq*tsince
+	tfour = tsince*tcube
+	tempa = tempa-d2*tsq-d3*tcube-d4*tfour
+	tempe = tempe + bstar*c5*(sin(xmp)-sinmo)
+	templ = templ + t3cof*tcube +
+     1   tfour*(t4cof + tsince*t5cof)
+*
+110   a = aodp*tempa**2
+	e = eo - tempe
+	xl = xmp + omega + xnode + xnodp*templ
+	beta = sqrt(1.-e*e)
+	xn = xke/a**1.5
+*
+*      long period periodics
+*
+	axn = e*cos(omega)
+	temp = 1./(a*beta*beta)
+	xll = temp*xlcof*axn
+	aynl = temp*aycof
+	xlt = xl + xll
+	ayn = e*sin(omega)+aynl
+*
+*      Solve Kepler's equation
+*
+	capu = fmod2p(xlt-xnode)
+	temp2 = capu
+*
+	do 130 i = 1,10
+	sinepw = sin(temp2)
+	cosepw = cos(temp2)
+	temp3 = axn*sinepw
+	temp4 = ayn*cosepw
+	temp5 = axn*cosepw
+	temp6 = ayn*sinepw
+	epw = (capu-temp4+temp3-temp2)/(1.-temp5-temp6)+temp2
+	if(abs(epw-temp2) .le. e6a) go to 140
+*
+  130 temp2=epw
+*
+*      short period preliminary quantities
+*
+  140 ecose = temp5+temp6
+	esine = temp3-temp4
+	elsq = axn*axn+ayn*ayn
+	temp = 1.-elsq
+	pl = a*temp
+	r = a*(1.-ecose)
+	temp1 = 1./r
+	rdot = xke*sqrt(a)*esine*temp1
+	rfdot = xke*sqrt(pl)*temp1
+	temp2 = a*temp1
+	betal = sqrt(temp)
+	temp3 = 1./(1.+betal)
+	cosu = temp2*(cosepw-axn+ayn*esine*temp3)
+	sinu = temp2*(sinepw-ayn-axn*esine*temp3)
+*     u = actan(sinu,cosu)
+	u = .0174532925*arctan(cosu,sinu)
+	if(u .lt. 0.) u = u + 6.2831853
+*     To simulate ACTAN, which returns 0 to 2*pi
+	sin2u = 2.*sinu*cosu
+	cos2u = 2.*cosu*cosu-1.
+	temp = 1./pl
+	temp1 = ck2*temp
+	temp2 = temp1*temp
+*
+*      Update for short periodics
+*
+	rk = r*(1.-1.5*temp2*betal*x3thm1)+.5*temp1*x1mth2*cos2u
+	uk = u-.25*temp2*x7thm1*sin2u
+	xnodek = xnode+1.5*temp2*cosio*sin2u
+	xinck = xincl+1.5*temp2*cosio*sinio*cos2u
+	rdotk = rdot-xn*temp1*x1mth2*sin2u
+	rfdotk = rfdot + xn*temp1*(x1mth2*cos2u + 1.5*x3thm1)
+*
+*      orientation vectors
+	sinuk = sin(uk)
+	cosuk = cos(uk)
+	sinik = sin(xinck)
+	cosik = cos(xinck)
+	sinnok = sin(xnodek)
+	cosnok = cos(xnodek)
+	xmx = -sinnok*cosik
+	xmy = cosnok*cosik
+	ux = xmx*sinuk + cosnok*cosuk
+	uy = xmy*sinuk + sinnok*cosuk
+	uz = sinik*sinuk
+	vx = xmx*cosuk - cosnok*sinuk
+	vy = xmy*cosuk - sinnok*sinuk
+	vz = sinik*cosuk
+*
+*      position and velocity
+	x = rk*ux
+	y = rk*uy
+	z = rk*uz
+*     write(*, '('' lv sgp4, tsince,x,y,x '', e14.7,3f10.3)')
+*    x  tsince,x,y,z
+	xdot = rdotk*ux + rfdotk*vx
+	ydot = rdotk*uy + rfdotk*vy
+	zdot = rdotk*uz + rfdotk*vz
+*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function COSINE(xx)
+*
+	implicit double precision(d)
+	parameter( dc = 3.141592653589793d+0/180.d+0)
+c     xxxxxxxxxxxxxxxxxxxxxxxxx
+	dxx = xx
+	ds = dcos(dc*dxx)
+	cosine = ds
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Real Function VERNEQ(dtx)
+*     To find the longitude of the Vernal Equinox at time dtx:
+*     Input may be either JDN, or MJDN based on 1 Jan 1970
+*
+*     Version of 22 May 08
+*     Ref: Montenbruck & Pfleger (4th edition) p. 40
+*     This differs from the earlier version based on the 1991 edition
+c     by about .000008 deg
+*
+	implicit double precision (a-h,o-z)
+	parameter(dp5=.5d+0, d360=360.d+0, dspd=86400.d+0, d1=1.d+0)
+cxr   dfrac
+cnp   verneq
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	djdn = dtx
+	if(djdn .lt. 1721060.d+0) djdn = djdn + 2440588.d+0
+c     To determine if time is JDN or MJDN:
+	df = dfrac(djdn)
+*
+c     Compute 00h UT of the current day:
+	djdn0 = djdn - df + dp5
+	if(df <= dp5) djdn0 = djdn0 - d1
+*
+	t = (djdn - 2451545.d+0)/36525.d+0
+	t0 = (djdn0 - 2451545.d+0)/36525.d+0
+	ut = dspd * (djdn - djdn0)
+	gmst = 24110.54841d+0 + 8640184.812866d+0 * t0
+     x  + 1.0027379093d+0 * ut + t*t*(.093104d+0 - 6.2d-6 * t)
+	ve = d360 * (d1 - dfrac(gmst/dspd))
+	if(ve .gt. 180.d+0) ve = ve - d360
+	verneq = ve
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Real Function GEOCEN(gdl)
+*     -----------------------------------------------
+*     23 Jul 01
+*     To convert geodetic latitude in degrees (gdl) to geocentric:
+*
+*     See GEODET.f for explanation of this algorithm.
+*
+	parameter (smajx=6378388., sminx=6356911.946,
+     1  b=sminx/smajx, b2 = b*b)
+*
+c     These values of semi-major and semi-minor axis were taken
+c     from the Encyclopedia Britannica (see Geodesy).
+*
+cnp   geocen
+cxr   tangent,arctan
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	gd = abs(gdl)
+*
+	if(gd .ge. 90.) then
+	gc = 90.
+*
+	else
+	tand = tangent(gd)
+	gc = arctan(1., b2*tand)  !  output in degrees
+	end if
+*
+	geocen = gc*sign(1., gdl)
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function NSCAN(kol,card)
+*
+*     28 Jun 06; corrected error involving minus sign; see below
+*     15 Jun 06; modified to accept minus sign
+*     Derived from NSCAN.hlf, used in McEDIT
+*
+*     This function will scan across preceding blanks on an ASCII line
+c     to find the next numeric field, from which it will compute
+c     a binary value.  kol does not need to be set to the
+*     beginning of the next ASCII integer value.
+*
+	character*1 card,ch
+	dimension card(32)
+	data n0,n9/48,57/
+cnp   nscan
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxx
+	mag = 0
+	kmag = 0
+	jsign = 1
+*
+	do 10 n = 1,16
+	ch = card(kol)
+*
+*    Find the start of the next integer field:
+	if(ch .eq. ' ') then
+	if(kmag.eq.0 .and. jsign.gt.0) go to 10
+	go to 22
+	end if
+*
+	if(ch .eq. '-') then
+	jsign = -1
+	go to 10
+	end if
+*
+	ich = ichar(ch)
+	if(ich.lt.n0 .or. ich.gt.n9) go to 22
+	kmag = 1
+	mag = 10*mag + ich - n0
+10    kol = kol + 1
+*
+22    nscan = jsign*mag
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine JULINV(julin, ky,km,kd, cmon,nth)
+*     -----------------------------------------------
+*     29 May 02; this routine does not deal with MJDN.  It is most
+*     commonly called by TCIVIL, which makes the needed adjustment for MJDN.
+*      Julin is a Julian Day Number (epoch 4713 BC).
+*     30 Dec 99; upper JDN limit set to 3182410, roughly 3999 AD:
+*
+*     To convert the Julian Day Number (JDN) to civil date:
+*     This routine works for years 4 AD to 3999 AD.
+*     A 4-digit year ky is returned.  The returned ASCII month is of
+*     the form ' Jan', i.e. character*4 with a lead blank.  nth
+*     is the day of the year (1-366).
+*     See the document: Julian.Day.Number
+*
+	character*4 cmon,cmons(12)
+	integer jqmax/z'7fffffff'/
+*
+	data cmons/' Jan',' Feb',' Mar',' Apr',' May',' Jun',' Jul',
+     1  ' Aug',' Sep',' Oct',' Nov',' Dec'/
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	jdn = julin
+	if(jdn<1721060 .or. jdn>3182410) go to 900
+c     1721060 is the JDN beginning 12z, 1 Jan 0000 AD.   0000 AD is the year
+c     preceding 1 AD.  00 AD did not exist historically, and would be
+*     referred to as 1 BC or BCE by historians.
+*
+	ndce = jdn - 1721060  !  num of days of Christian era
+	kwads = ndce/146097   ! num of complete  400-year periods in Christian era
+	nrem = ndce - 146097*kwads  !  days in excess of complete 400-yr cycles
+	long = 1
+*     Count an extra day for a long century, i.e. with 25 leap
+c     years, vs. a short century with only 24.
+	ncents = 0
+*
+	do   2 kq0001 = 1,jqmax
+	nrem=nrem-(36524+long)
+*      if(nrem < 0) exit
+	if(nrem.lt.0)go to   4
+*
+	 long = 0
+2     ncents=ncents+1
+*
+4     nrem=nrem+(36524+long)
+	nquads = 0
+*
+	do   6 kq0002 = 1,jqmax
+	nrem=nrem-(1460+long)
+	if(nrem.lt.0)go to   8
+*
+	 long = 1
+6     nquads=nquads+1
+*
+8     nrem=nrem+(1460+long)
+	kyear = 400*kwads + 100*ncents + 4*nquads
+	long = 1
+*
+	do  10 kq0003 = 1,jqmax
+	nrem=nrem-(365+long)
+	if(nrem.lt.0)go to  12
+*
+	 long = 0
+10    kyear=kyear+1
+*
+12    nrem=nrem+(365+long)
+	kym1 = kyear - 1
+	leap = (mod(kym1,4)+1)/4 - (mod(kym1,100)+1)/100
+     1  + (mod(kym1,400)+1)/400
+*     leap=1 for a leap year; 0 for a common year
+	kode = 1115212 - 4*leap   !  encodes num of days in each month
+	nth = nrem + 1
+*
+	do  14 m=1,12
+	 mm = m
+	 ndm = 31 - mod(kode,4)
+	 nrem=nrem-ndm
+	 if(nrem.lt.0)go to  16
+*
+14    kode=kode/4
+*
+16    nrem=nrem+ndm
+	kd = nrem + 1
+	km = mm
+	cmon = cmons(mm)
+	ky = kyear
+	return
+*
+900   write(*, '(" JULINV: JDN out of range:", i14)') jdn
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function TANGENT(xx)
+*     Argument in degrees; same as tangnt
+*     Tangent of an angle expressed in degrees:
+*     -----------------------------------------------
+	implicit double precision(d)
+	parameter(ddr = 3.141592653589793d+0/180.d+0)
+	equivalence(jj,fjj)
+cnp   tangent
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	x = xx
+	dx = x
+	da = ddr*dx
+	dc = dcos(da)
+*
+	if(dabs(dc) <= 0.d+0) then
+	write(*, '(" TANGENT: Bad Argument: ", 1pe14.5)') xx
+	jj = 2139095040  !   7f800000z
+	tangent = fjj    !  inf
+	return
+	end if
+*
+	ds = dsin(da)
+	dtan = ds/dc
+	tangent = dtan
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine KLOCK(jymd,jhms)  !  to read the hardware clock:
+*     -----------------------------------------------
+*     This routine reads the hardware clock and does nothing to
+c     correct or adjust it.
+*
+*     29 May 06; tested superficially
+	character*3 cmon
+*
+cnp   klock
+cxr   calday
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	call getday(jyyddd)  !  a C routine
+	call gettim(jhms)  !  a C routine
+	call calday(jyyddd, ny,nm,nd, cmon)
+	jymd = 10000*ny + 100*nm + nd
+*     write(*, '('' klock, jymd,jhms '', 2i10)') jymd,jhms
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Double Precision Function DTMJDN(myrx,mon,mday,jhour,jmin,jsec)
+*     -----------------------------------------------
+c     To compute time as Modified Julian Day Number (MJDN), based on
+c     the epoch of 12z 1 January 1970:
+*     A Julian Day and a Modified Julian Day both begin at noon Greenwich, not midnight.
+*     See the document Julian.Day.Number
+*
+*     The Modified Julian Day Number is the Julian Day Number
+c     of a given date, with the JDN of 12z 1 Jan 1970 subtracted.
+*
+*      The last 3 arguments may be either REAL*4 or INTEGER*4.
+*
+*     Mon may be zero, in which case mday is interpreted as the day
+c     of the year (1-366) rather than the day of the month.
+*     This routine cannot be used for times earlier than
+c     12z 1 January 1970.
+*
+	implicit double precision(d)
+	equivalence(khour,hour),(kmin,fmin),(ksec,sec)
+*     save
+	data imax/16777216/
+*
+cxr   julday
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	myr = myrx  !  test last 3 args for Real or Integer:
+	khour = jhour
+	kmin = jmin
+	ksec = jsec
+	if(khour < imax) hour = khour
+	if(kmin < imax) fmin = kmin
+	if(ksec < imax) sec = ksec
+*
+	kalday = mday
+	jday = kalday
+	month = mon
+	if(mon /= 0) go to 10
+*
+*     Month is zero; hence count the days
+	jcode = 1115212
+	m100 = mod(myr,100)
+	m400 = mod(myr,400)
+	m4 = mod(myr,4)
+	if(m400==0 .or. (m4==0 .and. m100/=0) ) jcode = 1115208
+*
+	do 12 m = 1,12
+	month = m
+	ndm = 31 - mod(jcode,4)
+	jday = jday - ndm
+	if(jday .le. 0) go to 20
+12    jcode = jcode/4
+*
+20    kalday = jday + ndm
+*
+	if(month>12 .or. kalday>31) then
+	write(*, '('' DTMJDN: month & day:'', 2i8)') month,kalday
+	stop 99
+	end if
+*
+*     We jump directly here if the month is expressed.
+10    djul = julday(myr, month, kalday) - 2440588
+*     2440588 is the JDN beginning at 12Z 1 Jan 1970
+c     djul = djul + dble((hour + fmin/60. + sec/3600.)/24.)
+	dhour = hour
+	dmin = fmin
+	dsec = sec
+	djul = djul + (dhour + dmin/60.d+0 + dsec/3600.d+0)/24.d+0
+	dtmjdn = djul - .5d+0   !  A Julian Day begins at noon, not midnight
+	if(djul <= 0.d+0) dtmjdn = 0.d+0    !  8 Nov 02
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Double Precision Function DTEPOC(dttle)
+*
+*     To convert the time of a Two-Line element yyddd.fffff... to MJDN:
+	implicit double precision (d)
+cxr   dtmjdn
+cnp   dtepoc
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	jepoch = dttle
+	dint = jepoch
+	dfrac = dttle - dint
+	if(jepoch >= 70000) jepoch = jepoch + 1900000
+	if(jepoch < 70000) jepoch = jepoch + 2000000
+	dtepoc = dtmjdn(jepoch/1000, 0, mod(jepoch,1000),0,0,0) + dfrac
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Double Precision Function DFRAC(ditem)
+*
+*     The function returns the fraction from the algebraically
+*     lesser integer, i.e.
+*
+c     1.7 yields .7   and   -1.7 yields .3
+*
+	implicit double precision (a-h,o-z)
+cnp   dfrac
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	df = ditem
+*
+	if(dabs(df) .gt. 2147483647.9999d0) then
+	write(*, '(" DFRAC: argument is too large: ", d20.10)') df
+	dfrac = 999999999.
+*
+	  else
+	item = df
+	df = df - dfloat(item)
+	if(df .lt. 0.d+0) df = df + 1.d+0
+	dfrac = df
+	end if
+*
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function NTHDAY(ny,nm,nd)
+*
+*     3 Dec 11; removed redundant definition of nth
+*     28 Apr 10; slight simplification involving nd
+*
+*     This function returns the day of the year (1-366), given
+c     the civil year,month,day.
+cnp   nthday
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	kode = 1115212
+	if(mod(ny,4).eq.0 .and. mod(ny,100).ne.0) kode = 1115208
+*     Years divisible by 100 are ordinarily common years.
+	if(mod(ny,400) .eq. 0) kode = 1115208
+*     Years divisible by 400 are leap years
+	nth = nd
+*
+	if(nm .gt. 1) then
+	m = nm - 1
+*
+	do 110 j = 1,m
+	nth = nth + 31 - mod(kode,4)
+110   kode = kode/4
+*
+	end if
+*
+	nthday = nth
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function KPATTN(cline,lenli,cpat,leng,kode)
+*
+*     To find the column (1-lenli) where a given pattern begins
+*     If kode=0, searches for exact pattern in 'cpat'
+c     If kode!=0, disregards lower/upper case, i.e.  xyz = XYZ
+*     If the pattern does not exist, zero is returned.
+*     leng  is the length of the pattern, with maximum 24.
+*
+	character*132 cline,caplet
+	character*24 csub,cpatl,cpat
+cxr   caplet
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	len = leng
+	if(len.gt.24)len=24
+	cpatl = ' '
+	cpatl = cpat(1:len)
+	if(kode.ne.0)cpatl=caplet(cpatl,len)
+*
+	do   2 k=1,lenli
+	 k1 = k
+	 k2 = k1 + len - 1
+	if(k2.gt.lenli)go to 4
+*
+	 csub = cline(k1:k2)
+	 if(kode.eq.1) csub=caplet(csub,len)
+	 if(csub.eq.cpatl) go to 20
+*
+    2 continue
+*
+4     kpattn = 0
+	return
+*
+20    kpattn = k1
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function ISOPEN(lun)
+*     To ascertain if logical unit number lun is open:
+c     (1=yes, 0=no)
+*
+	logical lopen
+c     xxxxxxxxxxxxxxxxxxxxx
+	inquire(lun, opened=lopen)
+	iset = 0
+	if(lopen) iset = 1
+	isopen = iset
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Function FMOD2P(x)
+*     2 Nov 11; modified slightly from fmod2p.orig; requires no SAVE
+*     -----------------------------------------------
+*     This routine was not written by SSEC
+*
+*     Used in connection with NORAD SGP and SGP4
+	data twopi/6.2831853/
+*
+cnp   fmod2p
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	fmod2p = x
+	i = fmod2p/twopi   !  conv to radians
+	fmod2p = fmod2p - twopi*float(i)
+	if(fmod2p.lt.0.) fmod2p = fmod2p + twopi
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Subroutine CALDAY(iyyddd, ny,nm,nd,  cmon)
+*
+*     To convert an INTEGER date in the form yyddd
+*     to separate INTEGER year, month, and day, plus
+c     an ASCII CHARACTER*3 month:
+*
+	character*3 cmons(12),cmon
+	data cmons/'Jan', 'Feb', 'Mar', 'Apr', 'May',
+     1 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'/
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	jyyddd = iyyddd
+*
+	if(jyyddd.lt.1900000)then
+*
+	if(jyyddd.gt.70000)then
+	jyyddd=jyyddd + 1900000
+*
+	  else
+	jyyddd=jyyddd + 2000000
+	end if
+*
+	end if
+*
+	 ky = jyyddd/1000
+	 kd = mod(jyyddd,1000)
+	 kode = 1115212
+	if(mod(ky,4).eq.0 .and. mod(ky,100).ne.0)kode=1115208
+	if(mod(ky,400).eq.0)kode=1115208
+*
+	do   2 m=1,12
+	km = m
+	ndm = 31 - mod(kode,4)
+	kd=kd-ndm
+	if(kd.le.0)go to 4
+*
+	kode=kode/4
+    2 continue
+*
+4     kd=kd+ndm
+	nm = km
+	cmon = cmons(km)
+	nd = kd
+	ny = ky
+	return
+	end
+*      rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+	Integer Function JULDAY(jyear,month,jday)
+*     -----------------------------------------------------------------------
+*     Documentation:  7 Jun 12
+*
+*     Language: Fortran-77
+*
+*     Input Arguments:
+*     jyear - a 2- or 4-digit year of the Christian calendar.  If 2 digits
+*               are given, the 21st century is assumed. (I4)
+*     month - The value 1 to 12, expressing a month (I4)
+*     jday - an integer 1 to 31 expressing the day of the month (I4)
+*
+*     Functional Value:
+*     An integer from 1 to infinity expressing the Julian Day Number (I4)
+*
+*     See the Implicit Name Rule appearing below.
+*
+*     Discussion
+*     See the document Julian.Day.Number for an explanation of this value.
+*     CAUTION: This version does not accept month=0 as an input argument.
+*     See Montenbruck & Pfleger 2005 edition, p. 15
+*
+*     Programmer; F W Nagle, SSEC, Univ of Wisc
+*     fredn@ssec.wisc.edu
+*     ---------------------------------------------------------------------------
+	implicit double precision(d)
+*     To find the Julian Day Number beginning at 12 UT on the given date:
+*
+cnp   julday
+c     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+	jy = jyear
+	if(jy.lt.100)jy = jy+2000-100*(mod(jy,100)/70)
+*     In case only 2 digits are given for the year
+*
+	mon = month
+	km = (12 - mon)/10  !  1 if mon = 1,2!  zero otherwise
+	mon = mon + 12*km
+	jy = jy-km
+	dj = 365*jy - 679004 + jy/400 -jy/100 + jy/4
+     x  + idint(30.6001d+0*dfloat(mon+1)) + jday
+*     dj is the number of days since 00z 17 Nov 1858.
+	julday = dj + 2400001.d+0   !  full Julian Day Number
+	return
+	end