[ncl-talk] Clarification in velocity potential (fixed grid) calculations

Lyndon Mark Olaguera olagueralyndonmark429 at gmail.com
Wed Apr 26 22:14:50 MDT 2017


Dear all,

I am trying to plot the divergent winds and velocity potential using a
modified version of wind_3.ncl (
https://www.ncl.ucar.edu/Applications/wind.shtml) in the NCL page. I am
doing the calculation for a fixed grid.

*I am not sure if I'm doing the calculations correctly.*

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).

I think I am missing something in the script or I am incorrectly doing the
calculations.


I am calculating the divergent winds and velocity potential like this:

 * ;Divergence*
  div = uv2dvF_Wrap(u,v)

  chi = uv2sfvpF(u,v)
  chi := chi(1,:,:,:)                     ; 1 for velocity potential
  chi = (/chi/1e6/)                     ; arbitrary scale
  chi at long_name = "velocity potential"
  chi at units     = "m/s"
  printVarSummary(chi)


*;Divergent wind components*

  ud    = new ( dimsizes(u), typeof(u), u at _FillValue )
  vd    = new ( dimsizes(v), typeof(v), v at _FillValue )
  dv2uvf(div,ud,vd) ; div  ==> divergent  wind components

*;Plotting*
plot=gsn_csm_vector_scalar_map(wks,ud(0,:,:),vd(0,:,:),chi(0,:,:),res)


Here are the data files that I am using.I am also attaching the sample
image and script here.

[VWIND]
https://drive.google.com/file/d/0B9faET7Bc2o8MzlGVUZsMjdHa28/view?usp=sharing

[UWIND]
https://drive.google.com/file/d/0B9faET7Bc2o8QTh1OG4zOVYtVlU/view?usp=sharing


I'll appreciate if anyone can suggest any way to improve this.


Sincerely,

Lyndz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170427/d5d92a7a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wind_3.ncl
Type: application/octet-stream
Size: 3492 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170427/d5d92a7a/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wind_anom_ydaymean_1994-2008_JJA_200mb.png
Type: image/png
Size: 262627 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170427/d5d92a7a/attachment.png 


More information about the ncl-talk mailing list