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/lai/"
13 ; fili = "land_class_0.25deg.nc"
14 fili = "land_class_T42_new.nc"
15 f = addfile(diri+fili,"r")
18 ; y = f->LAND_CLASS(::10,::10) ; for 0.25deg
19 ; y = (/ y(::-1,:) /) ; for 0.25deg
24 y = where(y.eq.0,y@_FillValue,y)
27 print (min(y)+"/"+max(y))
28 ;************************************************
30 ;************************************************
31 wks = gsn_open_wks("ps","xy") ; open a ps file
32 gsn_define_colormap(wks,"gui_default") ; choose colormap
34 res = True ; Use plot options
35 res@cnFillOn = True ; Turn on color fill
36 res@gsnSpreadColors = True ; use full colormap
37 ; res@cnFillMode = "RasterFill" ; Turn on raster color
38 ; res@lbLabelAutoStride = True
39 res@cnLinesOn = False ; Turn off contourn lines
40 res@mpFillOn = False ; Turn off map fill
41 res@tiMainString = "MODIS LAND CLASS T42"
43 res@gsnSpreadColors = True ; use full colormap
44 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
45 res@cnMinLevelValF = 1. ; Min level
46 res@cnMaxLevelValF = 19. ; Max level
47 res@cnLevelSpacingF = 1. ; interval
48 pres = True ; panel plot mods desired
49 pres@gsnMaximize = True ; fill the page
51 plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed
52 gsn_panel(wks,plot,(/1,1/),pres) ; create panel plot
53 system("convert xy.ps xy.png")