# [ncl-talk] vertically integrated moisture flux convergence in nil

tms_l littithomas at gmail.com
Sun Dec 28 21:46:47 MST 2014

```hi,

thank you Kyle

I have calculated the divergence of wind at 850 hPa  level and multiplied
by specific humidity (q) at 850 hPa level.

Moisture flux= q* wind(u,v)

div=uv2dvG_Wrap(u_850_clim,v_850_clim); divergence at pressure level 850

moisture flux= div*psl_clim  ;psl_clim ->specific humidity

Then I tried to use the function dpres_plevel_Wrap to find out the pressure
level thickness and will be planning to integrate the moisture flux as
explained in the example number 2 (
http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml
)below
the explanation for the function dpres_plevel_Wrap.

When I try to find out dp  = *dpres_plevel*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_plevel.shtml>(lev,
psfc, ptop, 0), I am getting the error as follows:

warning:dpres_plevel: At one or more grid points the sum of the layer
thicknesses is not equal to (psfc-ptop). Are units of plev, psfc and ptop
matching?

fatal:Mul: Number of dimensions do not match, can't continue

however, the units of all lev,psfc,ptop are all similar in the ncl script.

;==============================

lev = u_ctl ->z11_p_level ;17 pressure levels from u compont of wind data

psf = ps_ctl->ps

psfc =psf(:,0:143,:) ; in order to get 144  lat points

ptop = lev(14) ; pressure level 850hPa

dsize=dimsizes(psfc)

lonn=dsize(2)

latn=dsize(1)

n2=30

ps_jjas=new((/n2,latn,lonn/),float)

do y=0,n2-1

ps_jjas(y,:,:)=dim_avg_n_Wrap((psfc((4+(y*12)):(7+(y*12)),:,:)),0)  ;
seasonal mean of 30 years

end do

printVarSummary(psfc)

printVarSummary(ptop)

printVarSummary(lev)

dp  = dpres_plevel(lev, ps_jjas, ptop, 0)

After calculating dp, I would like to use the function *dim_sum_n_Wrap*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_sum_n_Wrap.shtml>
to integrate vertically.

But, I am not sure whether I am moving in a correct way to find out
vertically integrated moisture flux convergence between two pressure
levels.

I am very new to ncl, so I hope some one will  help me to sort out the
problem.

any help will be highly appreciated

thanks

thomas

On Sat, Dec 27, 2014 at 1:02 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:

> Thomas,
>
> This is not an NCL issue, this is a science issue. The functions are
> well-documented, as you most definitely seem to understand what each
> function is calculating.
>
> Only YOU can say whether your calculation should include or exclude the
> boundary levels - generally I would include them, but it depends on the
> science you want to do.
>
> If you can calculate the moisture flux itself (a simple calculation), I
> would vertically integrate that and then calculate the divergence of the
> resulting field as this will be more efficient. However, I'm not sure if it
> would yield the same result as calculating the moisture flux divergence and
> then doing the vertical integral - you can certainly try both methods and
> be aware the second method will take longer to calculate.
>
> Don't forget to look at the code that Dennis sent you in a previous email
> as well - some or all of it might help outline what you want to do.
>
> Hope this helps. If not, consult the mathematical equations for this field
> and respond back to ncl-talk if you have issues implementing the
> calculations within your NCL scripts.
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Thu, Dec 25, 2014 at 9:57 PM, tms_l <littithomas at gmail.com> wrote:
>
>> hi ncl users
>>
>> I have to calculate the moisture flux convergence between pressure levels
>> 850hpa AND 200hpa pressure levels..and I THINK i need to consider the
>> specific humidity at 850 & 200 hpa pressure levels too ...finally
>> integrating between the two pressure levels to get the moisture flux
>> convergence...
>>
>> I already calculated the wind divergence at two pressure levels using the
>> function, uv2dvG_Wrap..I am not clear about the next step..
>>
>> can anyone describe it little more..which functions i need to select for
>> calculating the moisture flux convergence..
>>
>>
>> thomas
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141229/92df468a/attachment.html
```