The National Weather Service publishes a tremendous amount of information at https://www.nws.noaa.gov/. What you may not know is that they also make data available via ftp. There's an experimental project that you might enjoy.
See https://www.nws.noaa.gov/ndfd/technical.htm for a listing of what you can get, and https://www.nws.noaa.gov/ndfd/technical.htm for the file names and ftp directories to access. For example, to get temperature forecasts for my area (Massachusetts), I'd get ftp://tgftp.nws.noaa.gov/SL.us008001/ST.expr/DF.gr2/DC.ndfd/AR.neast/ds.temp.bin
That's a packed binary file, and you need the "degrib" program to decode them. Get that from https://www.nws.noaa.gov/mdl/NDFD_GRIB2Decoder/. There are instructions on the web site for compiling a Linux version, but I found that all I needed to do after untarring the download was:
cd ./degrib/src/degrib cp makefile.linux makefile make cp degrib /usr/bin
The degrib program is simple to use, but you first need a file containing the latitude and longitude for the point (or points) you are interested in. I used this:
42.06,-71.11 42.07,-71.10 41.48,-71.20 42.25,-73.20
which represents two points very near my home, one somewhere in Providence RI, and one at the far western part of Mass. You can look up coordinates at https://www.bcca.org/misc/qiblih/latlong.html; if the longitude is expressed as West, you want to multiply it by -1 for your file. Now to run degrib:
# looking at max temperature file here degrib ds.maxt.bin -P -pntFile lat -pntStyle 0
That produces this output:
element, unit, refTime, validTime, (42.060000,-71.110000), (42.070000,-71.100000), (41.480000,-71.200000), (42.250000,-73.200000) MaxT, [F], 200401122100, 200401140000, 38.191, 38.191, 38.191, 29.191 MaxT, [F], 200401122100, 200401150000, 8.452, 8.452, 12.232, 6.292 MaxT, [F], 200401122100, 200401160000, 12.341, 12.341, 16.301, 4.241 MaxT, [F], 200401122100, 200401170000, 9.281, 9.281, 12.341, 5.321 MaxT, [F], 200401122100, 200401180000, 22.177, 22.177, 23.257, 21.277 MaxT, [F], 200401122100, 200401190000, 25.273, 25.273, 28.333, 24.373 MaxT, [F], 200401122100, 200401200000, 30.299, 30.299, 31.199, 28.319
That's forecasted temperatures for the 14th through the 20th; I ran this on Jan 12,2004.
Different output formats are available. If you get something like this:
element, unit, refTime, validTime, (42.060000,71.110000), (42.070000,71.100000), (41.480000,71.200000), (42.250000,73.200000) MaxT, [F], 200401122100, 200401140000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401150000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401160000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401170000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401180000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401190000, 9999.000, 9999.000, 9999.000, 9999.000 MaxT, [F], 200401122100, 200401200000, 9999.000, 9999.000, 9999.000, 9999.000
it means that you either downloaded the wrong file (the point isn't included in the file you downloaded) or you misentered the points (did you forget to use a minus sign for longitude?).
Have fun. There's lots of other data available; current and historical. Finding it can sometimes be challenging, but just about anything you could ever want to know about weather is there somewhere.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-05-01 Tony Lawrence
A man can be destroyed but not defeated. (Ernest Hemingway)
FTP data isn't just in the directory I mentioned above. As I said, it can be hard to figure out where to look. These
https://www.nws.noaa.gov/tg/datahelp.html
https://www.nws.noaa.gov/tg/obsfiles.html
are of some help.
--TonyLawrence
Printer Friendly Version
Weather Forecast Data Copyright © January 2004 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version