#!/bin/csh

if ($#argv != 4) then
        echo "Usage: $0 yyyy mm dd scan"
	echo "   where"
	echo "     scan = scan (ex. ppi, pps, rhi)"
	echo "     mm = month (ex. 01)"
	echo "     dd = day (ex. 12)"
	echo "     yyyy = year (ex. 2012)"
	exit
endif

 set scan = $4
 set month = $2
 set day = $3
 set year = $1


cd /gpmraid/raw/NPOL/Newark/

if (-e /gpmraid/raw/NPOL/Newark/$year/$month$day/$scan/) then
idl << EOF
	sort_data,'$year','$month','$day','$scan'
EOF
endif




