load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" begin path = "/Volumes/Data/Models/cam/AOD/aeronet/" fileHandle5= path + "test.txt" ; Read data DUSTAOD5 = asciiread(fileHandle5, (/400,45/), "float") aod5 = new((/400/),"float") day5 = new((/400/),"float") day5(:) = DUSTAOD5(:,2)-90 aod5(:) = DUSTAOD5(:,12) printVarSummary(day5) printVarSummary(aod5) delete(path) ; plotting print("plotting") wks = gsn_open_wks("pdf", "test") res1 = True ;res1@xyMarkLineModes = "Marklines" res1@xyMarkLineModes = "Markers" res1@xyMarkers = 3 res1@xyMarkerSizeF = 0.01 res1@xyLineThicknesses = 2.0 res1@xyLineColors = "black" res1@pmLegendDisplayMode = "Always" ; turn on legend res1@pmLegendSide = "Top" ; Change location of res1@pmLegendParallelPosF = .6 ; move units right res1@pmLegendOrthogonalPosF = -0.28 ; move units down res1@pmLegendWidthF = 0.15 ; Change width and res1@pmLegendHeightF = 0.03 ; height of legend. res1@lgPerimOn = False ; turn off box around res1@lgTitleFontHeightF = .018 res1@lgLabelFontHeightF = .015 ; label font height res1@xyExplicitLegendLabels = (/"AERONET","ustar"/) res1@tiXAxisString = "days in April 2001" res1@tiYAxisString = "AOD[500nm] " res1@tmLabelAutoStride = True res1@trXLog = False res1@trYLog = False res1@trXMinF = 0.0 res1@trXMaxF = 30 res1@trYMinF = 0.0 res1@trYMaxF = 6.0 plot = gsn_csm_xy(wks, day5, aod5, res1) end