#! /bin/sh export PATH=.:$PATH clear echo "Example 4: Re-aggregate 2 files, each with 4 ATMS-SDR and 4 ATMS-SDR-GEO granules into 3 granule aggregations." echo " echo " Note that with the -g no option nagg does not process or produce geolocation granules." echo " echo "Note also that -A 90 for these products with a granule duration of ~32 seconds will convert to an aggregation number of 3, as will any value for -A between 64 and 96. The next integer n greater than the seconds specified by -A / granule duration will be used for the aggregation number." echo "" echo "Note also that nagg may produce partial aggregations at the beginning or end of the granules processed depending on whether or not the input granules completely fill the first and last buckets for the products and the chosen aggregation number." echo "" echo "Input files:" echo "" ls ex1/GATMO-SATMS_npp_d20120404*.h5 echo "" # clean out output directory ls ex4/* >& /dev/null RETVAL=`echo $?` if [ "${RETVAL}" -eq "0" ]; then rm ex4/* fi echo "Command to run:" echo "" echo "nagg -g no -A 90 -t SATMS -d ex4 ex1/GATMO-SATMS_npp_d20120404*.h5" read x nagg -g no -A 90 -t SATMS -d ex4 ex1/GATMO-SATMS_npp_d20120404*.h5 echo "" echo "Output files:" ls ex4/* echo "" echo -n "show granules in output files (h5ls -r | grep Data_Products)" read x cd ex4 ofiles=`ls` for f in $ofiles; do echo "" echo "File: $f" h5ls -r $f | grep Data_Products done cd ..