;************************************************* ; station_plot_marker.ncl ;************************************************* load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ; Data is stored in four columns: station_name lat lon pwv ; Read in each line as a string, and use "str_get_field" to ; read in the fields of interest. ; fname = "pw.dat" lines = asciiread(fname,-1,"string") ; ; Use "str_get_field" to indicate which fields to read in. Each field ; is separated by spaces. ; lat = stringtofloat(str_get_field(lines(1:),2," ")) lon = stringtofloat(str_get_field(lines(1:),3," ")) R = stringtofloat(str_get_field(lines(1:),4," ")) ;=========================================================================== ; Begin plotting section. ; wks = gsn_open_wks("x11","station") ; Open a workstation and gsn_define_colormap(wks,"WhViBlGrYeOrRe") ; define a different colormap. ; nc1 = NhlNewColor(wks,.8,.8,.8) ; Add light gray to colormap, ; for continents. ; ; Set up some map resources. ; mpres = True mpres@gsnMaximize = True ; Maximize plot in frame. mpres@gsnFrame = False ; Don't advance the frame mpres@mpFillColors = (/-1,-1,nc1,-1/) ;assign light gray to land masses mpres@tiMainString = "Different measurements for pwv" map = gsn_csm_map(wks,mpres) ; ; Create logical variables to hold the marker and text resources. ; These markers are different than the XY markers, because they are not ; associated with an XY plot. You can put these markers on any plot. ; gsres = True gsres@gsMarkerIndex = 16 ; Use filled dots for markers. ; Draw Markers for each Measurement ; gsres@gsMarkerColor = (/"red","blue"/) gsres@cnFillOn = True ; turn on color gsn_polymarker(wks,map,lon,lat,gsres) frame(wks) ; Advance the frame. end