<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 dir="ltr" id="yui_3_16_0_ym19_1_1496136335885_14162">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="yui_3_16_0_ym19_1_1496136335885_14163"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14164"></div><div id="yui_3_16_0_ym19_1_1496136335885_14165"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14166"></div><div id="yui_3_16_0_ym19_1_1496136335885_14167"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14168"></div><div id="yui_3_16_0_ym19_1_1496136335885_14169"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14170"></div><div id="yui_3_16_0_ym19_1_1496136335885_14171">warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis</div><div id="yui_3_16_0_ym19_1_1496136335885_14172">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="yui_3_16_0_ym19_1_1496136335885_14173">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="yui_3_16_0_ym19_1_1496136335885_14174">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="yui_3_16_0_ym19_1_1496136335885_14175">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="yui_3_16_0_ym19_1_1496136335885_14176">warning:StreamlinePlotInitialize: coordinate spacing is irregular; linear spacing only possible using index coordinates for Y Axis</div><div id="yui_3_16_0_ym19_1_1496136335885_14177">warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis</div><div dir="ltr" id="yui_3_16_0_ym19_1_1496136335885_14178"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14179"></div><div id="yui_3_16_0_ym19_1_1496136335885_14180"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14181"></div><div id="yui_3_16_0_ym19_1_1496136335885_14182"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14183"></div><div id="yui_3_16_0_ym19_1_1496136335885_14184"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14185"></div><div id="yui_3_16_0_ym19_1_1496136335885_14186"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14187"></div><div id="yui_3_16_0_ym19_1_1496136335885_14188">*************************************************</div><div id="yui_3_16_0_ym19_1_1496136335885_14189">;</div><div id="yui_3_16_0_ym19_1_1496136335885_14190">; These files are loaded by default in NCL V6.2.0 and newer</div><div id="yui_3_16_0_ym19_1_1496136335885_14191">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" &nbsp;&nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14192">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" &nbsp; &nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14193">; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"&nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14194">;*************************************************</div><div id="yui_3_16_0_ym19_1_1496136335885_14195">begin</div><div id="yui_3_16_0_ym19_1_1496136335885_14196"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14197"></div><div id="yui_3_16_0_ym19_1_1496136335885_14198">&nbsp; uf = addfile("uwind500.nc","r") &nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14199">&nbsp; &nbsp; vf = addfile("vwind500.nc","r")</div><div id="yui_3_16_0_ym19_1_1496136335885_14200">&nbsp; &nbsp;&nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14201">&nbsp; &nbsp; &nbsp;u &nbsp; = uf-&gt;UGRD_500_ISBL(0,:,:)</div><div id="yui_3_16_0_ym19_1_1496136335885_14202">&nbsp; &nbsp; v &nbsp; = vf-&gt;VGRD_500_ISBL(0,:,:)</div><div id="yui_3_16_0_ym19_1_1496136335885_14203"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14204"></div><div id="yui_3_16_0_ym19_1_1496136335885_14205">lat = uf-&gt;u&amp;YCells &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14206">&nbsp; &nbsp; lon = uf-&gt;v&amp;XCells</div><div id="yui_3_16_0_ym19_1_1496136335885_14207"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14208"></div><div id="yui_3_16_0_ym19_1_1496136335885_14209">u!0="lat"</div><div id="yui_3_16_0_ym19_1_1496136335885_14210">u!1="lon"</div><div id="yui_3_16_0_ym19_1_1496136335885_14211"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14212"></div><div id="yui_3_16_0_ym19_1_1496136335885_14213">u&amp;lat@units="degrees_north"</div><div id="yui_3_16_0_ym19_1_1496136335885_14214">u&amp;lon@units="degrees_east"</div><div id="yui_3_16_0_ym19_1_1496136335885_14215"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14216"></div><div id="yui_3_16_0_ym19_1_1496136335885_14217">printVarSummary(u);</div><div id="yui_3_16_0_ym19_1_1496136335885_14218">&nbsp; div = uv2dvG_Wrap(u,v) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; u,v ==&gt; divergence</div><div id="yui_3_16_0_ym19_1_1496136335885_14219"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14220"></div><div id="yui_3_16_0_ym19_1_1496136335885_14221">&nbsp; dv2uvg(div,u,v) ; div &nbsp;==&gt; divergent &nbsp;wind components</div><div id="yui_3_16_0_ym19_1_1496136335885_14222"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14223"></div><div id="yui_3_16_0_ym19_1_1496136335885_14224">&nbsp;&nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14225">&nbsp;u@long_name &nbsp;= "Zonal Divergent Wind"</div><div id="yui_3_16_0_ym19_1_1496136335885_14226">&nbsp; u@units &nbsp; &nbsp; &nbsp;= u@units</div><div id="yui_3_16_0_ym19_1_1496136335885_14227">&nbsp; v@long_name &nbsp;= "Meridional Divergent Wind"</div><div id="yui_3_16_0_ym19_1_1496136335885_14228">&nbsp; v@units &nbsp; &nbsp; &nbsp;= v@units</div><div id="yui_3_16_0_ym19_1_1496136335885_14229"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14230"></div><div id="yui_3_16_0_ym19_1_1496136335885_14231">;*************************************************</div><div id="yui_3_16_0_ym19_1_1496136335885_14232">; plot results</div><div id="yui_3_16_0_ym19_1_1496136335885_14233">;************************************************* &nbsp; &nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14234">&nbsp; wks &nbsp;= gsn_open_wks("png","wind123") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; send graphics to PNG file</div><div id="yui_3_16_0_ym19_1_1496136335885_14235">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div id="yui_3_16_0_ym19_1_1496136335885_14236">&nbsp; res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div id="yui_3_16_0_ym19_1_1496136335885_14237">&nbsp; res@vcRefMagnitudeF = 3. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; make vectors larger</div><div id="yui_3_16_0_ym19_1_1496136335885_14238">&nbsp; res@vcRefLengthF &nbsp; &nbsp;= 0.050 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; reference vector length</div><div id="yui_3_16_0_ym19_1_1496136335885_14239">&nbsp; res@vcGlyphStyle &nbsp; &nbsp;= "CurlyVector" &nbsp; &nbsp; &nbsp; &nbsp; ; turn on curly vectors</div><div id="yui_3_16_0_ym19_1_1496136335885_14240">&nbsp; res@vcMinDistanceF &nbsp;= 0.012 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; thin the vectors</div><div id="yui_3_16_0_ym19_1_1496136335885_14241"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14242"></div><div id="yui_3_16_0_ym19_1_1496136335885_14243">&nbsp; res@gsnLeftString &nbsp; = "Divergent Wind"</div><div id="yui_3_16_0_ym19_1_1496136335885_14244">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; plot 1st time step</div><div id="yui_3_16_0_ym19_1_1496136335885_14245">&nbsp; plot= gsn_csm_vector_map(wks,u(:,:),v(:,:),res)</div><div id="yui_3_16_0_ym19_1_1496136335885_14246"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14247"></div><div id="yui_3_16_0_ym19_1_1496136335885_14248">end</div><div dir="ltr" id="yui_3_16_0_ym19_1_1496136335885_14249"><br clear="none" id="yui_3_16_0_ym19_1_1496136335885_14250"></div></div></body></html>