<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div>
<div>
<div style="font-family: Calibri, sans-serif; ">Hi Wesley,</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Thank you for your reply and sorry for the slow response. &nbsp;</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">I checked the packing like you suggested and the NAM model files I'm using are compressed with jpeg2000, hence the slowness.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">I did what you suggested by converting the grb2 files to complex packing, but I'm still having problems with slowness – it didn't seem to buy me much.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">I'm thinking that if there was a way I could change the grid used from Lambert Conformal to just a regular lat/lon grid, which would eliminate the need for a PDEF entry in the ctl file, it would speed things up
 a lot. &nbsp;I've checked around online, but haven't had any luck.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Do you know if there is a way to do that using lats4d or the re() function? Or anything else? &nbsp;</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Thanks again for your help.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Best,</div>
<div style="font-family: Calibri, sans-serif; ">Sam</div>
<div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; ">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Wesley Ebisuzaki - NOAA Federal &lt;<a href="mailto:wesley.ebisuzaki@noaa.gov">wesley.ebisuzaki@noaa.gov</a>&gt;<br>
<span style="font-weight:bold">Reply-To: </span>GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Wed, 17 Apr 2013 07:54:29 -0400<br>
<span style="font-weight:bold">To: </span>GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [gradsusr] Faster point output from grb data files<br>
</div>
<div><br>
</div>
<div dir="ltr">
<div>
<div>
<div>Sam,<br>
<br>
</div>
&nbsp;&nbsp;&nbsp; Grib2 files compressed with jpeg2000 are slow to read.&nbsp;&nbsp; You can determine<br>
the type of compressing by using <br>
<br>
</div>
&nbsp;&nbsp;&nbsp; wgrib2 IN.grb -packing<br>
<br>
</div>
<div>You can speed up the reading of jpeg compressed grib2 files by converting<br>
the file to complex packing.<br>
<br>
</div>
<div>&nbsp;&nbsp;&nbsp; wgrib2 IN.grb -set_grib_type c3 -grib_out OUT.grb<br>
<br>
</div>
<div>c3 is good for smooth fields and c1 is good for noisy fields.&nbsp; Many people<br>
use jpeg compression because it often makes the smallest files.<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">After converting the file, the index files will have to be remade.<br>
<br>
</div>
<div class="gmail_extra">&nbsp;Wesley<br>
<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Apr 16, 2013 at 7:16 PM, Sam Wilson <span dir="ltr">
&lt;<a href="mailto:sam@surfline.com" target="_blank">sam@surfline.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;word-wrap:break-word">
<div>
<div>
<div style="font-family:Calibri,sans-serif">Hi,</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">I have a set of grads scripts that generate point output of&nbsp;various variables (wind, pressure, etc.)&nbsp;for many locations using different model datasets in grb format. &nbsp;I'm using the&nbsp;gr2stn function to get the output
 at the station locations. &nbsp;Most of my scripts run very quickly and generate data for thousands of locations. &nbsp;However, some of them are very slow and will take many hours to get output at all the points I want. &nbsp;The only difference between the scripts are
 the dataset that they are accessing and using to generate the output. &nbsp;</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">I'm trying to determine why some of them run very slow and others do not. &nbsp;I assumed the reason was the size of the grb files being used – if the grb files were very large then it would be slower and vice versa. &nbsp;As
 a test, I decreased the number of variables being included in the grb file set that was very large to reduce the size of those grb files. &nbsp;I then ran the script to generate the point output from the smaller grb files and it didn't seem to buy me much run time.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">I did notice that the grb files that are associated with the slow processing have a PDEF entry in the .ctl file, whereas the grb files that process very fast have no PDEF entry. &nbsp;Could this be the cause? &nbsp;Does it
 take a lot longer to get point output from data that has to be mapped to a rectilinear lat/lon grid (has a PDEF entry) versus data that is already on&nbsp;a rectilinear lat/lon grid (no PDEF entry)? &nbsp;If this is the case, does anyone know of a way around this to
 get faster point output from grb files?</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Thanks for your time and any help you can provide.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Best,</div>
</div>
</div>
<div style="font-family:Calibri,sans-serif">Sam&nbsp;</div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________ gradsusr mailing list <a href="mailto:gradsusr@gradsusr.org">
gradsusr@gradsusr.org</a> <a href="http://gradsusr.org/mailman/listinfo/gradsusr">
http://gradsusr.org/mailman/listinfo/gradsusr</a> </span>
</body>
</html>