OpenDAP GRIB Retrieval from Nomads
James T. Potemra
jimp at HAWAII.EDU
Thu Nov 12 13:05:18 EST 2009
Hi Mark:
Should be pretty straightforward. Just follow the link you give below
and you should see a list of the GDS catalog at nomads (the listing has
names like gfs20091101). Select whichever date in which you are
interested, and you should see a page with the data set catalog. For
example, I just clicked on the top one gfs20091014 and got a list with
gfs_00z, gfs_00z_anl, etc. Again, pick the one of interest and click on
the "info" link. E.g., I clicked on the "info" link next to gfs_00z
(the direct URL is
http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z.info).
All you need is the "OPeNDAP/DODS Data URL" listed at the top, again in
this case it is
http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
(Note here that you can't always assume the syntax of the DODS Data URL
will be similar to the catalog URL, but in this case it happens to be).
So, now all you need to do is fire up GrADS (or gradsdods depending on
your binary version), then type in "sdfopen xxx" where "xxx" is the DODS
data URL from above. You should then have total access to the data set,
at which point you'll first be amazed at the simplicity with which you
can access data without actually having to transfer/reformat/etc., and
then you'll be looking for a way to thank all the brilliant minds that
provide us with this capability. The final step, if you really want to
download, is just "set lat ...", "set lon...", "set lev...", "set
time..", "set gxout fwrite" and "d variable".
Jim
PS. Here's what it looks like for the sample file:
grads -l
Welcome to the OpenGrADS Bundle Distribution
--------------------------------------------
For additional information enter "grads -h".
Starting
"/usr/local/grads-2.0.a7.oga.2/Contents/Linux/Versions/2.0.a7.oga.2/x86_64/grads
-l " ...
Grid Analysis and Display System (GrADS) Version 2.0.a7.oga.2
Copyright (c) 1988-2008 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Config: v2.0.a7.oga.2 little-endian readline printim grib2 netcdf
hdf4-sds hdf5 opendap-grids,stn athena geotiff
Issue 'q config' command for more information.
Loading User Defined Extensions table
</usr/local/grads-2.0.a7.oga.2/Contents/Linux/Versions/2.0.a7.oga.2/x86_64/gex/udxt>
... ok.
GX Package Initialization: Size = 11 8.5
ga-> sdfopen http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
Scanning self-describing file:
http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
SDF file http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1000 1000
Time values set: 2009:10:14:0 2009:10:14:0
E set to 1 1
ga-> q file
File 1 : GFS fcst starting from 00Z14oct2009, downloaded Oct 14 04:24 UTC
Descriptor: http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
Binary: http://nomads.ncep.noaa.gov:9090/dods/gfs/gfs20091014/gfs_00z
Type = Gridded
Xsize = 360 Ysize = 181 Zsize = 26 Tsize = 61 Esize = 1
Number of Variables = 139
absvprs 26 t,z,y,x ** (1000 975 950 925 900.. 70 50 30 20 10)
none absolute vorticity [1/s]
no4lftxsfc 0 t,y,x ** surface none best (4 layer) lifted index [k]
no5wava500mb 0 t,y,x ** 500 mb none 5-wave geopotential height
anomaly [gpm]
no5wavh500mb 0 t,y,x ** 500 mb none 5-wave geopotential height
[gpm]
....
ga-> set lat -90 90
LAT set to -90 90
ga-> set lon 130 150
LON set to 130 150
ga-> set t 1
Time values set: 2009:10:14:0 2009:10:14:0
ga-> set z 1
LEV set to 1000 1000
ga-> set gxout fwrite
ga-> d ugrdprs
Wrote 3801 of 3801 elements to grads.fwrite as Stream Little_Endian
Mark Hess wrote:
> All,
>
> I tried to search the GRADSUSR archives for the answer to this
> question, but it gives me the error errno=146 "unable to initiate
> communication...". Perhaps you all can offer an answer.
>
> Does anyone have any sample strings for use with gradsdods to retreive
> a GFS grib file from the NWS NCEP MOMANDS OpenDAP server?
> (http://nomads.ncep.noaa.gov:9090/dods/gfs)
>
> I'm especially interested in how to extract data for a specified
> geographical region.
>
> If anyone can get me started with this, I should be able to take an
> example and work from there.
>
> Thank you.
>
> Mark
>
More information about the gradsusr
mailing list