#!/usr/local/bin/perl #-- -*-perl-*- # Tue Apr 04 16:57:05 EDT 2000 Austin David # Copied from gcv_glob, modified for a different data set # Mon Jul 26 15:03:30 EDT 1999 Austin David # Copied from nscat-gcv, modified for a different data set # performs interactive downloading of NSCAT gridded data # based on getwoce, getcoare and nscat-get # jns 07 Oct 1997 # 26 Oct 1997 - playing with the -T (taint checking) flag # 04 May 1998 - revised for the GCV Indian Ocean NSCAT winds # 06 Aug 1998 - revised to bring it into line with nscat-get's # multi-tabular calendar entry (aka a bank calendar) # first entry is blank, since the arrays are in the range of 0->N # and a zeroeth month doesn't make much sense... ;) @smon=(' ','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); #init these lists to the months, they'll be replaced along the way. # this is retarded @size=(0,0,0,0,0,0,0,0,0,0,0,0,0); @sfile=@smon; @efile=@smon; use CGI; use CGI::Carp; use Date::Manip; use Time::JulianDay; use File::Basename; $|=1; # we want piping hot pipes! # Fields are located in: /Net/data/qscat/data/GofM/YYYY/HH/ $paths = "/Net/data/qscat/data/GofM/"; # read up the coaps header file for inclusion #print "Content-type: text/html\n\n"; open(COAPS,"/Net/coaps/httpd/docs/lib/nav/navbar_test.html") or die $!; @coaps=; close(COAPS); opendir(DIR,$paths) || die "can't open directory: $paths"; %files = {}; @years = sort grep(/^[0-9]{4}$/, readdir(DIR)); foreach $year (@years) { @filesnc = (); foreach $hr ("00", "06", "12", "18") { # print "
\n $year " . $paths.$year."/$hr\n
\n"; opendir YEAR, $paths.$year."/$hr"||die "can't open year $year in $paths\n"; push @filesnc, sort grep(/\.nc$/, readdir(YEAR)); # print "
@filesnc
"; } $files{$year} = join " ", @filesnc if @filesnc; } closedir(DIR); print qq( COAPS QuikSCAT 4xDaily Pseudo-Stress Vectors for the Gulf of Mexico @coaps

COAPS QuikSCAT 4xDaily Pseudo-Stress Vectors for the Gulf of Mexico


Fields of pseudo-stress are produced using a variational approach (direct minimization) with tuning parameters determined using Generalized Cross-Validation (GCV). These products are on a 0.5x0.5° grid, and are available four times daily (0Z, 6Z, 12Z, and 18Z). The scatterometer winds, and these gridded winds, are calibrated to a height of 10 m. This approach utilizes the only QuikSCAT observations filtered by the NOF rain flag and should be considered as a research quality data set.

The technique used to make these fields is based on the method of Pegion, P. J., M. A. Bourassa, D. M. Legler, and J. J. O'Brien, 2000: Objectively-derived daily "winds" from satellite scatterometer data. Mon. Wea. Rev., 128, 3150-3168.


From this interface, you can download individual files, files grouped by month, or the entire collection of gridded QuikSCAT data produced here at COAPS; each for a particular 6-hour period, set of periods, or all.

These files are in NetCDF format, which can be obtained from UNIDATA.

Routines to read the NetCDF formatted files can be found here.

\n); #ndn_gcvnscat_1997089.nc #NSCAT.wt1.0.1997134.nc # $irec=0; # $oldmonth=8; # $oldfile=''; # foreach $file (@filesnc) { # # print "
$file
\n"; # (undef,undef,$dates)=split(/\_/,$file); # print "
$dates
\n"; # $dates = basename($dates,'.nc'); # ($yr,$days)=unpack("A4A3",$dates); # $jd1=julian_day($yr-1,12,31); #find the number of days thru the last # #day of the previous year, add to it the # #relative number of days, then invert it # #to a real date... # $jd1=$days+$jd1; # (undef, $month, undef) = inverse_julian_day($jd1); # if ($month != $oldmonth) { # $efile[$oldmonth]=$oldfile; # $oldmonth=$month; # $sfile[$month]=$dates; # } # $size=-s "$paths/$file"; # $size[$month]=$size[$month]+$size; # $irec++; # $oldfile=$dates; # $efile[$month]=$dates; # } # We need to sum the files in month-long bits; there are/will be # several years, so we count those, too... $sum = 0; foreach $year (sort @years) { # debug # print "year: -- $year
\n"; # for every day in this year ... foreach $day (sort (split ' ', $files{$year})) { # print "$day
\n"; # grab the date-part of the filename (undef,undef,$dates)=split(/\_/,$day); $dates = basename($dates,'.nc'); ($yr,$days, undef)=unpack("A4A3A2",$dates); $jd1=julian_day($yr-1,12,31); #find the number of days thru the last #day of the previous year, add to it the #relative number of days, then invert it #to a real date... $jd1=$days+$jd1; (undef, $month, undef) = inverse_julian_day($jd1); # OK -- at this point, we have a single file (for one day's data) # and the month of that day; we now add the size of the file to the # accumulated total for this year/month @bits = split '_', $day; $nums = $bits[3]; (undef, $hour_part, undef) = unpack "A17A2A3", $day; # $hour_part = $day; $hour_part = s/^(\d\d)\.nc$/$1/o; $this_day = -s $paths . $yr . "/$hour_part/" . $day; # $this_day = -s $paths . $yr . "/$hour_part/" . $day; # print "
" . $paths . $yr . "/$hour_part/" . $day . "
\n"; if ($this_day) { $size{"$yr/$month"} += $this_day; } else { # print "Whoa! No size for $yr / $month\n"; # This is printing for 2000 / 12. ??? } # print "$yr / $month\n"; # print ": " . $size{$yr}[$month] . "\n"; # we keep a running total, too: $sum += $this_day; } } $sum=sprintf "%6.2f mb",$sum/(1024*1024); print qq (

Select to download either a set of files, or a single file.

); print qq( "; ##### print ""; print ""; print "
Set of files Single file
); print qq(

Download entire dataset, or just selected months as a convenient tar file: (You must select times (GMT) of day.)

Entire Dataset ($sum)
); # $check="checked"; # foreach $mon (7..12,1..6) { # $year=1999; # if ($mon < 7) {$year=2000;} # if ($sizes[$mon] > 0.0) { # print qq( # $smon[$mon] $year ($size[$mon])
); # $check=''; # } # } #print "check it!\n"; $check = "checked"; sub bymon { ($y,$m) = split "/", $a; ($z,$n) = split "/", $b; # print "y $y v $z and $m v $n
\n"; $y <=> $z or $m <=> $n; } foreach $ym (sort bymon keys %size) { ($year, $mon) = split "/", $ym; # debug # print "
\nSizing: $year, $mon\n"; print "\t"; print qq( $smon[$mon] $year ); print "(" . (sprintf "%6.2f kb", $size{$ym}/1024) . ")
\n"; $check=''; } print ""; print "Select times (GMT) of day: \n"; print ""; foreach $hr ("00", "06", "12", "18", "all") { print "\t"; print "[$hr]\n"; } print "
\n"; print qq(

Please select one of the following options (compression is highly recommended):

\t tar'd file
\t gzip'd tar file
\t compress'd tar file

); print "

"; print ""; print ""; print "Download an individual uncompressed file: (Only available for dates listed left.)\n"; print ""; print ""; print "


"; print "Year: "; print "\n"; print "Month: "; print "\n"; print "Day: "; print "\n"; print "Hour: "; print "\n"; print "

\n"; ##### print "
"; print qq(
); # open V, "/Net/coaps/httpd/docs/scatterometry/scat_nav_bar.html"; # @v = ; # close V; # print "
\n@v
\n"; print < http://www.coaps.fsu.edu/scatterometry/index.shtml http://www.coaps.fsu.edu/lib/biblio/scatterometry/ http://www.coaps.fsu.edu/ NSCAT Background QuickSCAT Background http://www.coaps.fsu.edu/scatterometry/Nscat/animations.shtml
http://www.coaps.fsu.edu/qscat/anim/
http://www.coaps.fsu.edu/scatterometry/Nscat/still_images.shtml science applications links http://www.coaps.fsu.edu/scatterometry/Nscat/sci_appl.shtml http://www.coaps.fsu.edu/scatterometry/Nscat/swaths.shtml http://www.coaps.fsu.edu/~bourassa/QSCAT_CV/swaths.shtml http://www.coaps.fsu.edu/scatterometry/Nscat/gridded.shtml http://www.coaps.fsu.edu/~bourassa/QSCAT_CV/gridded.shtml http://www.coaps.fsu.edu/~bourassa/scat_html/NSCAT_CV/data_sets.shtml qscat cal/val
NEXT print qq(Last modified 17 July 2000
Feedback - Dr. Mark Bourassa \n); # (c) Tue Apr 18 17:25:07 EDT 2000 Austin David -- all the noise above