<div style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: Arial">Dear </span></div>
<div style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: Arial">I want to overlay tow composite maps of vector wind and omega from CDC NOAA. How can I do it in GrADS? If you do it please attach to me its script. </span></div>

<p style="BACKGROUND: white; MARGIN: 0cm 0cm 12pt"><span style="FONT-FAMILY: Arial">Best Regards</span></p><br><br>
<div><span class="gmail_quote">On 9/16/08, <b class="gmail_sendername">Arlindo da Silva</b> &lt;<a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div dir="ltr">
<div class="gmail_quote">
<div><span class="e" id="q_11c69178e181f4ee_1">On Mon, Sep 15, 2008 at 12:09 PM, P.Romero <span dir="ltr">&lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:romero619@hotmail.com" target="_blank">romero619@hotmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I need to implement the FLOOR function.</span></font></p>
<p><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">What&#39;s the best/easiest way to get this done?</span></font></p>
<p><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I&#39;m guessing as a UDF, but I need some help on setting up the C code…</span></font></p></div></div></blockquote>
<div><br>&nbsp;</div></span></div>
<div>It should be relatively simple to do it as a dynamic UDF for v1.9.0-rc1. Here is the example of the sqrt function implemented as such:</div>
<div><br>&nbsp;</div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://opengrads.cvs.sourceforge.net/*checkout*/opengrads/grads/udf/dll/my_sqrt.c?revision=1.2" target="_blank">http://opengrads.cvs.sourceforge.net/*checkout*/opengrads/grads/udf/dll/my_sqrt.c?revision=1.2</a><br>
&nbsp;</div>
<div><br>&nbsp;</div>
<div>Basically, you just need to replace the sqrt() call with floor() and removed the test for positive values. Everything else should stay the same. (You could start with a global search+replace &quot;sqrt&quot; -&gt; &quot;floor&quot;).</div>

<div><br>&nbsp;</div>
<div>Here are some quick instructions to have your function built. Start with the &nbsp;sources from&nbsp;</div>
<div><br>&nbsp;</div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://downloads.sourceforge.net/opengrads/grads-1.9.0-rc1-gex-r2.tar.gz?modtime=1207263579&amp;big_mirror=0" target="_blank">&nbsp;grads-1.9.0-rc1-gex-r2.tar.gz</a><br>
&nbsp;</div>
<div><br>&nbsp;</div>
<div>Then</div>
<div><br>&nbsp;</div>
<div>% tar xvfz grads-1.9.0-rc1-gex-r2.tar.gz</div>
<div>% cd grads-1.9.0-rc1-gex-rc2/extensions</div>
<div><br>&nbsp;</div>
<div>Make a directory for your function and copy some basic files in it:</div>
<div><br>&nbsp;</div>
<div>% mkdir floor</div>
<div>% cp hello/GNUmakefile floor</div>
<div><br>&nbsp;</div>
<div>Now place your floor.c function in this new directory, and add a file named &quot;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://floor.udxt.in/" target="_blank">floor.udxt.in</a>&quot; with something like:</div>

<div><br>&nbsp;</div>
<div># &nbsp;Type &nbsp; &nbsp; &nbsp; Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Function &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library</div>
<div># ------ &nbsp;--------------- &nbsp;---------------- &nbsp;--------------------------------&nbsp;</div>
<div>&nbsp;&nbsp; udf &nbsp; &nbsp; &nbsp; &nbsp;floor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gaudf &nbsp; &nbsp; &nbsp; &nbsp; floor.gex.@DLLEXT@<br>&nbsp;</div>
<div><br>&nbsp;</div>
<div>Then build your function</div>
<div><br>&nbsp;</div>
<div>% cd floor</div>
<div>% make</div>
<div><br>&nbsp;</div>
<div>This should create <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://floor.gex.so/" target="_blank">floor.gex.so</a> (or floor.gex.dylib on Mac OS X) and floor.udxt .&nbsp;It is just a bit more complicated to do this on Windows but it can be done.&nbsp;</div>

<div><br>&nbsp;</div>
<div>To test it run grads from this directory and</div>
<div><br>&nbsp;</div>
<div>% export GAUDXT=&quot;./floor.udxt&quot;</div>
<div>% export LD_LIBRARY_PATH=`pwd`</div>
<div>% gradsnc -l</div>
<div>ga-&gt; open something</div>
<div>ga-&gt; q udft</div>
<div>(should show your floor function)</div>
<div>ga-&gt; display floor(whatever)</div>
<div>(it should work)</div>
<div><br>&nbsp;</div>
<div>Once you are convinced that it works install it.&nbsp;Add the contents of floor.udxt to your main udxt file and put <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://floor.gex.so/" target="_blank">floor.gex.so</a> alongside your other extensions. That is it.</div>

<div><br>&nbsp;</div>
<div>Additional information about the opengrads extensions are here:<br>&nbsp;</div>
<div><br>&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://opengrads.org/wiki/index.php?title=User_Defined_Extensions" target="_blank">http://opengrads.org/wiki/index.php?title=User_Defined_Extensions</a><br>
&nbsp;</div>
<div><br>&nbsp;</div>
<div>VERY IMPORTANT: This is the procedure in v1.9.0-rc1 and details will very likely change for grads v2. So, any function developed for v1.9 will need to be ported to v2.0. Therefore, unless you need something that cannot wait, there is no much point in developing new functions for v1.9.</div>

<div><br>&nbsp;</div>
<div>&nbsp;&nbsp; Good Luck,</div>
<div><br>&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp;Arlindo</div>
<div><br>&nbsp;</div></div>-- <br>Arlindo da Silva<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:dasilva@alum.mit.edu" target="_blank">dasilva@alum.mit.edu</a><br>&nbsp;</div></blockquote></div><br>