Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
1 ;*************************************************
3 ;************************************************
4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
6 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
7 ;************************************************
9 ;************************************************
10 ; read in observed data
11 ;************************************************
12 diri1 = "/fis/cgd/cseg/people/jeff/clamp_data/lai/"
13 fili1 = "LAI_2000-2005_ensemble_T42.nc"
14 f = addfile(diri1+fili1,"r")
18 y@long_name = "Leaf Area Index Max"
21 dsizes_z = dimsizes(z)
34 print (min(y)+"/"+max(y))
38 ;************************************************
40 ;************************************************
41 diri2 = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
42 ;fili3 = "i01.03cn_1545-1569_MONS_climo.nc"
43 fili3 = "i01.04casa_1605-1629_MONS_climo.nc"
44 data_file_model = addfile(diri2+fili3,"r")
46 z = data_file_model->TLAI
48 x@long_name = "Leaf Area Index Max"
51 dsizes_z = dimsizes(z)
63 print (min(x)+"/"+max(x))
66 print (min(d)+"/"+max(d))
72 y = where(ismissing(y).and.(ismissing(x).or.(x.lt.delta)),0.,y)
73 ;************************************************
75 ;************************************************
76 wks = gsn_open_wks("ps","xy") ; open a ps file
77 gsn_define_colormap(wks,"gui_default") ; choose colormap
79 res = True ; Use plot options
80 res@cnFillOn = True ; Turn on color fill
81 res@gsnSpreadColors = True ; use full colormap
82 ; res@cnFillMode = "RasterFill" ; Turn on raster color
83 ; res@lbLabelAutoStride = True
84 res@cnLinesOn = False ; Turn off contourn lines
85 res@mpFillOn = False ; Turn off map fill
87 res@gsnSpreadColors = True ; use full colormap
88 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
89 res@cnMinLevelValF = 0. ; Min level
90 res@cnMaxLevelValF = 10. ; Max level
91 res@cnLevelSpacingF = 1. ; interval
93 pres = True ; panel plot mods desired
94 pres@gsnMaximize = True ; fill the page
96 plot=new(3,graphic) ; create graphic array
98 res@tiMainString = "MODIS MOD 15A2 2000-2005"
99 plot(0) = gsn_csm_contour_map_ce(wks,y,res)
101 ; res@tiMainString = "Model i01.03cn"
102 res@tiMainString = "Model i01.04casa"
103 plot(1) = gsn_csm_contour_map_ce(wks,x,res)
105 ; res@tiMainString = "(Model i01.03cn) - (Observed)"
106 res@tiMainString = "(Model i01.04casa) - (Observed)"
107 res@cnMinLevelValF = -6. ; Min level
108 res@cnMaxLevelValF = 6. ; Max level
109 res@cnLevelSpacingF = 1. ; interval
110 plot(2) = gsn_csm_contour_map_ce(wks,d,res) ; for observed
112 gsn_panel(wks,plot,(/3,1/),pres) ; create panel plot
113 system("convert xy.ps xy.png")