hdr = readAsciiHead("abl_2010_01_02_21_step_15.asc", 7) ncols = stringtoint( str_get_field(hdr(0), 2, " ") ) nrows = stringtoint( str_get_field(hdr(1), 2, " ") ) lonLL = stringtofloat( str_get_field(hdr(2), 2, " ") ) latLL = stringtofloat( str_get_field(hdr(3), 2, " ") ) deltaLon = stringtofloat( str_get_field(hdr(4), 2, " " ) ) deltaLat = stringtofloat( str_get_field(hdr(5), 2, " ") ) missingVal = stringtofloat( str_get_field(hdr(6), 2, " ") ) data = readAsciiTable("abl_2010_01_02_21_step_15.asc",ncols,"float",7) ; construct 1D coordinates.... lons = ispan(0,ncols-1,1) * deltaLon + lonLL lats = ispan(0,nrows-1,1) * deltaLat + latLL ; gsn_coordinates wants 2D coordinate arrays data@lon2d = conform_dims((/ nrows, ncols/), lons, 1) data@lat2d = conform_dims((/ nrows, ncols/), lats, 0) data@_FillValue = missingVal printVarSummary(data) wks = gsn_open_wks("x11", "plot") res = True res@gsnDraw = False res@gsnFrame = False res@mpLimitMode = "LatLon" res@mpMinLonF = lons(0) - 1 ; the +/- 1 is a margin res@mpMaxLonF = lons(ncols-1) + 1 ; res@mpMinLatF = lats(0) - 1 ; res@mpMaxLatF = lats(nrows-1) + 1 ; map = gsn_csm_map(wks, res) res := True res@gsnCoordsMissingColor = (/ 0., 0., 0., 0./) ; transparent res@gsnCoordsAttach = True gsn_coordinates(wks, map, data, res) draw(map ) frame(wks)