#! /bin/sh export PATH=.:$PATH clear echo "Example 1: Aggregate 8 ATMS-SDR files with 1 granule each into 4 granule aggregations packaged with associated geolocation granules." echo "" echo "Note that by default nagg aggregates geolocation granules along with sensor data product granules if they are in the same files or in the files named in the /N_GEO_Ref attribute in the same directory as the sensor data product files. If not found nagg will return an error." echo "" echo "Input files:" echo "" ls datafiles/GATMO_npp*.h5 ls datafiles/SATMS*.h5 echo "" # clean out output directory ls ex1/* >& /dev/null RETVAL=`echo $?` if [ "${RETVAL}" -eq "0" ]; then rm ex1/* fi echo " Command to run:" echo "nagg -n 4 -t SATMS -d ex1 datafiles/SATMS*.h5" read x nagg -n 4 -t SATMS -d ex1 datafiles/SATMS*.h5 echo "" echo "Output files:" ls ex1/* echo "" echo -n "show granules in output files (h5ls -r | grep Data_Products)" read x cd ex1 ofiles=`ls` for f in $ofiles; do echo "" echo "File: $f" h5ls -r $f | grep Data_Products done cd ..