<div dir="ltr">
















<p class="MsoNormal">hi,&nbsp;</p><p class="MsoNormal"><br></p><p class="MsoNormal">thank you Kyle</p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal">I have calculated the divergence of wind at 850 hPa&nbsp; level and multiplied by specific humidity (q)
at 850 hPa level. </p>

<p class="MsoNormal">Moisture flux= q* wind(u,v)</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">div=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(200,20,201)">uv2dvG_Wrap</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(u_850_clim,v_850_clim); divergence at pressure
level 850</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">moisture flux= div*psl_clim&nbsp;
;psl_clim &ndash;&gt;specific humidity</span></p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">Then I tried to use the function <span style="font-family:&#39;Lucida Sans&#39;;color:rgb(9,63,124)">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 (</span><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml</a>
<span style="font-family:&#39;Lucida Sans&#39;;color:rgb(9,63,124)">)below the explanation for the
function dpres_plevel_Wrap.</span></p>

<p class="MsoNormal"><span style="font-family:&#39;Lucida Sans&#39;;color:rgb(9,63,124)">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-family:&#39;Lucida Sans&#39;;color:rgb(9,63,124)">When I try to find out </span><span style="font-size:13pt;font-family:Courier">dp&nbsp; = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_plevel.shtml"><b><span style="font-family:Verdana;color:rgb(0,29,255);text-decoration:none">dpres_plevel</span></b></a>(lev,
psfc, ptop, 0), I am getting the error as follows:</span></p>

<p class="MsoNormal"><span style="font-size:13pt;font-family:Courier">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">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?</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">fatal:Mul: Number of dimensions do not match, can&#39;t continue</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">however, the units of all lev,psfc,ptop are all similar in the ncl
script.</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">;==============================</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">lev = u_ctl -&gt;z11_p_level ;17
pressure levels from u compont of wind data</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">ps_ctl= </span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">addfile</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">&quot;<a href="http://ps_197001_200112.nc">ps_197001_200112.nc</a>&quot;</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">,</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">&quot;r&quot;</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">) ;surface
pressure data</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">psf = ps_ctl-&gt;ps</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">psfc =psf(:,</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">0</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">:</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">143</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">,:) ; in order
to get 144&nbsp; lat points</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">ptop = lev(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">14</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">) ; pressure
level 850hPa</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">dsize=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">dimsizes</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(psfc)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">lonn=dsize(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">2</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">latn=dsize(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">1</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">n2=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">30</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black"></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">ps_jjas=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">new</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">(/</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">n2,latn,lonn</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">/)</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">,</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">float</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">do</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black"> y=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">0</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">,n2-</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">1</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black"></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">ps_jjas(y,:,:)=</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(200,20,201)">dim_avg_n_Wrap</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">((psfc((</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">4</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">+(y*</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">12</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)):(</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">7</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">+(y*</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">12</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)),:,:)),</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">0</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)&nbsp; ; seasonal mean of 30 years</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">end</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black"> </span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(193,101,28)">do</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black"></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">printVarSummary</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(psfc)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">printVarSummary</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(ptop)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">printVarSummary</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(lev)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">dp&nbsp;
= </span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(46,174,187)">dpres_plevel</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">(lev, ps_jjas, ptop, </span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:rgb(180,36,25)">0</span><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">)</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:&#39;Menlo Regular&#39;;color:black">After calculating dp, I would like to use the function </span><span style="font-family:Verdana"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_sum_n_Wrap.shtml"><b><span style="color:windowtext;text-decoration:none">dim_sum_n_Wrap</span></b></a> to integrate vertically.</span></p>

<p class="MsoNormal"><span style="font-family:Verdana">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-family:Verdana">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. </span></p>

<p class="MsoNormal"><span style="font-family:Verdana">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-family:Verdana">I am very new to ncl, so I
hope some one will &nbsp;help me to sort out the problem.</span><span style="font-family:&#39;Lucida Sans&#39;;color:rgb(9,63,124)"></span></p><p class="MsoNormal"><span style="font-family:Verdana"><br></span></p><p class="MsoNormal"><font face="Verdana">any help will be&nbsp;highly appreciated</font></p><p class="MsoNormal"><font face="Verdana"><br></font></p><p class="MsoNormal"><font face="Verdana">thanks</font></p><p class="MsoNormal"><font face="Verdana"><br></font></p><p class="MsoNormal"><font face="Verdana">thomas</font></p>

</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 27, 2014 at 1:02 PM, Kyle Griffin <span dir="ltr">&lt;<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thomas,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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&#39;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.</div><div><br></div><div>Don&#39;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.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Thu, Dec 25, 2014 at 9:57 PM, tms_l <span dir="ltr">&lt;<a href="mailto:littithomas@gmail.com" target="_blank">littithomas@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div style="font-size:13px">hi ncl users</div><div style="font-size:13px"><br></div><div style="font-size:13px">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 &amp; 200 hpa pressure levels too ...finally integrating between the two pressure levels to get the moisture flux convergence...</div><div style="font-size:13px"><br></div><div style="font-size:13px">I already calculated the wind divergence at two pressure levels using the function, uv2dvG_Wrap..I am not clear about the next step..</div><div style="font-size:13px"><br></div><div style="font-size:13px">can anyone describe it little more..which functions i need to select for calculating the moisture flux convergence..</div><div style="font-size:13px"><br></div><div>&nbsp;thanks in advance</div><div><br></div><div>thomas</div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>