load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;---Read the data. n_part = 1812 lat_begin = -40.1913 lat_end = -45.5302 data1 = asciiread("/home/yihuang/hd3/Vivian/WRF_CALIPSO/latitude_tab_13460.dat",(/n_part/),"float") data2 = asciiread("/home/yihuang/hd3/Vivian/WRF_CALIPSO/1064_Attenuated_Backscatter_13460.dat",(/583,n_part/),"float") data3 = asciiread("/home/yihuang/hd3/Vivian/WRF_CALIPSO/altitude_tab_13460.dat",(/583/),"float") data4 = new( (/583,n_part/),float) do i=0, n_part-1 data4(:,i) = data2(:,n_part-1-i) end do ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("PS","./1064_Attenuated_Backscatter_13460") gsn_define_colormap(wks,"tbr_240-300") ;************************************************ ; resource list for first data array ;************************************************ res1 = True res1@gsnMaximize = True ; Maximize plot in frame. res1@cnFillOn = True ; Turn on contour fill res1@cnFillMode = "RasterFill" ; Turn on raster fill res1@cnLinesOn = False ; Turn off contour lines res1@cnLevelSelectionMode = "ExplicitLevels" res1@cnLevels = (/ 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008, 0.0009, \ 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, 0.004, 0.0045, 0.005, \ 0.0055, 0.006, 0.0065, 0.007, 0.0075, 0.008, \ 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 /) res1@cnInfoLabelFormat = "#+^se" res1@gsnSpreadColors = True res1@lbBoxLinesOn = True res1@lbOrientation = "vertical" ; vertical label bar ;res1@lbLabelStrings = (/"Clear","Ice","Liquid","Orient"/) res1@lbLabelPosition = "Right" ; label position res1@lbLabelAlignment = "BoxCenters" res1@lbLabelFontHeightF = 0.015 res1@lbLabelFontHeightF = 0.01 res1@lbLabelStride = 2 res1@tmXBMode = "Explicit" res1@tmXBMinorOn = False res1@tmXBFormat = "f" res1@tmYLFormat = "f" res1@tmXBValues = (/-41,-42,-43,-44,-45/) res1@tmXBLabels = (/41,42,43,44,45/)+"S" res1@tmXBLabelFontHeightF = 0.02 res1@tmYLLabelFontHeightF = 0.02 res1@trYMinF = 0.0 ; set minimum Y-axis value res1@trYMaxF = 12.0 ; set maximum Y-axis value res1@sfXArray = fspan(lat_begin,lat_end,n_part) ; One more element in both res1@sfYArray = data3 ; X and Y res1@tiMainString = "CALIOP 1064nm Attenuated Backscatter (15:27UTC Nov 07,2008)" res1@tiMainFontHeightF = 0.02 res1@tiXAxisString = "Latitude(degree)" ; x-axis title res1@tiYAxisString = "Height(km)" ; y-axis title res1@tiXAxisFontHeightF = 0.02 res1@tiXAxisFontThicknessF = 2.0 res1@tiYAxisFontHeightF = 0.02 res1@tiYAxisFontThicknessF = 2.0 res1@trXReverse = True res1@vpWidthF = 0.7667 res1@vpHeightF = 0.3 contour1 = gsn_csm_contour(wks,data4,res1) end