<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1496049997873_3733"><span></span></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1496049997873_3732"><br><br></div> <div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1496049997873_3709" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1496049997873_3708"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1496049997873_3707"> <div dir="ltr" id="yui_3_16_0_ym19_1_1496049997873_3731"><font size="2" face="Arial" id="yui_3_16_0_ym19_1_1496049997873_3730"> On Sunday, 28 May 2017 8:50 PM, gurbrinder aulakh <gurbrinderaulakh@yahoo.co.in> wrote:<br></font></div> <br><br> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1496049997873_3706"><div id="yiv6157683804"><div id="yui_3_16_0_ym19_1_1496049997873_3705"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_ym19_1_1496049997873_3704"><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906" dir="ltr">I want to compute wind divergence reading u and v wind components but I am getting the following warnings when I run the script.Plot is also not as expected... Please help tried everything from the earlier queries but not finding any solution.... Am I reading the correct values....Thanks in advance..</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8906">warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8907">warning:AutoComputeMajorTickMarks: min and max are so close together or so far apart that arithmetic error may cause problems, proceed at own risk</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8908">warning:ComputeMinorTickMarks: The distance between major tickmarks is so close or so far apart that arithmetic error may cause problems determining the accurate locations of minor tickmarks</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8909">warning:AutoComputeMajorTickMarks: min and max are so close together or so far apart that arithmetic error may cause problems, proceed at own risk</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8910">warning:ComputeMinorTickMarks: The distance between major tickmarks is so close or so far apart that arithmetic error may cause problems determining the accurate locations of minor tickmarks</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8911">warning:StreamlinePlotInitialize: coordinate spacing is irregular; linear spacing only possible using index coordinates for Y Axis</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8912">warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis</div><div dir="ltr" id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8913"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8914"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8760"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8760"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8760"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8760"><br></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8760">*************************************************</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8761">;</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8762">; These files are loaded by default in NCL V6.2.0 and newer</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8763">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8764">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8765">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8766">;*************************************************</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8767">begin</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8768"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8769"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8770"> uf = addfile("uwind500.nc","r") </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8771"> vf = addfile("vwind500.nc","r")</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8772"> </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8773"> u = uf->UGRD_500_ISBL(0,:,:)</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8774"> v = vf->VGRD_500_ISBL(0,:,:)</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8775"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8776"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8777">lat = uf->u&YCells </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8778"> lon = uf->v&XCells</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8779"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8780"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8781">u!0="lat"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8782">u!1="lon"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8783"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8784"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8785">u&lat@units="degrees_north"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8786">u&lon@units="degrees_east"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8787"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8788"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8789">printVarSummary(u);</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8790"> div = uv2dvG_Wrap(u,v) ; u,v ==> divergence</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8791"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8792"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8793"> dv2uvg(div,u,v) ; div ==> divergent wind components</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8794"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8795"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8796"> </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8797"> u@long_name = "Zonal Divergent Wind"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8798"> u@units = u@units</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8799"> v@long_name = "Meridional Divergent Wind"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8800"> v@units = v@units</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8801"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8802"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8803">;*************************************************</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8804">; plot results</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8805">;************************************************* </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8806"> wks = gsn_open_wks("png","wind123") ; send graphics to PNG file</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8807"> </div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8808"> res = True</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8809"> res@vcRefMagnitudeF = 3. ; make vectors larger</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8810"> res@vcRefLengthF = 0.050 ; reference vector length</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8811"> res@vcGlyphStyle = "CurlyVector" ; turn on curly vectors</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8812"> res@vcMinDistanceF = 0.012 ; thin the vectors</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8813"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8814"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8815"> res@gsnLeftString = "Divergent Wind"</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8816"> ; plot 1st time step</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8817"> plot= gsn_csm_vector_map(wks,u(:,:),v(:,:),res)</div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8818"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8819"></div><div id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8820">end</div><div dir="ltr" id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8821"><br id="yiv6157683804yui_3_16_0_ym19_1_1495972864413_8822"></div></div></div></div><br><br></div> </div> </div> </div></div></body></html>