Downloading from the ABRFC Archives
The following script was tested on both UNIX and Windows platforms running a standard installation of PERL. A couple of notes for configuring the script:
First, browse the archive and find the files you wish to download. (The sample script pretends you want all 1-hour precipitation images for March 8, 2001.)
Next, save and edit this script. To adapt for your usage, update the $local_dir variable and the list of files to download.
To download the script, either cut and paste from the window below, or click here.
If you have problems, please email us and we will try to help you.
#!/usr/bin/perl
use LWP::Simple;
#supply the local directory you want to store the files into
#note the use of \/ instead of /
$local_dir = "d:\/myresearch\/abrfc_data\/2001_images\/";
#specify the files you want to download
@images = (
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200100z.gif", # 00z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200101z.gif", # 01z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200102z.gif", # 02z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200103z.gif", # 03z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200104z.gif", # any comment
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200105z.gif", # can be
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200106z.gif", # here
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200107z.gif", # because I
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200108z.gif", # have the
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200109z.gif", # pound sign
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200110z.gif", # ......
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200111z.gif", # 11z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200112z.gif", # 12z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200113z.gif", # 13z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200114z.gif", # 14z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200115z.gif", # 15z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200116z.gif", # 16z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200117z.gif", # 17z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200118z.gif", # 18z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200119z.gif", # 19z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200120z.gif", # 20z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200121z.gif", # 21z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200122z.gif", # 22z
"http://www.srh.noaa.gov/archive/tua/2001/mar/1hr_images/0308200123z.gif");
# last line can have a comment too, but notice the different ending
#do not change anything beyond this point
foreach $image_url (@images)
{
print "$image_url \n";
@fields = split /\//, $image_url;
$image = @fields[-1];
$image_path = $local_dir.$image;
getstore($image_url, $image_path);
}
|
|