#!/usr/freeware/bin/perl use Time::JulianDay; $rootDir = "/Net/ftp_pub/ERS"; $urlBase = "http://www.coaps.fsu.edu/cgi-bin/dods/nph-nc/dods_data"; $dataRoot = "QuikSCAT_NRT_1d"; $name = "QuikSCAT_NRT_1d"; $fileBase = "gcv_QSCAT_"; $fileSuffix = ".nc"; @hours = ('00', '06', '12', '18'); chdir("$rootDir"); open (DAT, ">$rootDir/catalog.dat"); $urlLength = 0; @years = (2002, 2003, 2004); foreach $year (@years) { for ($jday = 1; $jday <= 366; $jday++) { $jdaystring = sprintf("%.3d", $jday); for ($hour = 0; $hour < 4; $hour++) { $file = $hours[$hour] . "/$fileBase" . $year.$jdaystring.$hours[$hour].$fileSuffix; print "$file\n"; if (-e $file) { $jd1=julian_day($year-1,12,31); $jd1 += $jday; ($yr, $m, $d) = inverse_julian_day($jd1); $date = sprintf("%.4d/%.2d/%.2d:%s %.3d ", $year, $m, $d, $hours[$hour], $jday); print DAT "$date"; $url = "$urlBase/$dataRoot/$file"; $blah = length("$url"); if ($blah > $urlLength) { $urlLength = $blah; } print DAT "$url\n"; } } } } close DAT; $urlLength += 19 - 1; open(FMT, ">$rootDir/catalog.fmt"); print FMT <