[gradsusr] Advection term in the moisture convergence equation

Lyndon Mark Olaguera olagueralyndonmark429 at gmail.com
Sat Jan 28 01:30:40 EST 2017


Dear Sir Jeff,

Thank you for this wonderful explanation. You are a genius!

I have one last question regarding the sign of the output attached in this
email.

Here's the script that I am using.

'sdfopen pentad_ensmean_shum_1981-2010.nc'
'sdfopen ../uwind/pentad/pentad_ensmean_uwind_1981-2010.nc'
'sdfopen ../vwind/pentad/pentad_ensmean_vwind_1981-2010.nc'
'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'*


'set lat -5 45'
'set lon 80 180'
'd mconv'
'xcbar -fs 2'

*overlay 850mb winds
'set gxout vector'
'set arrscl 0.3 10'
'd u;v'


Question:

1. I overlayed the 850 mb winds over the calculated MFC, but the results do
not match. I'm not sure if I understand this correctly.
>From the defined mconv equation, negative values should correspond to
"convergence", while positive values should correspond to "divergence".
But in the attached image, positive values are seen over areas of
convergence. Is the correct equation for the MFC above should contain -1 or
this depends on the situation?


*Lyndon Mark P. Olaguera*


On Sat, Jan 28, 2017 at 2:53 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:

> 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
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170128/7e9beccc/attachment-0001.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/20170128/7e9beccc/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mconv_29.png
Type: image/png
Size: 177215 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20170128/7e9beccc/attachment-0003.png 


More information about the gradsusr mailing list