diff -r 000000000000 -r 0c6405ab2ff4 npp/31.contour_model.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/npp/31.contour_model.ncl Mon Jan 26 22:08:20 2009 -0500 @@ -0,0 +1,65 @@ +;************************************************* +; ce_1.ncl +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +;************************************************ +begin +;************************************************ +; read in netCDF file +;************************************************ +; fili = "Npp_0.05deg_mean.nc" + fili = "Npp_T42_mean.nc" +; fili = "i01.03cn_1545-1569_ANN_climo.nc" +; fili = "i01.04casa_1605-1629_ANN_climo.nc" + + a = addfile(fili,"r") + +;************************************************ +; read in data +;************************************************ +; x = a->NPP(::10,::10) ; for observed 0.05deg + x = a->NPP + + nsec_per_year = 60*60*24*365 + +;scale_factor = nsec_per_year ; for model + scale_factor = 1. ; for observed T42 +;scale_factor = 0.1 ; for observed 0.05deg + + x = x * scale_factor + + x@units = "gC/m^2/year" +;************************************************ +; create default plot +;************************************************ + +; setvalues NhlGetWorkspaceObjectId() +; "wsMaximumSize" : 199999999 +; end setvalues + + wks = gsn_open_wks("png","xy") ; open a ps file +; gsn_define_colormap(wks,"wgne15") ; choose colormap + gsn_define_colormap(wks,"gui_default") ; choose colormap + + res = True ; Use plot options + res@cnFillOn = True ; Turn on color fill + res@gsnSpreadColors = True ; use full colormap +; res@cnFillMode = "RasterFill" ; Turn on raster color +; res@lbLabelAutoStride = True + res@cnLinesOn = False ; Turn off contourn lines + res@mpFillOn = False ; Turn off map fill + res@tiMainString = "Observed MODIS MOD 17" +; res@tiMainString = "Model i01.03cn" +; res@tiMainString = "Model i01.04casa" + + res@gsnSpreadColors = True ; use full colormap + res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals + res@cnMinLevelValF = 0. ; Min level + res@cnMaxLevelValF = 2200. ; Max level + res@cnLevelSpacingF = 200. ; interval + + plot = gsn_csm_contour_map_ce(wks,x,res) ; for observed +; plot = gsn_csm_contour_map_ce(wks,x(0,:,:),res) ; for model + +end \ No newline at end of file