filename = "zero_skipped.csv" ;---------------------------------------------------------------------- ; This method uses "asciiread" to read the data ;---------------------------------------------------------------------- ;---Read the values in as 1D array of strings to get rows and columns. lines = asciiread(filename,-1,"string") nlines = dimsizes(lines)-1 ncols = dimsizes(str_split(lines(0),",")) nrows = dimsizes(lines) print("This file has " + nrows + " rows and " + ncols + " columns.") ; z3 = asciiread("not_zero_skipped.csv",-1,"float") lat = str_get_field(lines , 2, ",") lon = str_get_field(lines , 1, ",") data = str_get_field(lines , 3, ",") lat := stringtofloat(lat) lon := stringtofloat(lon) data := stringtofloat(data) wks = gsn_open_wks("x11","example") res = True res@gsnFrame = False ; So we can draw markers res@gsnMaximize = True res@pmTickMarkDisplayMode = "Always" res@trGridType = "TriangularMesh" ; The default if you res@mpMinLatF = 1.2347 ; range to zoom in on res@mpMaxLatF = 1.4836 res@mpMinLonF = 103.5420 res@mpMaxLonF = 104 res@mpOutlineBoundarySets = "AllBoundaries" res@mpDataBaseVersion = "MediumRes" res@mpDataSetName = "Earth..4" ; U.S. counties ; res@cnLevelSelectionMode = "ManualLevels" ; res@cnMinLevelValF = 6.0475E-06 ; res@cnMaxLevelValF = 42.45302 ; res@cnLevelSpacingF = 10 res@cnFillOn = True res@cnFillPalette = "WhViBlGrYeOrRe" ; set color map res@cnLinesOn = True res@cnLineLabelsOn = False res@sfXArray = lon res@sfYArray = lat ; res@tiMainString = fldstr+": "+yyyymm res@pmLabelBarOrthogonalPosF = 0.15 ; move labelbar down a smidge res@pmLabelBarHeightF = 0.07 ; make labelbar thinner map = gsn_csm_contour_map(wks,data,res) draw(map) frame(wks)