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 ;************************************************
10 day_of_data = (/31,28,31,30,31,30,31,31,30,31,30,31/)
12 ;************************************************
13 ; read in observed data
14 ;************************************************
15 diri1 = "/fis/cgd/cseg/people/jeff/clamp_data/lai/"
16 fili1 = "LAI_2000-2005_ensemble_T42.nc"
17 f = addfile(diri1+fili1,"r")
21 y@long_name = "Days of Growing Season"
23 dsizes_z = dimsizes(z)
32 if (.not. ismissing(z(k,j,i)) .and. z(k,j,i) .gt. 1.0) then
33 nday = nday + day_of_data(k)
36 if (nday .ne. 0.) then
43 print (min(y)+"/"+max(y))
46 ;************************************************
48 ;************************************************
49 diri2 = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
50 ;fili3 = "i01.03cn_1545-1569_MONS_climo.nc"
51 fili3 = "i01.04casa_1605-1629_MONS_climo.nc"
52 data_file_model = addfile(diri2+fili3,"r")
54 z = data_file_model->TLAI
56 x@long_name = "Days of Growing Season"
58 dsizes_z = dimsizes(z)
67 if (.not. ismissing(z(k,j,i)) .and. z(k,j,i) .gt. 1.0) then
68 nday = nday + day_of_data(k)
71 if (nday .ne. 0.) then
77 print (min(x)+"/"+max(x))
81 print (min(d)+"/"+max(d))
86 y = where(ismissing(y).and.(ismissing(x).or.(x.lt.delta)),0.,y)
87 ;************************************************
89 ;************************************************
90 wks = gsn_open_wks("ps","xy") ; open a ps file
91 gsn_define_colormap(wks,"gui_default") ; choose colormap
93 res = True ; Use plot options
94 res@cnFillOn = True ; Turn on color fill
95 res@gsnSpreadColors = True ; use full colormap
96 ; res@cnFillMode = "RasterFill" ; Turn on raster color
97 ; res@lbLabelAutoStride = True
98 res@cnLinesOn = False ; Turn off contourn lines
99 res@mpFillOn = False ; Turn off map fill
101 res@gsnSpreadColors = True ; use full colormap
102 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
103 res@cnMinLevelValF = 0. ; Min level
104 res@cnMaxLevelValF = 365. ; Max level
105 res@cnLevelSpacingF = 30. ; interval
107 pres = True ; panel plot mods desired
108 pres@gsnMaximize = True ; fill the page
110 plot=new(3,graphic) ; create graphic array
112 res@tiMainString = "MODIS MOD 15A2 2000-2005"
113 plot(0) = gsn_csm_contour_map_ce(wks,y,res)
115 ; res@tiMainString = "Model i01.03cn"
116 res@tiMainString = "Model i01.04casa"
117 plot(1) = gsn_csm_contour_map_ce(wks,x,res)
119 ; res@tiMainString = "(Model i01.03cn) - (Observed)"
120 res@tiMainString = "(Model i01.04casa) - (Observed)"
121 res@cnMinLevelValF = -120. ; Min level
122 res@cnMaxLevelValF = 120. ; Max level
123 res@cnLevelSpacingF = 20. ; interval
124 plot(2) = gsn_csm_contour_map_ce(wks,d,res) ; for observed
126 gsn_panel(wks,plot,(/3,1/),pres) ; create panel plot
127 system("convert xy.ps xy.png")