<div class="gmail_quote">On Feb 8, 2008 1:44 AM, Steven Weiss &lt;<a href="mailto:sweiss@iafrica.com">sweiss@iafrica.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2">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. <a href="http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z" target="_blank">http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z</a></font></div>

<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font></div></div></blockquote>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>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&nbsp;storage&nbsp;requirementments&nbsp;for the data producers and download time for the people getting the actual files, it certainly caused a degradation&nbsp;of the OPeNDAP services for sites serving the grib-2 files directly.</div>

<div>&nbsp;</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#ffffff">
<div><span id=""></span>&nbsp;</div>
<div><font face="Arial" size="2">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&nbsp;over that instead.</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">How can I do this?&nbsp;Some examples would be useful.</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div></div></blockquote>
<div>&nbsp;</div>
<div>If you want to do this over&nbsp;OPeNDAP you can use lats4d (see recent posting for the latest script). Here is an example for creating a subset of the data:</div>
<div>&nbsp;</div>
<div>lats4d -i&nbsp;<a href="http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z" target="_blank">http://nomad5.ncep.noaa.gov:9090/dods/waves/nww3/nww320080206/nww3_18z</a>&nbsp;&nbsp;-o myfile -vars <strong>ugrdsfc </strong>vg<strong>rdsfc -lat 20 60 -lon -100 20 -v</strong></div>
<strong></strong></div>
<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">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. &nbsp;In grads v1.9, by default this will produce a netcdf file called <a href="http://myfile.nc">myfile.nc</a>; use &quot;-format grads_grib&quot; to get a grib-1 file, &quot;-format stream&quot; to get a flat binary, &quot;-format sequential&quot; for a f77 sequential file. At this point you can only specify -format sream/sequential with grads v2.</div>

<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">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.</div>

<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Arlindo</div>
<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">&nbsp;</div>
<div class="gmail_quote">
<div><br></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#ffffff">
<div><span id=""></span></div>
<div><font face="Arial" size="2">Regards</font></div>
<div><font face="Arial" size="2">Steven </font></div></div></blockquote></div><br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>