<div dir="ltr"><div><div><div>Hi,<br><br></div>Looking at your plot, the reference vector generated by the vector plot and the label bar generated by the contour plot are both present on the map.  I&#39;d recommend taking a close look at the underlying data to make sure units, values, and spatial extent is what you think it is.  <br><br></div>Hope that helps...<br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 1:16 AM, Ciao Kai Liang <span dir="ltr">&lt;<a href="mailto:ciaokailiang@gmail.com" target="_blank">ciaokailiang@gmail.com</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"><div>Dear alll ncl users, </div><div><br></div><div>I try to make a plot of overlaying the wind speed (vector) and the ozone concentration (contour) on the map. The wind speed vector is from MCIP output and ozone concentration from CMAQ model. No error message occurs but I get blank on the map(attached). Is something wrong in my script? Thx in advance.</div><div><br></div><div>Joe</div><div><br></div><div><div>;read files=============================================================</div><div>f1 = addfile(&quot;METDOT3D&quot;,&quot;r&quot;)<br></div><div>f2 = addfile(&quot;<a href="http://CCTM_D502a_Linux2_x86_64ifort.ACONC.CMAQ20101001.nc" target="_blank">CCTM_D502a_Linux2_x86_64ifort.ACONC.CMAQ20101001.nc</a>&quot;,&quot;r&quot;)</div><div><br></div><div>u = f1-&gt;UWINDC(0,0,:,:) ;U at timestep 0  by 90X135</div><div>v = f1-&gt;VWINDC(0,0,:,:) ;V at timestep 0    by 90X135</div><div>ox = f2-&gt;O3(0,0,:,:)         ;ozone concentration at timestep 0  by 90X135</div></div><div><br></div><div>;set evn===============================================================</div><div><div>wks = gsn_open_wks(&quot;png&quot;,&quot;overlay&quot;)</div><div>gsn_define_colormap(wks,&quot;WhiteBlueGreenYellowRed&quot;)</div></div><div><br></div><div><div>vcres                      = True  ;Vector</div><div><div>vcres@gsnDraw    = False</div><div>vcres@gsnFrame  = False</div></div><div>cnres                      = vcres ;Contour<br></div><div>mpres                     = vcres ;Map</div></div><div><br></div><div><div>;Contour===============================================================</div><div> cnres@gsnDraw              = False</div><div> cnres@gsnFrame           = False</div><div><br></div><div> cnres@cnFillOn               = True</div><div> cnres@cnFillMode           = &quot;RasterFill&quot;     ; use raster mode</div><div> cnres@cnLinesOn            = False</div><div> cnres@tmYROn               = False            ; Turn off right tickmarks.</div><div> cnres@tmXTOn               = False            ; Turn off top tickmarks.</div><div> cnres@tmXBLabelFont        = &quot;times-roman&quot;</div><div> cnres@tmYLLabelFont        = &quot;times-roman&quot;</div><div> cnres@gsnMaximize          = True             ; Maximize the plot where it is drawn</div><div> cnres@gsnSpreadColors      = True             ; use full colormap</div><div><br></div><div> cnres@cnLevelSelectionMode = &quot;ManualLevels&quot;</div><div> cnres@cnMinLevelValF            = 10.  ; set the minimum contour level</div><div> cnres@cnMaxLevelValF           = 120.   ; set the maximum contour level</div><div> cnres@cnLevelSpacingF          = 10.    ; set the contour interval</div><div> cnres@lbLabelStride                 = 1</div></div><div><div> cnres@lbLabelFont          = &quot;times-roman&quot;</div><div><br></div><div> cnres@tmXBLabelFontHeightF = 0.015</div><div> cnres@tmYLLabelFontHeightF = 0.015</div></div><div><br></div><div><div>;Vector=============================================</div><div>  vcres@vcLevelSelectionMode     = &quot;ManualLevels&quot;</div><div>  vcres@vcMinLevelValF                = -20.0</div><div>  vcres@vcMaxLevelValF               = 100.0</div><div>  vcres@vcLevelSpacingF              = 10.0</div><div>  vcres@vcLevelPalette                  = &quot;amwg_blueyellowred&quot;   ; assign color map to vectors</div><div><br></div><div>  vcres@vcGlyphStyle                       = &quot;LineArrow&quot;</div><div>  vcres@vcLineArrowThicknessF      = 5</div><div>  vcres@vcMinDistanceF                   = 0.01</div><div>  vcres@vcRefLengthF                       = 0.03</div><div><br></div><div>  vcres@vcGlyphStyle                          = &quot;WindBarb&quot;</div><div>  vcres@vcWindBarbLineThicknessF   = 5</div><div>  vcres@vcWindBarbColor                   = &quot;Gray40&quot;</div><div><br></div><div>  vcres@vcRefAnnoOn               = True</div><div>  vcres@vcRefMagnitudeF           = 30</div><div>  vcres@vcRefAnnoString1          = &quot;30&quot;</div><div>  vcres@vcRefAnnoSide             = &quot;Top&quot;</div></div><div><div>  vcres@vcRefAnnoString2On        = False</div><div>  vcres@vcRefAnnoPerimOn          = False</div><div>  vcres@vcRefAnnoOrthogonalPosF   = -0.12</div><div>  vcres@vcRefAnnoParallelPosF     = 0.999</div><div>  vcres@vcRefAnnoBackgroundColor  = &quot;Purple&quot;</div><div>  vcres@vcVectorDrawOrder         = &quot;PostDraw&quot;</div><div>  vcres@gsnRightString            = &quot;Wind&quot;</div></div><div><br></div><div><div>;Map============================================</div><div>  mpres@mpProjection               = &quot;LambertConformal&quot;</div><div>  mpres@mpLambertParallel1F  = 10.0</div><div>  mpres@mpLambertParallel2F  = 40.0</div><div>  mpres@mpLambertMeridianF   = 120.0</div><div>  mpres@tfDoNDCOverlay          = True</div><div>  mpres@mpLimitMode               = &quot;Corners&quot;</div><div>  mpres@mpLeftCornerLonF      = LON(0,0,0,0)</div><div>  mpres@mpLeftCornerLatF       = LAT(0,0,0,0)</div><div>  mpres@mpRightCornerLonF    = LON(0,0,dimsizes(LAT(0,0,:,0))-1,dimsizes(LAT(0,0,0,:))-1)</div><div>  mpres@mpRightCornerLatF      = LAT(0,0,dimsizes(LAT(0,0,:,0))-1,dimsizes(LAT(0,0,0,:))-1)</div><div><br></div><div>  mpres@mpDataSetName          = &quot;Earth..4&quot;   ; This new database contains</div><div>  mpres@mpDataBaseVersion     = &quot;MediumRes&quot;  ; Medium resolution database</div><div>  mpres@mpOutlineOn                 = True         ; Turn on map outlines</div><div>  mpres@mpFillOn                         = True </div></div><div><div>  mpres@mpOutlineBoundarySets  = &quot;AllBoundaries&quot;</div><div>  mpres@mpGridAndLimbOn        = True</div><div>  mpres@mpGridLineDashPattern  = 2</div><div>  mpres@mpCenterRotF                 = 90.0</div><div><br></div><div>  mpres@mpLabelsOn                   = False</div><div>  mpres@mpPerimOn                    = True</div><div>  mpres@mpGridAndLimbOn        = False</div><div>  mpres@mpOutlineDrawOrder     = &quot;PostDraw&quot;</div><div>  mpres@mpFillDrawOrder            = &quot;Predraw&quot;</div><div>  mpres@mpOceanFillColor           = &quot;lightskyblue1&quot;</div><div>  mpres@mpLandFillColor               = &quot;gray&quot;</div><div><br></div><div>  mpres@mpGridAndLimbDrawOrder = &quot;Predraw&quot;<br></div><div>  mpres@tiMainString           =  &quot;October 1 2010 ozone concentration(ppm)&quot;</div></div><div><br></div><div><div><div>;=====================================================================</div><div>  vcid = gsn_csm_vector(wks,u,v,vcres)</div><div>  cnid = gsn_csm_contour(wks,ox*1000.,cnres)</div><div>  mpid = gsn_csm_map(wks,mpres)</div><div><br></div><div>;---Attach the shapefile polylines using files read off <a href="http://gadm.org/country" target="_blank">gadm.org/country</a>.</div><div>  lnres                  = True</div><div>  lnres@gsLineColor      = &quot;gray25&quot;</div><div>  lnres@gsLineThicknessF = 1.0</div><div>  twn_id = gsn_add_shapefile_polylines(wks,mpid,sfile,lnres)</div></div><div><br></div><div>;---Overlay contour, streamline, and vector plots on the map plot.</div><div>  overlay(mpid,cnid)</div><div>  overlay(mpid,vcid)</div><div><br></div><div>  draw(mpid)</div><div>  frame(wks)</div><div><br></div><div>  maximize_output(wks,True)</div><div>end</div></div><div><br></div>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>