#!/usr/local/bin/perl
$num = $#ARGV;
$raddir="/zd/kwajex/opra";

if ($num <=-1) {
print"usage: opraingest.loop wildcard(withoutasterisk)\n";
}
else {

$wild =$ARGV[0];
$lendir=length($raddir)+1;

foreach $file (`ls $raddir/*$wild*cdf`){


chop($file);
# extract out the date and time from the filename
#$datestr=substr($file,$lendir+4,7);

print("processing $file\n");
# assumes only dealing with 3d files
#print("/home/echo2/map/ascii.files/ingestoprafile $datestr $topheight $derivefields");
system("/home/echo/yuter/src/cdf-src/cdfopraqccdf $file");

}
}
exit(0);
