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 ;************************************************
8 ;************************************************
10 ;************************************************
11 diri = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
12 fili = "b30.061m_401_425_ANN_climo.nc"
14 g = addfile(diri+fili,"r")
20 ; get the co2 at the lowest level
23 ; change to unit of observed (u mol/mol)
24 ; Model_units [=] kgCO2 / kgDryAir
25 ; 28.966 = molecular weight of dry air
26 ; 44. = molecular weight of CO2
29 factor = (28.966/44.) * 1e6
33 y0@units = "u mol/mol"
34 ; y0 = where(y0 .lt. 287.,y0@_FillValue,y0)
35 print (min(y0)+"/"+max(y0))
37 ;************************************************
39 ;************************************************
41 wks = gsn_open_wks("ps","xy") ; open a ps file
42 gsn_define_colormap(wks,"gui_default") ; choose colormap
44 res = True ; Use plot options
45 res@cnFillOn = True ; Turn on color fill
46 res@gsnSpreadColors = True ; use full colormap
47 ; res@cnFillMode = "RasterFill" ; Turn on raster color
48 ; res@lbLabelAutoStride = True
49 res@cnLinesOn = False ; Turn off contourn lines
50 res@mpFillOn = False ; Turn off map fill
51 res@tiMainString = "Model b30.061m 401-425"
53 res@gsnSpreadColors = True ; use full colormap
54 res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals
55 res@cnMinLevelValF = 286. ; Min level
56 res@cnMaxLevelValF = 310. ; Max level
57 res@cnLevelSpacingF = 2. ; interval
59 plot = gsn_csm_contour_map_ce(wks,y0,res) ; for model
60 system("convert xy.ps xy.png")