Skip to content

Instantly share code, notes, and snippets.

@nilsmagnus
Created April 19, 2017 20:07
Show Gist options
  • Save nilsmagnus/7bd2a5e30188571a0cf4cccbe99e6b11 to your computer and use it in GitHub Desktop.
Save nilsmagnus/7bd2a5e30188571a0cf4cccbe99e6b11 to your computer and use it in GitHub Desktop.
Download grib files from noaa.gov. Will only work every hour a new forecast is published.
#!/usr/bin/env bash
urldate=`date +%Y%m%d%H`
mkdir -p "data/gfs/$urldate"
cd "data/gfs/$urldate"
for no in `seq -f "%03g" 0 3 30`;
do
echo " Fetching log for date $urldate, no $no"
wget "http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.$urldate/gfs.t00z.pgrb2.2p50.f$no"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment