|
1 ;************************************************* |
|
2 ; ce_1.ncl |
|
3 ;************************************************ |
|
4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" |
|
5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" |
|
6 ;************************************************ |
|
7 begin |
|
8 ;************************************************ |
|
9 ; read in observed data |
|
10 ;************************************************ |
|
11 diri = "/fis/cgd/cseg/people/jeff/clamp_data/" |
|
12 fili = "LAI_2000-2005_mean_T42.nc" |
|
13 f = addfile(diri+fili,"r") |
|
14 |
|
15 y = f->LAI |
|
16 printVarSummary(y) |
|
17 |
|
18 print (min(y)+"/"+max(y)) |
|
19 |
|
20 ;************************************************ |
|
21 ; read in model data |
|
22 ;************************************************ |
|
23 fili2 = "i01.03cn_1545-1569_ANN_climo.nc" |
|
24 g = addfile(diri+fili2,"r") |
|
25 x = g->LAISUN |
|
26 |
|
27 delta = 0.0000001 |
|
28 x0 = x(0,:,:) |
|
29 y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y) |
|
30 ; y = where((y.gt.1000.),1.e+36,y) |
|
31 printVarSummary(y) |
|
32 print (min(y)+"/"+max(y)) |
|
33 ;************************************************ |
|
34 ; create default plot |
|
35 ;************************************************ |
|
36 |
|
37 ; setvalues NhlGetWorkspaceObjectId() |
|
38 ; "wsMaximumSize" : 199999999 |
|
39 ; end setvalues |
|
40 |
|
41 wks = gsn_open_wks("ps","xy") ; open a ps file |
|
42 ; gsn_define_colormap(wks,"wgne15") ; choose colormap |
|
43 gsn_define_colormap(wks,"gui_default") ; choose colormap |
|
44 |
|
45 res = True ; Use plot options |
|
46 res@cnFillOn = True ; Turn on color fill |
|
47 res@gsnSpreadColors = True ; use full colormap |
|
48 ; res@cnFillMode = "RasterFill" ; Turn on raster color |
|
49 ; res@lbLabelAutoStride = True |
|
50 res@cnLinesOn = False ; Turn off contourn lines |
|
51 res@mpFillOn = False ; Turn off map fill |
|
52 res@tiMainString = "MODIS MOD 15A2 2000-2005" |
|
53 |
|
54 res@gsnSpreadColors = True ; use full colormap |
|
55 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals |
|
56 res@cnMinLevelValF = 0. ; Min level |
|
57 res@cnMaxLevelValF = 10. ; Max level |
|
58 res@cnLevelSpacingF = 1. ; interval |
|
59 pres = True ; panel plot mods desired |
|
60 pres@gsnMaximize = True ; fill the page |
|
61 |
|
62 plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed |
|
63 gsn_panel(wks,plot,(/1,1/),pres) ; create panel plot |
|
64 system("convert xy.ps xy.png") |
|
65 end |