<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;">Of course you can draw two variables in the same image — two grids are not going to max out your cache size.&nbsp;<div><br></div><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap: break-word;"><div><font face="Courier"><span style="font-size: 14px;">loop over file names</span></font></div><div><font face="Courier"><span style="font-size: 14px;">&nbsp; open file</span></font></div><div><font face="Courier"><span style="font-size: 14px;">&nbsp; &nbsp; loop over lat/lon domains&nbsp;</span></font></div><div><font face="Courier"><span style="font-size: 14px;">&nbsp; &nbsp; &nbsp;&nbsp;</span></font><span style="font-size: 14px; font-family: Courier;">draw variables</span></div></div></blockquote></div></div></div><font face="Courier"><span style="font-size: 14px;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print image</span></font><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: relative; z-index: 0;"><div style="word-wrap: break-word;"><div><font face="Courier"><span style="font-size: 14px;">&nbsp; &nbsp; end</span></font></div><div><font face="Courier"><span style="font-size: 14px;">&nbsp; close file</span></font></div><div><font face="Courier"><span style="font-size: 14px;">end</span></font></div></div></blockquote></div></div></div><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap: break-word;"><div><font face="Courier"><br></font></div></div></blockquote></div></div></div></div><div>—Jennifer</div><div><br></div><div><br></div><div><br><div><div>On Mar 26, 2015, at 5:56 PM, Brian Gaze &lt;<a href="mailto:brian.gaze@NTLWORLD.COM">brian.gaze@NTLWORLD.COM</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Jennifer,<br></div><div><br></div><div>Thanks - but that pattern won't work if I want to draw both of the variables on the same image will it?&nbsp;</div><div><br></div><div>Brian</div><br><div class="gmail_extra"><br><div class="gmail_quote">On 26 March 2015 at 17:49, Jennifer Adams <span dir="ltr">&lt;<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap:break-word">Hi, Brian —&nbsp;<div>The grib2 cache is a linked list of 2-D grids that are described by the file number, the coordinates of the non-varying dimensions (Z, T, and E), the size of the grid, and the name of the variable. If you are doing more than one display from that grid, the data are read from the cache instead of re-doing the I/O. Each new grid that is read is added to the list, most recent first. But because of the size limit of the grib2 cache, if you exceed the size, the grid at the end of the chain is released to make room for the new grid. So, if you are displaying data from 22 different grids, that is probably enough to exceed the size of the cache and when you go back to grid #1 the I/O has to be done again because that grid is no longer in the cache. It therefore makes a lot of sense for you to re-arrange the order of your nesting loops and do all your displays of a single cached grid before moving to the next variable.&nbsp;</div><div><br></div><div><font face="Courier">loop over file names</font></div><div><font face="Courier">&nbsp; open file</font></div><div><font face="Courier">&nbsp; loop over variables</font></div><div><font face="Courier">&nbsp; &nbsp; loop over lat/lon domains&nbsp;</font></div><div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;draw plot&nbsp;</font></div><div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;print image</font></div><div><font face="Courier">&nbsp; &nbsp; end</font></div><div><font face="Courier">&nbsp; end</font></div><div><font face="Courier">&nbsp; close file</font></div><div><font face="Courier">end</font></div><div><br></div><div>The metafile buffer size option is parsed but not looked at in version 2.1. I should probably add a warning to alert the user, or remove it altogether.&nbsp;</div><div>--Jennifer</div><div><br></div><div><br></div><div><br><div><div><div class="h5"><div>On Mar 26, 2015, at 12:26 PM, Brian Gaze &lt;<a href="mailto:brian.gaze@NTLWORLD.COM" target="_blank">brian.gaze@NTLWORLD.COM</a>&gt; wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>When working concurrently with multiple grib2 files I'm encountering a performance issue. I initially thought this was caused by the grib2 cache but now wonder if it is related to the metafile buffer.&nbsp;</div><div><br></div><div>The sample script below helps to explain. Scenario is....</div><div><br></div><div>1) Open all files</div><div>2) Outer loop where latitude and longitude for plot are set</div><div>3) Inner loop through all open files plotting 2 variables from each one for the latitude and longitude currently set</div><div>4) Write output to an image file</div><div>5) Iterate</div><div><br></div><div>If I reduce the filenumber count to be lower than 13 OR only plot 1 variable the image files are generated quickly, approx 1.5 per second.&nbsp;</div><div><br></div><div>If I leave the filenumber count as it is and plot the 2 variables the plot plot is very slow taking approx 50 seconds to be written to the file system.</div><div>&nbsp;</div><div>&nbsp;<br></div><div><div><br></div><div>*Open files 1 to 22</div><div>'open file00.ctl'</div><div>'open file01.ctl'</div><div>'open filexx.ctl'</div><div><br></div><div><br></div><div>while(b&lt;60)</div><div><br></div><div>filenumber=1</div><div>while (filenumber&lt;23)</div><div>'set dfile ' %filenumber</div><div>'d var1'</div><div>'d var2'</div><div>filenumber=filenumber+1</div><div>endwhile</div><div><br></div><div>op = ' C:\'%imagefilename% '.png png x800 y600'</div><div>'gxprint ' %op ' white'</div><div><br></div><div>B=B+1</div><div>endwhile&nbsp;</div><div><br></div><div><br></div><div>When running the .gs I've tried using the -m NNN option to increase the metafile buffer size (e.g. to 3<span style="font-family:Arial,Helvetica,sans-serif;font-size:13.3333330154419px;background-color:rgb(197,213,255)">000000</span>) but this doesn't seem to make any difference.&nbsp;</div><div><br></div><div>Any ideas??</div><div><br></div><div>Thanks</div><div><br></div><div>Brian</div><div><br></div><div><br></div><div><br></div></div></div></div></div>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></div><br><div>
<span style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030&nbsp;<br><br></div><div><br></div><br></span></span><br>
</div>
<br></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>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030&nbsp;<br><br></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>