downloading multiple parameters with get_gfs.pl partial gfs download

258 Views Asked by At

I tried to run the following in cmd:

perl get_gfs.pl data 2021041900 0 6 3 "TMAX.2 m|TMIN.2 m" .

However it doesn't return any data. If I only pass one parameter, for example:

perl get_gfs.pl data 2021041900 0 6 3 TMAX.2 m . 

it works well.

Example and download script taken from here: https://www.cpc.ncep.noaa.gov/products/wesley/get_gfs.html

1

There are 1 best solutions below

0
On BEST ANSWER

Going over the linked script, it looks like the single variable command:

perl get_gfs.pl data 2021041900 0 6 3 TMAX.2 m .

isn't quite right.

Running that seems to download the inventory files only (.tmp files), and that the correct invocation should be something like:

perl get_gfs.pl data 2021041900 0 6 3 TMAX "2 m" .

separating the variable list (TMAX) from the levels list (2 m, which matches 2 m above ground).

So, modifying that for the multiple variable case, you would run:

perl get_gfs.pl data 2021041900 0 6 3 TMAX:TMIN "2 m" .

The use of : instead of | is based on the documentation at the top of the script; internally it replaces : with | before using the regex, but it seems prudent to respect what the script says it expects.

In any case, running either of those commands downloads 2 files fully, both of which are identified as:

Gridded binary (GRIB) version 2

and with the second TMAX:TMIN case the files are approximately twice as big, seemingly indicating that they contain all the additional data.