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 ;************************************************
8 ;************************************************
9 ; read in observed data
10 ;************************************************
11 f = addfile ("Npp_T42_mean.nc","r")
13 ;************************************************
15 ;************************************************
16 g = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r")
17 ;g = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r")
20 nsec_per_year = 86400.*365.
23 x@units = "gC/m^2/year"
24 ;************************************************
25 ;fill ob missing grid the same as model
26 ;************************************************
29 y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y)
31 y@units = "gC/m^2/year"
32 ;************************************************
34 ;************************************************
37 ;************************************************
39 ;************************************************
40 wks = gsn_open_wks("ps","xy") ; open a ps file
41 gsn_define_colormap(wks,"gui_default") ; choose colormap
43 res = True ; Use plot options
44 res@cnFillOn = True ; Turn on color fill
45 res@gsnSpreadColors = True ; use full colormap
46 ; res@cnFillMode = "RasterFill" ; Turn on raster color
47 ; res@lbLabelAutoStride = True
48 res@cnLinesOn = False ; Turn off contourn lines
49 res@mpFillOn = False ; Turn off map fill
50 res@tiMainString = "Observed MODIS MOD 17"
52 res@gsnSpreadColors = True ; use full colormap
53 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
54 res@cnMinLevelValF = 0. ; Min level
55 res@cnMaxLevelValF = 2200. ; Max level
56 res@cnLevelSpacingF = 200. ; interval
58 res@gsnFrame = False ; Do not draw plot
59 res@gsnDraw = False ; Do not advance frame
61 plot=new(3,graphic) ; create graphic array
63 plot(0) = gsn_csm_contour_map_ce(wks,y,res) ; for observed
65 res@tiMainString = "Model i01.03cn"
66 ; res@tiMainString = "Model i01.04casa"
67 plot(1) = gsn_csm_contour_map_ce(wks,x(0,:,:),res) ; for model
69 res@cnMinLevelValF = -500 ; Min level
70 res@cnMaxLevelValF = 500. ; Max level
71 res@cnLevelSpacingF = 50. ; interval
72 res@tiMainString = "(Model i01.03cn) - (observed)"
73 ; res@tiMainString = "(Model i01.04casa) - (observed)"
74 plot(2) = gsn_csm_contour_map_ce(wks,z(0,:,:),res) ; for model - ob
76 ;***********************************************
78 ;***********************************************
79 pres = True ; panel plot mods desired
80 pres@gsnPanelYWhiteSpacePercent = 5 ; increase white space around
81 ; indiv. plots in panel
82 pres@gsnMaximize = True ; fill the page
84 gsn_panel(wks,plot,(/3,1/),pres) ; create panel plot
86 system("convert xy.ps xy.png")