<div dir="ltr">NCL Users,<div><br></div><div>I have a netcdf file with 'z' data that ranges from 0 to 1.76. The NCL script below overlays contours on a map of North America.  However, I have noticed that data from 0.5 to 1.2 are not plotted even though measurements with values in that range do exist in the netcdf dataset.  I verified this by plotting the 'z' values in the dataset using Generic Mapping Tools (GMT) as well as using ncdump to look at the data.</div><div><br></div><div>I may have overlooked something but if you have any suggestions to plot these values, I would sincerely appreciate them.  The short NCL script is below.</div><div><br></div><div>Kind regards,</div><div>Neil</div><div>----------</div><div>ncdump header and NCL script below</div><div><br></div><div><div><div class="gmail-m_-3541227480198404697gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>netcdf horizontal-high {</div><div>dimensions:</div><div>        x = 4601 ;</div><div>        y = 3001 ;</div><div>variables:</div><div>        double x(x) ;</div><div>                x:long_name = "x" ;</div><div>                x:actual_range = -170., -55. ;</div><div>        double y(y) ;</div><div>                y:long_name = "y" ;</div><div>                y:actual_range = 5., 80. ;</div><div>        float z(y, x) ;</div><div>                z:long_name = "z" ;</div><div>                z:_FillValue = NaNf ;</div><div>                z:actual_range = 0.000674999959301203, 1.76100623607635 ;</div><div><br></div><div>// global attributes:</div><div>                :Conventions = "COARDS, CF-1.5" ;</div><div>                :title = "" ;</div><div>                :history = "grdsample <a href="http://horizontal.nc" target="_blank">horizontal.nc</a> -Ghorizontal-high.nc -I0.025/0.025" ;</div><div>                :description = "" ;</div><div>                :GMT_version = "5.3.2 (r17593) [64-bit]" ;</div></div><div><br></div><div>----------------</div><div><br></div><div><div>begin</div><div><br></div><div>   cdf_file = addfile("<a href="http://horizontal-high.nc">horizontal-high.nc</a>","r")</div><div>   ;cdf_file = addfile("<a href="http://vertical-high.nc">vertical-high.nc</a>","r")</div><div>   shift = cdf_file->z(:,:)</div><div>   lat = cdf_file->y</div><div>   lon = cdf_file->x</div><div>   shift@long_name = ""</div><div>   lat@long_name = ""</div><div>   lon@long_name = ""</div><div><br></div><div>   wks = gsn_open_wks("x11","overlay")</div><div><br></div><div>   ; define resources</div><div>   mpres = True</div><div>   mpres@gsnDraw = False</div><div>   mpres@gsnFrame = False</div><div>   res = mpres</div><div>   cnres = mpres</div><div><br></div><div>   ; contour</div><div>   cnres@cnFillOn = True</div><div>   cnres@cnLinesOn = False</div><div>   cnres@cnInfoLabelOn = False</div><div>   cnres@cnFillPalette = "MPL_jet"</div><div>   ;cnres@cnFillPalette = "BkBlAqGrYeOrReViWh200"</div><div>   ;cnres@cnFillPalette = "horizontal"</div><div>   cnres@lbOrientation = "Vertical"</div><div>   ;cnres@lbTitleString = "Horizontal Shift"</div><div>   cnres@lbTitlePosition = "Left"</div><div>   cnres@lbBoxLinesOn = False</div><div>   cnres@lbTitleFontHeightF = 0.015</div><div>   cnres@lbLabelFontHeightF = 0.01</div><div><br></div><div><br></div><div>   cnres@sfXArray = lon</div><div>   cnres@sfYArray = lat</div></div><div><div>   cnres@cnLevelSelectionMode = "ManualLevels"</div><div>   cnres@cnMinLevelValF = 0.0</div><div>   cnres@cnMaxLevelValF = 2.0</div><div>   cnres@cnLevelSpacingF = 0.1</div><div>   cnres@cnLineLabelsOn = False</div><div><br></div><div>   ; make sure contours are drawn in "predraw" phase</div><div>   cnres@cnFillDrawOrder = "Predraw"</div><div><br></div><div>   ; map</div><div>   mpres@tiMainString = "Horizontal Shift (m)"</div><div>   mpres@mpFillOn = False</div><div>   mpres@mpMaxLatF = 80</div><div>   mpres@mpMinLatF = 5</div><div>   mpres@mpMinLonF = -170</div><div>   mpres@mpMaxLonF = -55</div><div>   mpres@mpOutlineOn = True</div><div>   mpres@mpOutlineDrawOrder = "PostDraw"</div><div><br></div><div>   ; create but don't draw contours, maps, vectors etc.</div><div>   cnid = gsn_csm_contour(wks,shift,cnres)</div><div>   mpid = gsn_csm_map(wks,mpres)</div><div><br></div><div>   ; overlay contour, streamline and vector plots on the map plot</div><div>   overlay(mpid,cnid)</div><div><br></div><div>   draw(mpid)</div><div>   frame(wks)</div><div><br></div><div>end</div></div><div><div><font color="#3d85c6">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>------------</font></div>Dr. Neil D. Weston<div><br></div><div>Technical Director</div><div>OCS, National Ocean Service, NOAA</div><div>SSMC3, Rm 7806</div><div>1315 East West Hwy, Silver Spring, MD 20910</div><div><br></div><div><img src="https://lh3.googleusercontent.com/ZkLxozigg75AQijJIUgi3DNbOPl7SDUSKT8IDXJID4U=s21-p-no"><span><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice"><a href="tel:(301)%20713-2801" value="+13017132801" target="_blank">301-713-2801</a></span></span></span>     </span><img src="https://lh6.googleusercontent.com/LBaC2QL4MQYrjJosbc3qbOaOgxpiQdCD8bbri_2htmE=w19-h22-p-no"><span><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice"><a href="tel:(240)%20278-7194" value="+12402787194" target="_blank">240-278-7194</a></span></span></span>     </span><img src="https://lh3.googleusercontent.com/Al5wJW-OOXme8gnlQn1NDU562zNN0xVNdnBgQpr9UmM=s21-p-no"><span> <span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice"><a href="tel:(301)%20713-4501" value="+13017134501" target="_blank">301-713-4501</a></span></span></span>     </span><img src="https://lh4.googleusercontent.com/G0GpSYqY_PL8FGh8aZoUPlm0gvsVNeXUT8vnziWgU8E=s21-p-no"> <a href="mailto:neil.d.weston@noaa.gov" target="_blank">neil.d.weston@noaa.gov</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>