Blog

Signature: pAvYxGXV+n5RPvHmAD13Lk6prjmCmewYzVrKObrowoj5nYuozGjm89bGbwPjx5b/onysQU1ou5/oY50NxixXRgeaT9gZ8LLYugkX+0veVWK/yrAfM2hxYAQMM5c6kM5ZmQIVliySCcn/9cOAdHZjtaAy0ADDxvwZUtuQOZR4pi3VdlH5CyiZbaNKi1WUmpkJpqubtDjSqju6urxHzk7wNv19SdBzIDoAXwSpjOFPIkafTDCf1vLJMBwzRy3uFnwbelLs+Uxht6gx0KBLrsYrFL9iIFiOcoiADfatIpK0yyJuPK45SSFYxGn+q0pZKiLps0yNAnptIy3Nm+onlX1LTgcfx0F++2gV4ljz5rRSEaT82pUrdCFpaXNqOC14GzPNPBGwd9+fkn3MpVC3AjVt+AfZ7JZ1FJ6dzr/xFYWHOa2ssiDgBmWjLIxEXM1hqX0aVnnhwhkwwmFlxvI7ZF3LUbv5ur+UqwcsRwNjW8IVVu/1ccfFtnB8wkSUfg/2VljEjEBHVci0ztGZE5nRsCF8D56YKkjY0uveOP0IDf3PQ0pRqzU+dFr69/uHy5u0AfZK1JKL4kADYeBmXt5TECsFO8k4VviIK7BTWiJNjZLf9qyETH0zQ2gpa2G0xOZOvjJzGf474gu9U/4cltmZZtleWzhN8YUczeZjd/0rSHCvmwpVD7N+tYX33SeMBDyKO1yhuYlWFgP3axM7wbVD7dnM7bmJficeQPhRUvfYYwADa8gpcjvFdd89IBmMUNDcdDJOsI6ZRZCT6h6NDiCanIozOGiwqgMJps9jKS6PKkzBllq8JJSq65SO2xbS15LBfy6BkyAtCV/9acDB1wd8Qk5+XKPR8VbBhajVznh8M0Ci5jlfvEwoms3804s5RtPawjYBmULAepUbW6QL+ioPok0HT+m1mc6ui8MdOLEu2Pu1hwWqMPXFU+AfLjP1OlkGgiLkzLl2IZu5t5J/Yh3B17X+DWFv+AwFo6RFTe5zrYn8+UE=

Smart Server Hopping: GFS Downloader Navigates NOAA and AWS

by Mike Schienle

Smart Server Hopping: GFS Downloader Navigates NOAA and AWS

If you’ve ever tried pulling fresh GFS (Global Forecast System) data only to watch your download slow to a crawl, you know the frustration. I’ve recently been polishing a Perl script called Wx_GFS_Download.pl that handles the job with a bit of built-in cleverness and very little drama. It’s not revolutionary meteorology, but it reliably fetches GFS files while keeping things lightweight and entertaining for a fellow Perl hacker or weather nerd.

My weather data adventures began in aerospace, working on DMSP (Defense Meteorology Satellite Program) satellites, including the SSM/T-2 microwave sounder, at Aerojet Electro-Systems in Azusa, CA. Later, I worked with Landsat and MODIS programs at Hughes Santa Barbara Research Center.

After more than a decade in defense, I moved into finance. Around 2005, I was building tools for Citadel’s Energy Trading desk, delivering specific GFS slices to meteorologists each morning as fast as possible. Those early projects showed me that speed and dependability often matter more than complexity when real decisions depend on the data.

The downloader prefers the NOMADS server but keeps Amazon S3 ready as backup. It checks speeds and automatically hops if throughput drops below 20 MB/s. No parallel downloads are used since both hosts throttle multiple connections, so the script stays sequential and smart. The script primarily uses DBI, HTTP::Request, and LWP::UserAgent under the hood. Logging is handled by Log::Log4perl and Slack provides a coarser level of status messages.

It constructs paths like this for each date, cycle, and forecast hour:

```perl

$aws_s3_base = 's3://noaa-gfs-bdp-pds';

$nomads_base = 'https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod';

@urls_base = ($nomads_base, $aws_s3_base);

$dirRoot = sprintf "%s/%s/c%02d/f%03d", $ENV{WX_GFS_DATA}, $gfs_date, $cycle, $forecast;

# dirRoot: /Volumes/Weather/GFS/2026-07-22/c06/f004

$path_file = sprintf "%s/GRB_Full/gfs.t%02dz.%s.f%03d", $dirRoot, $cycle, $product, $forecast;

# path_file: /Volumes/Weather/GFS/2026-07-22/c06/f004/GRB_Full/gfs.t06z.pgrb2.0p25.f004

```

The actual fetch switches cleanly between HTTP and the AWS CLI:

Last Updated


© 2003-2026      Custom Visuals, LLC      Privacy Policy