GradsDODS

Arlindo da Silva dasilva at ALUM.MIT.EDU
Fri Feb 8 08:56:08 EST 2008


On Feb 8, 2008 1:44 AM, Steven Weiss <sweiss at iafrica.com> wrote:

>  Hi,
> I am downloading a grib file and processing it through my script. It all
> works great. I have since discovered that I can avoid the 34mb download by
> using gradsdods and opening up a server url e.g.
> http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z
>
> I can run my script over this successfully however it is painfully slow. I
> am retrieving all the variables over 180hr for a specified lat/lon grid
> point.
>


Grib2 has great compression capabilities at the expense of speed: it takes
time to decompress the files. While switching to GRIB2 may have decresead
data storage requirementments for the data producers and download time for
the people getting the actual files, it certainly caused a degradation of
the OPeNDAP services for sites serving the grib-2 files directly.


>
> A little bit of investigation tells me that I should be downloading a
> subset of the data to my local drive i.e. a lat/lon range and running my
> script over that instead.
>
> How can I do this? Some examples would be useful.
>
>

If you want to do this over OPeNDAP you can use lats4d (see recent posting
for the latest script). Here is an example for creating a subset of the
data:

lats4d -i
http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z  -o
myfile -vars *ugrdsfc *vg*rdsfc -lat 20 60 -lon -100 20 -v*
**

If you omit -vars, you get all variables, if you omit the -lat/-lon you get
the whole domain; you can also specify -time/-levs if you would like to
subset along those dimensions.  In grads v1.9, by default this will produce
a netcdf file called myfile.nc; use "-format grads_grib" to get a grib-1
file, "-format stream" to get a flat binary, "-format sequential" for a f77
sequential file. At this point you can only specify -format sream/sequential
with grads v2.

Another point, you can use this command inside gradsdods, or from the unix
command line with the lats4d sh(1) script (this also be done under windows
if using sh.exe or tcsh.exe). The command line wrapper is useful for putting
lats4d based fetches on a crontab.

       Arlindo









>  Regards
> Steven
>



--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080208/59e5de71/attachment.html 


More information about the gradsusr mailing list