<div dir="ltr">Dear Sir Dennis,<div><br></div><div>Many many thanks for the help. I guess, i&#39;ll just use spherical harmonics in calculating the velocity potential.</div><div><br></div><div><br></div><div>Sincerely,<br><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div><br></div><div>Lyndz</div><div><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sat, Apr 29, 2017 at 6:41 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.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">attached a &#39;my&#39; calculation script and figure.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 26, 2017 at 10:14 PM, Lyndon Mark Olaguera <span dir="ltr">&lt;<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.<wbr>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><div class="m_-6127736787923605361m_8612959067544530941gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear all,</div><div dir="ltr"><br></div><div>I am trying to plot the divergent winds and velocity potential using a modified version of wind_3.ncl (<a href="https://www.ncl.ucar.edu/Applications/wind.shtml" target="_blank">https://www.ncl.ucar.edu/Appl<wbr>ications/wind.shtml</a>) in the NCL page. I am doing the calculation for a fixed grid.</div><div><br></div><div><b>I am not sure if I&#39;m doing the calculations correctly.</b></div><div><br></div><div>I have some problems with the velocity potential calculation. The results do not agree with the divergent winds (e.g. divergent winds at 200hPa should correspond to negative velocity potential).</div><div><br></div><div>I think I am missing something in the script or I am incorrectly doing the calculations.</div><div><br></div><div><br></div><div>I am calculating the divergent winds and velocity potential like this:</div><div><br></div><div> <b> ;Divergence</b></div><div>  div = uv2dvF_Wrap(u,v)</div><div><br></div><div><div>  chi = uv2sfvpF(u,v)</div><div>  chi := chi(1,:,:,:)                     ; 1 for velocity potential</div><div>  chi = (/chi/1e6/)                     ; arbitrary scale</div><div>  chi@long_name = &quot;velocity potential&quot;</div><div>  chi@units     = &quot;m/s&quot;</div><div>  printVarSummary(chi)</div></div><div><br></div><div><br></div><div><b>;Divergent wind components</b></div><div><b><br></b></div><div>  ud    = new ( dimsizes(u), typeof(u), u@_FillValue )</div><div>  vd    = new ( dimsizes(v), typeof(v), v@_FillValue )</div><div>  dv2uvf(div,ud,vd) ; div  ==&gt; divergent  wind components</div><div><br></div><div><b>;Plotting</b></div><div>plot=gsn_csm_vector_scalar_map<wbr>(wks,ud(0,:,:),vd(0,:,:),chi(<wbr>0,:,:),res)<br></div><div><br></div><div><br></div><div>Here are the data files that I am using.I am also attaching the sample image and script here.</div><div><br></div><div dir="ltr">[VWIND] <a href="https://drive.google.com/file/d/0B9faET7Bc2o8MzlGVUZsMjdHa28/view?usp=sharing" target="_blank">https://drive.google.com/file/<wbr>d/0B9faET7Bc2o8MzlGVUZsMjdHa28<wbr>/view?usp=sharing</a><br><div><br></div><div>[UWIND]</div><div><a href="https://drive.google.com/file/d/0B9faET7Bc2o8QTh1OG4zOVYtVlU/view?usp=sharing" target="_blank">https://drive.google.com/file/<wbr>d/0B9faET7Bc2o8QTh1OG4zOVYtVlU<wbr>/view?usp=sharing</a><br></div><div><br></div><div><br></div><div>I&#39;ll appreciate if anyone can suggest any way to improve this.</div><div><br></div><div><br></div><div>Sincerely,</div><div><br></div><div>Lyndz</div></div></div></div></div></div></div></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>