1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/npp/31.contour_ob.ncl Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,58 @@
1.4 +;*************************************************
1.5 +; ce_1.ncl
1.6 +;************************************************
1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
1.9 +;************************************************
1.10 +begin
1.11 +;************************************************
1.12 +; read in observed data
1.13 +;************************************************
1.14 +;f = addfile ("Npp_0.05deg_mean.nc","r")
1.15 +;y = f->NPP(::10,::10) ; for observed 0.05deg
1.16 + f = addfile ("Npp_T42_mean.nc","r")
1.17 + y = f->NPP
1.18 +;************************************************
1.19 +; read in model data
1.20 +;************************************************
1.21 + g = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r")
1.22 +;g = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r")
1.23 + x = g->NPP
1.24 +
1.25 + delta = 0.00000000001
1.26 + x0 = x(0,:,:)
1.27 + y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y)
1.28 +
1.29 + y@units = "gC/m^2/year"
1.30 +;************************************************
1.31 +; create default plot
1.32 +;************************************************
1.33 +
1.34 +; setvalues NhlGetWorkspaceObjectId()
1.35 +; "wsMaximumSize" : 199999999
1.36 +; end setvalues
1.37 +
1.38 + wks = gsn_open_wks("png","xy") ; open a ps file
1.39 +; gsn_define_colormap(wks,"wgne15") ; choose colormap
1.40 + gsn_define_colormap(wks,"gui_default") ; choose colormap
1.41 +
1.42 + res = True ; Use plot options
1.43 + res@cnFillOn = True ; Turn on color fill
1.44 + res@gsnSpreadColors = True ; use full colormap
1.45 +; res@cnFillMode = "RasterFill" ; Turn on raster color
1.46 +; res@lbLabelAutoStride = True
1.47 + res@cnLinesOn = False ; Turn off contourn lines
1.48 + res@mpFillOn = False ; Turn off map fill
1.49 + res@tiMainString = "Observed MODIS MOD 17"
1.50 +; res@tiMainString = "Model i01.03cn"
1.51 +; res@tiMainString = "Model i01.04casa"
1.52 +
1.53 + res@gsnSpreadColors = True ; use full colormap
1.54 + res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
1.55 + res@cnMinLevelValF = 0. ; Min level
1.56 + res@cnMaxLevelValF = 2200. ; Max level
1.57 + res@cnLevelSpacingF = 200. ; interval
1.58 +
1.59 + plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed
1.60 +
1.61 +end
1.62 \ No newline at end of file