author | Forrest Hoffman <forrest@climatemodeling.org> |
Thu, 26 Mar 2009 14:02:21 -0400 | |
changeset 1 | 4be95183fbcd |
permissions | -rw-r--r-- |
forrest@0 | 1 |
;************************************************* |
forrest@0 | 2 |
; ce_1.ncl |
forrest@0 | 3 |
;************************************************ |
forrest@0 | 4 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" |
forrest@0 | 5 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" |
forrest@0 | 6 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" |
forrest@0 | 7 |
;************************************************ |
forrest@0 | 8 |
begin |
forrest@0 | 9 |
|
forrest@0 | 10 |
; read data |
forrest@0 | 11 |
|
forrest@0 | 12 |
diri = "/fis/cgd/cseg/people/jeff/clamp_data/model/" |
forrest@0 | 13 |
fili = "class_pft_T42.nc" |
forrest@0 | 14 |
fili = "class_pft_1.9.nc" |
forrest@0 | 15 |
f = addfile(diri+fili,"r") |
forrest@0 | 16 |
|
forrest@0 | 17 |
x = f->CLASS_PFT |
forrest@0 | 18 |
printVarSummary(x) |
forrest@0 | 19 |
|
forrest@0 | 20 |
;************************************************ |
forrest@0 | 21 |
; create default plot |
forrest@0 | 22 |
;************************************************ |
forrest@0 | 23 |
|
forrest@0 | 24 |
wks = gsn_open_wks("ps","class") ; open a ps file |
forrest@0 | 25 |
gsn_define_colormap(wks,"gui_default") ; choose colormap |
forrest@0 | 26 |
|
forrest@0 | 27 |
res = True ; Use plot options |
forrest@0 | 28 |
res@cnFillOn = True ; Turn on color fill |
forrest@0 | 29 |
res@gsnSpreadColors = True ; use full colormap |
forrest@0 | 30 |
res@cnLinesOn = False ; Turn off contourn lines |
forrest@0 | 31 |
res@mpFillOn = False ; Turn off map fill |
forrest@0 | 32 |
res@tiMainString = "Class" |
forrest@0 | 33 |
|
forrest@0 | 34 |
res@gsnSpreadColors = True ; use full colormap |
forrest@0 | 35 |
res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals |
forrest@0 | 36 |
res@cnMinLevelValF = 0. ; Min level |
forrest@0 | 37 |
res@cnMaxLevelValF = 16. ; Max level |
forrest@0 | 38 |
res@cnLevelSpacingF = 1. ; interval |
forrest@0 | 39 |
|
forrest@0 | 40 |
plot = gsn_csm_contour_map_ce(wks,x,res) |
forrest@0 | 41 |
|
forrest@0 | 42 |
end |