<div dir="ltr"><div>Dear ncl users,</div><div>I managed to get a map. But still some error. <br></div><div>I would appreciate any help to fix this error. <br></div><div><br></div><div>Thanks</div><div><br></div><div>Error: <br></div><div>warning:ScalarFieldSetValues: irregular coordinate array sfXArray non-monotonic: defaulting sfXArray<br>warning:ScalarFieldSetValues: irregular coordinate array sfYArray non-monotonic: defaulting sfYArray<br>warning:ScalarFieldSetValues: irregular coordinate array sfXArray non-monotonic: defaulting sfXArray<br>warning:ScalarFieldSetValues: irregular coordinate array sfYArray non-monotonic: defaulting sfYArray</div><div><br></div><div>;----------------------------------------------------------------------<br>; dataonmap_5.ncl<br>;<br>begin<br>nlat=720<br>nlon=1440<br><br>ncol  = 6<br>nhead = 1<br><br>fname = "avhrr_seaice"<br>nrow = numAsciiRow (fname)<br> data = asciiread (fname,(/nrow,ncol/), "float")<br>data@FillValue = -999.9<br> printVarSummary(data)<br> lat = data (::nlat,0)<br>mlat = dimsizes(lat)<br> lon = data (::nlon,1)<br> mlon = dimsizes(lon)<br>precip = data (:,0)<br>printVarSummary(precip)<br>pre = onedtond(precip,(/mlat,mlon/))<br>printVarSummary(pre)<br>lat!0 = "lat"<br>lon!0 = "lon"<br> <br>pre!0 = "lat"<br>pre!1 = "lon"<br> ;-----------------------------------------------------------------------<br>   ; Assign coordinate variables<br> ;-----------------------------------------------------------------------<br> lat&lat =  lat<br> lon&lon =  lon<br> <br> pre&lat  = lat<br> pre&lon  = lon<br> pre&lat@units="degrees_north"<br>  pre&lon@units="degrees_east"<br> ;-----------------<br>printVarSummary(pre)<br>wks = gsn_open_wks("pdf","test")               ; send graphics to PNG file<br><br> plot = new(2,graphic)<br>  cmap = read_colormap_file("UKM_hadcrut"); choose colormap<br><br><br>res                      = True               ; plot mods desired<br>  res@cnFillOn             = True               ; turn on color<br>;res@mpShapeMode  = "FreeAspect"<br>res@vpWidthF      = 0.3<br>res@vpHeightF     = 0.2<br>;  res@cnFillPalette  2     = "grads_rainbow"     ; choose colormap<br>  res@cnFillPalette        = cmap     ; choose colormap<br>  res@gsnPolar           = "NH"               ; specify the hemisphere<br>res@gsnDraw              = False<br> res@gsnFrame    = False<br> res@gsnTickMarksOn         = False<br>  res@mpMinLatF            = 50                 ; specify min lat<br>res@gsnAddCyclic = False<br>;  res@mpMinLatF            = minlatt                 ; specify min lat<br>;res@mpMaxLatF            = maxlatt <br>  res@trGridType           = "TriangularMesh"<br>  res@cnLinesOn            = False        ; True is default<br>;res@mpFillOn             = False              ; turns off continent gray<br>  res@cnLineLabelsOn       = False        ; True is default<br>res@mpGridAndLimbOn = False<br>res@mpLabelFontHeightF = "22"<br>res@mpPerimLineThicknessF = 2<br>res@mpOutlineOn           = True<br>; res@mpLandFillColor       = "tan"<br>;res@tiMainString    = ""+type+"-"+mon+""<br>  res@lbLabelBarOn         = False        ; turn off individual lb's<br><br> res@gsnLeftString    = ""    ; no titles<br>  res@gsnRightString   = ""<br>  res@tiXAxisString    = ""<br>  res@tiYAxisString    = ""<br>  res@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels<br>  res@cnMinLevelValF       =  0;0              ; set min contour level<br>  res@cnMaxLevelValF       = 100 ;6                ; set max contour level<br>  res@cnLevelSpacingF      =  10;0.5              ; set contour spacing<br><br><br>;res@lbOrientation        = "Horizontal"<br>;res@lbLabelFontHeightF = 0.014 <br>;res@lbLabelFont = "22"<br>;  res@lbTitleString    = ""+type+""<br>;  res@lbTitleString        = " (deg C)" ; bar title<br>;  res@lbTitlePosition      = "Right"                           ; title location<br>;  res@lbTitleDirection     = "Across"                          ; letter angle<br>;  res@lbTitleAngleF        = 90.                               ; title angle<br>;  res@lbTitleFontHeightF   = 0.02                              ; font height<br> res@gsnStringFont              = "helvetica-bold"  ; will be used for gsnCenterString later<br>    res@gsnCenterStringFontHeightF = 0.014<br>res@gsnCenterString    = "NDJFM"<br>  plot(0) = gsn_csm_contour_map_polar(wks,pre,res)<br>res@gsnCenterString    = "JJAS"<br>  plot(1) = gsn_csm_contour_map_polar(wks,pre,res)<br>;********************************<br>;;;;;Contour plot;;;;;;;;;;;;;;;<br>;********************************<br>; panel plot only resources<br>;********************************<br>; panel plot only resources<br>; panel plot only resources<br>  resP                     = True         ; modify the panel plot<br>  resP@gsnMaximize         = True         ; large format<br>  resP@gsnPanelLabelBar    = True         ; add common colorbar<br>resP@lbLabelFontHeightF = 0.012<br> resP@gsnPanelBottom   = 0.2;;;increases figure size                    ; shrink panel plot by setting bottom edge of plot<br> resP@gsnPanelTop      = 0.9                    ; shrink panel plot by setting top edge of plot<br> resP@pmLabelBarWidthF  = 0.50                 ; make thinner/small number<br>;  resP@pmLabelBarHeightF = 0.05<br> resP@pmLabelBarHeightF = 0.08<br>resP@pmLabelBarOrthogonalPosF = -0.016<br>; resP@gsnPanelYWhiteSpacePercent = 5.           ; increase spacing along Y-axis between panel plots<br> resP@gsnPanelYWhiteSpacePercent = 2;;increases the figure size           ; increase spacing along Y-axis between panel plots<br>res@lbLabelFontHeightF = 0.018<br>resP@lbLabelFont = "22"<br>;  resP@lbTitleString    = ""+tic+""<br> resP@cnLinesOn       = False                   ; turn off contour lines<br>  resP@lbLabelFont    = "helvetica-bold"          ; add common colorbar<br>  resP@lbTitleFont    = "helvetica-bold"          ; add common colorbar<br>  resP@lbTitleFontHeightF= .015                 ; make title smaller<br>  resP@cnLineLabelsOn  = False<br>  resP@txFontHeightF   = 0.03<br>  resP@txFont   = "helvetica-bold"<br><br>gsn_panel(wks,plot,(/1,2/),resP)<br>;---This will maximize the size of all the paneled stuff.<br>;end do<br><br>end </div></div>