begin ; ; Data is stored in four columns: station_name lat lon pwv ; Read in each line as a string, use "str_get_field" to ; read in the fields of interest and "tofloat" to convert ; to float. ; ; read ascii data------------------------------------------------------ lines = asciiread("./cband_kinu_fullrow_nagata",-1,"string") ; read nt, nlocation nt_raw = str_get_field(lines(0),6,":") nt_split = str_split(nt_raw, "=") nt = toint(nt_split(1)) nt_len = nt ; read data time = str_split(lines(1),",") lat = str_split(lines(2),",") lon = str_split(lines(3),",") type = "png" type@wkWidth = 1500 ; Increase size for a slightly type@wkHeight = 1500 ; better looking PNG. wks = gsn_open_wks(type,"./cband_density/cband_density_test") res = True ;---Zoom in on region of interest, with a little bit of a border res@mpLimitMode = "LatLon" res@mpMinLatF = min(lat)-0.5 res@mpMaxLatF = max(lat)+0.5 res@mpMinLonF = min(lon)-0.5 res@mpMaxLonF = max(lon)+0.5 res@mpOutlineOn = True ; Necessary for contours to be overlaid correctly on map res@sfXArray = lon ; Associates lat/lon locations res@sfYArray = lat ; with data values. res@gsnAddCyclic = False ; don't add a cyclic point. res@cnFillOn = True ; let NCL pick the contour levels do nt = 0, nt_len-1, 2 ; read radar data radar = tofloat(str_split(lines(nt + 4),",")) ; make contour plot = gsn_csm_contour_map(wks,radar,res) end do end