[gradsusr] Advection term in the moisture convergence equation

Jeff Duda jeffduda319 at gmail.com
Sat Jan 28 00:53:59 EST 2017


Lyndon,
Absolutely. I calclulate MFC frequently. Use cdiff. But before I give the
full explanation, I should note that your formula already gives the full
MFC field. hdivg(q*u,q*v) should include the advection term. You can verify
this by comparing that formula to those below that I will give you.

The trick with this is to define your grid spacing before doing anything
else. While your model integration may use a fixed grid spacing (whether in
degrees or linear distance or otherwise), if you use a control file to
display the data, and if it includes XDEF and YDEF entries, then the grid
on which your data are calculated may differ from that on which the model
was integrated, so you can't use your scalar grid spacing value in that
case. You can define your data grid spacing using trigonometry. The
equations to calculate that are

dx = Re * cos(lat) * cdiff(lon,x)
dy = Re * cdiff(lat,y)

In the above equations, Re is the radius of the earth, and you need to make
sure to convert between radians and degrees. Grads functions assume inputs
are in radians and also output in radians. However, the lat and lon fields
are in degrees, so convert. Both formulas are also instances of the arc
length formula for a circle, which assumes the angle is in radians. So
basically, convert everything to radians in those equations.

Once you have those terms, you have all the fields you need (assuming you
have mixing ratio and wind components defined on the same grid already):

advection term = -u * cdiff(q,x) / dx - v * cdiff(q,y) / dy
convergence term = q*hdivg(u,v)

To verify that the advection term is already contained in hdivg(q*u,q*v),
it should suffice to display
hdivg(q*u,q*v) - q * hdivg(u,v)
This field should match the advection term field above. You can also
display
hdivg(q*u,q*v) - q * hdivg(u,v) - [ -u * cdiff(q,x) / dx - v * cdiff(q,y) /
dy] and it should be 0.

I might be wrong about this since the divergence operator in spherical
coordinates includes an additional term to represent convergence for purely
meridional wind, so you may want to crack open a dynamics textbook and find
what that term is and include it in here somewhere. Either way, I hope this
helps.

Jeff Duda

On Fri, Jan 27, 2017 at 11:35 PM, Lyndon Mark Olaguera <
olagueralyndonmark429 at gmail.com> wrote:

> Dear All,
>
> I'm trying to calculate the moisture flux convergence using the following
> commands:
>
> *At 850 mb
>
> 'set dfile 1'
> 'define q=shum(z=3)'
>
> 'set dfile 2'
> 'define u=uwnd(z=3)'
>
> 'set dfile 3'
> 'define v=vwnd(z=3)'
>
> 'color -0.2 0.2 0.02 -kind blue->white->red'
> 'define mconv=(1)*hdivg(u*q,v*q)*1e6'
>
> According to this link, I have to add the advection term.
>
> http://www.spc.noaa.gov/publications/banacos/mfc-sls.pdf
>
> [image: Inline image 1]
>
> Question:
>
> 1. Is there a way to do this in grads?
> 2. Or is there a function in GRADS that can calculate partial derivatives?
>
> I'll appreciate any help.
>
> Best,
>
> *Lyndon Mark P. Olaguera*
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Post-doctoral research fellow
University of Oklahoma School of Meteorology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170127/129f21d5/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11693 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20170127/129f21d5/attachment.png 


More information about the gradsusr mailing list