begin cdf_file = addfile("horizontal-high.nc","r") ;cdf_file = addfile("vertical-high.nc","r") shift = cdf_file->z ; don't need "(:,:)" ;---Fix the _FillValues to not be NaN shift@_FillValue := default_fillvalue(typeof(shift)) replace_ieeenan (shift,shift@_FillValue,0) shift&x@units = "degrees_east" ; so we can plot over a map shift&y@units = "degrees_north" shift@long_name = "" ; look at your data printVarSummary(shift) printMinMax(shift,0) ; detailed metrics on data opt = True opt@PrintStat = True statb = stat_dispersion(shift, opt) wks = gsn_open_wks("x11","overlay") ; define resources res = True res@gsnMaximize = True ; contour res@cnFillOn = True res@cnLinesOn = False res@cnInfoLabelOn = False res@cnFillPalette = "MPL_jet" ;res@cnFillPalette = "BkBlAqGrYeOrReViWh200" ;res@cnFillPalette = "horizontal" res@lbOrientation = "Vertical" ;res@lbTitleString = "Horizontal Shift" res@lbTitlePosition = "Left" res@lbBoxLinesOn = False res@lbTitleFontHeightF = 0.015 res@lbLabelFontHeightF = 0.01 res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 0.0 res@cnMaxLevelValF = 2.0 res@cnLevelSpacingF = 0.1 res@cnLineLabelsOn = False ; make sure contours are drawn in "predraw" phase res@cnFillDrawOrder = "Predraw" ; map res@tiMainString = "Horizontal Shift (m)" res@mpFillOn = False res@mpMaxLatF = 80 res@mpMinLatF = 5 res@mpMinLonF = -170 res@mpMaxLonF = -55 res@mpOutlineOn = True res@mpOutlineDrawOrder = "PostDraw" ; create and draw contours over map plot = gsn_csm_contour_map(wks,shift,res) end