[gradsusr] hdivg function

Arlindo da Silva dasilva at alum.mit.edu
Mon Nov 15 10:55:55 EST 2010


All,

   The most authoritative documentation on the hdivg function can be found
here:

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>That
is, the source code :-). The hdivg() implementation can be found on line
2716. This file has the implementation of most grads functions.

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:

http://opengrads.cvs.sourceforge.net/viewvc/opengrads/cola/grads2/src/

There is a pulldown menu called "Sticky Tag" that you can use to select a
particular grads version.

   Arlindo




On Mon, Nov 15, 2010 at 12:44 AM, Yaqiang Wang <yaqiang.wang at gmail.com>wrote:

> The correct one should be:
>
> define du = cdiff(u,x)
> define dx = cdiff(lon,x)*3.1416/180
> define dv = cdiff(v*cos(lat*3.1416/180),y)
> define dy = cdiff(lat,y)*3.1416/180
> display (du/dx+dv/dy)/(6.37e6*cos(lat*3.1416/180))
>
> Yaqiang
>
> Chinese Academy of Meteorological Sciences
> yaqiang.wang at gmail.com
>
> On Mon, Nov 15, 2010 at 12:47 PM, Yaqiang Wang <yaqiang.wang at gmail.com>
> wrote:
> > Thanks for Jeff's reply! But it seems that in GrADS the hdivg function
> > was calculated as following. Please mention the last sentence.
> >
> > define dv = cdiff(v,x)
> > define dx = cdiff(lon,x)*3.1416/180
> > define du = cdiff(u*cos(lat*3.1416/180),y)
> > define dy = cdiff(lat,y)*3.1416/180
> > display (du/dy+dv/dx)/(6.37e6*cos(lat*3.1416/180))
> >
> > Yaqiang
> >
> > Chinese Academy of Meteorological Sciences
> > yaqiang.wang at gmail.com
> >
> > On Mon, Nov 15, 2010 at 11:56 AM, Jeffrey Duda <jdduda at iastate.edu>
> wrote:
> >> Yaqiang,
> >> You are exactly correct.
> >>
> >> Jeff Duda
> >>
> >> On Sun, Nov 14, 2010 at 9:22 PM, Yaqiang Wang <yaqiang.wang at gmail.com>
> >> wrote:
> >>>
> >>> The GrADS documentation said that the cdiff function may be used to
> >>> duplicate the calculation done by the hcurl function:
> >>>
> >>> define dv = cdiff(v,x)
> >>> define dx = cdiff(lon,x)*3.1416/180
> >>> define du = cdiff(u*cos(lat*3.1416/180),y)
> >>> define dy = cdiff(lat,y)*3.1416/180
> >>> display (dv/dx-du/dy)/(6.37e6*cos(lat*3.1416/180))
> >>>
> >>> But there is no description of hdivg function. I guess hdivg function
> >>> could be duplicated using cdiff function as following. Please anybody
> >>> tell me if it is correct or not. Thanks!
> >>>
> >>> define dv = cdiff(v,x)
> >>> define dx = cdiff(lon,x)*3.1416/180
> >>> define du = cdiff(u*cos(lat*3.1416/180),y)
> >>> define dy = cdiff(lat,y)*3.1416/180
> >>> display (du/dx+dv/dy)/(6.37e6*cos(lat*3.1416/180))
> >>>
> >>> Yaqiang Wang
> >>>
> >>> Chinese Academy of Meteorological Sciences
> >>> yaqiang.wang at gmail.com
> >>> _______________________________________________
> >>> gradsusr mailing list
> >>> gradsusr at gradsusr.org
> >>> http://gradsusr.org/mailman/listinfo/gradsusr
> >>
> >>
> >>
> >> --
> >> Jeff Duda
> >> Iowa State University
> >> Meteorology Graduate Student
> >> 3134 Agronomy Hall
> >> www.meteor.iastate.edu/~jdduda
> >>
> >> _______________________________________________
> >> gradsusr mailing list
> >> gradsusr at gradsusr.org
> >> http://gradsusr.org/mailman/listinfo/gradsusr
> >>
> >>
> >
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101115/0766e555/attachment-0003.html 


More information about the gradsusr mailing list