All,<div><br></div><div> The most authoritative documentation on the hdivg function can be found here:</div><div><br></div><div><a href="http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/gafunc.c?revision=1.1.1.9&view=markup">http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/gafunc.c?revision=1.1.1.9&view=markup</a></div>
<div><br></div><div><a href="http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/gafunc.c?revision=1.1.1.9&view=markup"></a>That is, the source code :-). The hdivg() implementation can be found on line 2716. This file has the implementation of most grads functions. </div>
<div><br></div><div>BTW, the link above is the web interface to the opengrads CVS repository. We keep in this particular directory the original releases from COLA, before any opengrads patches are applied:</div><div><br></div>
<div><a href="http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/">http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/</a></div><div><br></div><div>There is a pulldown menu called "Sticky Tag" that you can use to select a particular grads version.</div>
<div><br></div><div> Arlindo</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Mon, Nov 15, 2010 at 12:44 AM, Yaqiang Wang <span dir="ltr"><<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The correct one should be:<br>
<br>
define du = cdiff(u,x)<br>
<div class="im">define dx = cdiff(lon,x)*3.1416/180<br>
</div>define dv = cdiff(v*cos(lat*3.1416/180),y)<br>
<div class="im">define dy = cdiff(lat,y)*3.1416/180<br>
display (du/dx+dv/dy)/(6.37e6*cos(lat*3.1416/180))<br>
<br>
Yaqiang<br>
<br>
</div><div class="im">Chinese Academy of Meteorological Sciences<br>
<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a><br>
<br>
</div><div><div></div><div class="h5">On Mon, Nov 15, 2010 at 12:47 PM, Yaqiang Wang <<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a>> wrote:<br>
> Thanks for Jeff's reply! But it seems that in GrADS the hdivg function<br>
> was calculated as following. Please mention the last sentence.<br>
><br>
> define dv = cdiff(v,x)<br>
> define dx = cdiff(lon,x)*3.1416/180<br>
> define du = cdiff(u*cos(lat*3.1416/180),y)<br>
> define dy = cdiff(lat,y)*3.1416/180<br>
> display (du/dy+dv/dx)/(6.37e6*cos(lat*3.1416/180))<br>
><br>
> Yaqiang<br>
><br>
> Chinese Academy of Meteorological Sciences<br>
> <a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a><br>
><br>
> On Mon, Nov 15, 2010 at 11:56 AM, Jeffrey Duda <<a href="mailto:jdduda@iastate.edu">jdduda@iastate.edu</a>> wrote:<br>
>> Yaqiang,<br>
>> You are exactly correct.<br>
>><br>
>> Jeff Duda<br>
>><br>
>> On Sun, Nov 14, 2010 at 9:22 PM, Yaqiang Wang <<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> The GrADS documentation said that the cdiff function may be used to<br>
>>> duplicate the calculation done by the hcurl function:<br>
>>><br>
>>> define dv = cdiff(v,x)<br>
>>> define dx = cdiff(lon,x)*3.1416/180<br>
>>> define du = cdiff(u*cos(lat*3.1416/180),y)<br>
>>> define dy = cdiff(lat,y)*3.1416/180<br>
>>> display (dv/dx-du/dy)/(6.37e6*cos(lat*3.1416/180))<br>
>>><br>
>>> But there is no description of hdivg function. I guess hdivg function<br>
>>> could be duplicated using cdiff function as following. Please anybody<br>
>>> tell me if it is correct or not. Thanks!<br>
>>><br>
>>> define dv = cdiff(v,x)<br>
>>> define dx = cdiff(lon,x)*3.1416/180<br>
>>> define du = cdiff(u*cos(lat*3.1416/180),y)<br>
>>> define dy = cdiff(lat,y)*3.1416/180<br>
>>> display (du/dx+dv/dy)/(6.37e6*cos(lat*3.1416/180))<br>
>>><br>
>>> Yaqiang Wang<br>
>>><br>
>>> Chinese Academy of Meteorological Sciences<br>
>>> <a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a><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>
>><br>
>><br>
>> --<br>
>> Jeff Duda<br>
>> Iowa State University<br>
>> Meteorology Graduate Student<br>
>> 3134 Agronomy Hall<br>
>> <a href="http://www.meteor.iastate.edu/~jdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>
>><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>
>><br>
><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>
</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><br>
</div>