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" DUSTAOD5 = asciiread(fileHandle5, (/92,4/), "float") DUSTAOD5@_FillValue = -9999 aod5 = new((/3,92/),"float", DUSTAOD5@_FillValue) day5 = new((/92/),"float","No_FillValue") day5(:) = DUSTAOD5(:,0) aod5(0,:) = DUSTAOD5(:,1) aod5(1,:) = DUSTAOD5(:,2) aod5(2,:) = DUSTAOD5(:,3) delete(path) print("plotting") wks = gsn_open_wks("pdf", "test") res1 = True res1@xyMarkLineModes = "Markers" ;1st line res1@xyMarkers = 3 res1@xyMarkerSizeF = 0.01 res1@xyLineThicknesses = (/2.0,2.0,2.0/) res1@xyLineColors = (/"black","blue","red"/) res1@pmLegendDisplayMode = "Always" ; turn on legend res1@pmLegendSide = "Top" ; Change location of res1@pmLegendParallelPosF = .6 ; move units right res1@pmLegendOrthogonalPosF = -0.3 ; move units down res1@pmLegendWidthF = 0.15 ; Change width and res1@pmLegendHeightF = 0.09 ; height of legend. res1@lgPerimOn = False ; turn off box around res1@lgTitleFontHeightF = .018 res1@lgTitleString = "Beijing(39.98N 116.38E)" ; create legend title res1@lgLabelFontHeightF = .015 ; label font height res1@xyExplicitLegendLabels = (/"AERONET","10-m wind","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