author | Forrest Hoffman <forrest@climatemodeling.org> |
Mon, 26 Jan 2009 22:08:20 -0500 | |
changeset 0 | 0c6405ab2ff4 |
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 |
;************************************************ |
forrest@0 | 7 |
begin |
forrest@0 | 8 |
;************************************************ |
forrest@0 | 9 |
; read data |
forrest@0 | 10 |
;************************************************ |
forrest@0 | 11 |
grid = "1x1" |
forrest@0 | 12 |
; grid = "T31" |
forrest@0 | 13 |
; grid = "T42" |
forrest@0 | 14 |
; grid = "1.9" |
forrest@0 | 15 |
|
forrest@0 | 16 |
diri = "/fis/cgd/cseg/people/jeff/clamp_data/observed/biomass/" |
forrest@0 | 17 |
fili = "amazon_mask_"+ grid + ".nc" |
forrest@0 | 18 |
f = addfile (diri+fili,"r") |
forrest@0 | 19 |
|
forrest@0 | 20 |
y = f->mask_amazon |
forrest@0 | 21 |
|
forrest@0 | 22 |
printVarSummary(y) |
forrest@0 | 23 |
|
forrest@0 | 24 |
;************************************************ |
forrest@0 | 25 |
; create default plot |
forrest@0 | 26 |
;************************************************ |
forrest@0 | 27 |
|
forrest@0 | 28 |
wks = gsn_open_wks("ps","mask_"+grid) ; open a ps file |
forrest@0 | 29 |
gsn_define_colormap(wks,"gui_default") ; choose colormap |
forrest@0 | 30 |
|
forrest@0 | 31 |
res = True ; Use plot options |
forrest@0 | 32 |
res@cnFillOn = True ; Turn on color fill |
forrest@0 | 33 |
res@gsnSpreadColors = True ; use full colormap |
forrest@0 | 34 |
; res@cnFillMode = "RasterFill" ; Turn on raster color |
forrest@0 | 35 |
; res@lbLabelAutoStride = True |
forrest@0 | 36 |
res@cnLinesOn = False ; Turn off contourn lines |
forrest@0 | 37 |
res@mpFillOn = False ; Turn off map fill |
forrest@0 | 38 |
res@gsnAddCyclic = False |
forrest@0 | 39 |
res@tiMainString = "Amazon Mask: grid = "+ grid |
forrest@0 | 40 |
|
forrest@0 | 41 |
res@mpMinLatF = -21.1 ; range to zoom in on |
forrest@0 | 42 |
res@mpMaxLatF = 13.8 |
forrest@0 | 43 |
res@mpMinLonF = 277.28 |
forrest@0 | 44 |
res@mpMaxLonF = 326.43 |
forrest@0 | 45 |
|
forrest@0 | 46 |
res@gsnSpreadColors = True ; use full colormap |
forrest@0 | 47 |
res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals |
forrest@0 | 48 |
; res@cnMinLevelValF = 1. ; Min level |
forrest@0 | 49 |
; res@cnMaxLevelValF = 11. ; Max level |
forrest@0 | 50 |
; res@cnLevelSpacingF = 1. ; interval |
forrest@0 | 51 |
res@cnMinLevelValF = 0. ; Min level |
forrest@0 | 52 |
res@cnMaxLevelValF = 1. ; Max level |
forrest@0 | 53 |
res@cnLevelSpacingF = 0.1 ; interval |
forrest@0 | 54 |
|
forrest@0 | 55 |
; pres = True ; panel plot mods desired |
forrest@0 | 56 |
; pres@gsnMaximize = True ; fill the page |
forrest@0 | 57 |
|
forrest@0 | 58 |
plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed |
forrest@0 | 59 |
; gsn_panel(wks,plot,(/1,1/),pres) ; create panel plot |
forrest@0 | 60 |
; system("convert xy.ps xy.png") |
forrest@0 | 61 |
end |