load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;-- read the data and define diri = "/home/model-user/2000/" fil1 = "IAGOS_timeseries_2000040222361353.nc" fil2 = "IAGOS_timeseries_2000040922544753.nc" fil3 = "IAGOS_timeseries_2000041122453853.nc" fil4 = "IAGOS_timeseries_2000041217193053.nc" fil5 = "IAGOS_timeseries_2000041220041453.nc" fil6 = "IAGOS_timeseries_2000041222213953.nc" fil7 = "IAGOS_timeseries_2000050222480853.nc" fil8 = "IAGOS_timeseries_2000050723210353.nc" fil9 = "IAGOS_timeseries_2000051317072253.nc" fil10 = "IAGOS_timeseries_2000051320135353.nc" fil11 = "IAGOS_timeseries_2000051322273853.nc" fil12 = "IAGOS_timeseries_2000053009261035.nc" fil13 = "IAGOS_timeseries_2000060622395953.nc" fil14 = "IAGOS_timeseries_2000071122541553.nc" fil15 = "IAGOS_timeseries_2000071622553453.nc" f1 = addfile(diri+fil1, "r") f2 = addfile(diri+fil2, "r") f3 = addfile(diri+fil3, "r") f4 = addfile(diri+fil4, "r") f5 = addfile(diri+fil5, "r") f6 = addfile(diri+fil6, "r") f7 = addfile(diri+fil7, "r") f8 = addfile(diri+fil8, "r") f9 = addfile(diri+fil9, "r") f10 = addfile(diri+fil10, "r") f11 = addfile(diri+fil11, "r") f12 = addfile(diri+fil12, "r") f13 = addfile(diri+fil13, "r") f14 = addfile(diri+fil14, "r") f15 = addfile(diri+fil15, "r") ozone1 = f1->O3_PM ozone1@long_name = "O3 volume mixing ratio" ozone2 = f2->O3_PM ozone2@long_name = "O3 volume mixing ratio" ozone3 = f3->O3_PM ozone3@long_name = "O3 volume mixing ratio" ozone4 = f4->O3_PM ozone4@long_name = "O3 volume mixing ratio" ozone5 = f5->O3_PM ozone5@long_name = "O3 volume mixing ratio" ozone6 = f6->O3_PM ozone6@long_name = "O3 volume mixing ratio" ozone7 = f7->O3_PM ozone7@long_name = "O3 volume mixing ratio" ozone8 = f8->O3_PM ozone8@long_name = "O3 volume mixing ratio" ozone9 = f9->O3_PM ozone9@long_name = "O3 volume mixing ratio" ozone10 = f10->O3_PM ozone10@long_name = "O3 volume mixing ratio" ozone11 = f11->O3_PM ozone11@long_name = "O3 volume mixing ratio" ozone12 = f12->O3_PM ozone12@long_name = "O3 volume mixing ratio" ozone13 = f13->O3_PM ozone13@long_name = "O3 volume mixing ratio" ozone14 = f14->O3_PM ozone14@long_name = "O3 volume mixing ratio" ozone15 = f15->O3_PM ozone15@long_name = "O3 volume mixing ratio" ;--------------------------------------------------- printVarSummary(ozone15) , just to see summary of one of the variables print ("min/max ozone15 = " + min(ozone15) + "/" + max(ozone15)) ;--------------------------------------------------- time = ispan (3600,103598,5) , data time in seconds long_name = "UTC time" ;---------------------------------------------------- ; to plot multiple lines, you must put them into a ; mulidimensional array ;---------------------------------------------------- data = new((/15,500/),double) data0 = ozone1 data1 = ozone2 data2 = ozone3 data3 = ozone4 data4 = ozone5 data5 = ozone6 data6 = ozone7 data7 = ozone8 data8 = ozone9 data9 = ozone10 data10 = ozone11 data11 = ozone12 data12 = ozone13 data13 = ozone14 data14 = ozone15 wks = gsn_open_wks("png", "O3_PM_ 2000_to & fro lagos_Flights") res = True res@xyExplicitLegendLabels = (/"data1",\"data2","data3",\"data4"\,"data5", "data6",\"data7\","data8","data9"\,"data10","data11"\,"data12","data13",\"data14"/) res@xyLineColors = (/"black",\"red", "green",\"blue",\ "orange","yellow",\"gray",\"purple","majenta",\"orchid1","plum1",\"magenta4""pink1",\"maroon","lightpink4"/) res@xyDashPatterns = (/0, 5, 2, 1, 3, 2, 1, 5, 2, 0, 5, 2, 4, 2, 3\) res@xyLineThicknessF = 3 res@tiYAxisString = "O3_PM ppb" res@tiYAxisFont = 21 res@tiYAxisFontAspectF = 1.3 res@tiYAxisFontHeightF = 0.012 res@tiXAxisString = "Time" res@tiXAxisFont = 21 res@tiXAxisFontAspectF = 1.3 res@tiXAxisFontHeightF = 0.012 res@tiXAxisOffsetYF = 0.0 res@tiMainOffsetYF = 0.11 res@tiMainString = "Ozone to and fro Lagos Flights 2000" res@tmXBLabelFontAspectF = 1.3 res@tmXBLabelFontHeightF = 0.012 res@trYMinF = 10.0 res@trYMaxF = 200.0 res@gsnDraw = False res@gsnFrame = False res@vpXF = 0.25 ;-- set viewport resources res@vpYF = 0.6 res@vpWidthF = 0.7 res@pmLegendDisplayMode = "Always" res@pmLegendWidthF = 0.12 ;-- set legend width res@pmLegendHeightF = 0.19 ;-- set legend height res@pmLegendParallelPosF = 0.18 ;-- move legend right ;-- create plot plot = gsn_csm_xy(wks,time,data,res) ;-- draw the plot draw(plot) frame(wks) end