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 diri = "/fis/cgd/cseg/people/jeff/clamp_data/"
13 fili = "LAI_2000-2005_ensemble_T42.nc"
14 ; fili = "LAI_2000_monthly_T42.nc"
15 f = addfile(diri+fili,"r")
19 y@long_name = "Leaf Area Index Max"
21 p@long_name = "Leaf Area Index Max Month"
25 dsizes_z = dimsizes(z)
36 ; iMax = ind(s.eq.y(j,i)) + 1 ; may be multiple max
37 ; if (.not.ismissing(iMax(0))) then
38 ; p(j,i) = iMax(0) ; no meta data
46 print (min(y)+"/"+max(y))
47 print (min(p)+"/"+max(p))
49 ;************************************************
51 ;************************************************
52 fili2 = "i01.03cn_1545-1569_ANN_climo.nc"
53 g = addfile(diri+fili2,"r")
58 y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y)
59 ;************************************************
61 ;************************************************
63 ; setvalues NhlGetWorkspaceObjectId()
64 ; "wsMaximumSize" : 199999999
67 wks = gsn_open_wks("ps","xy") ; open a ps file
68 ; gsn_define_colormap(wks,"wgne15") ; choose colormap
69 gsn_define_colormap(wks,"gui_default") ; choose colormap
71 res = True ; Use plot options
72 res@cnFillOn = True ; Turn on color fill
73 res@gsnSpreadColors = True ; use full colormap
74 ; res@cnFillMode = "RasterFill" ; Turn on raster color
75 ; res@lbLabelAutoStride = True
76 res@cnLinesOn = False ; Turn off contourn lines
77 res@mpFillOn = False ; Turn off map fill
78 res@tiMainString = "MODIS MOD 15A2 2000-2005"
80 res@gsnSpreadColors = True ; use full colormap
81 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
82 res@cnMinLevelValF = 0. ; Min level
83 res@cnMaxLevelValF = 10. ; Max level
84 res@cnLevelSpacingF = 1. ; interval
86 ; pres = True ; panel plot mods desired
87 ; pres@gsnMaximize = True ; fill the page
89 plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed
91 res@cnMinLevelValF = 1. ; Min level
92 res@cnMaxLevelValF = 12. ; Max level
93 res@cnLevelSpacingF = 1. ; interval
94 plot = gsn_csm_contour_map_ce(wks,p,res) ; for observed
96 ; gsn_panel(wks,plot,(/1,1/),pres) ; create panel plot
97 system("convert xy.ps xy.png")