- 积分
- 2472
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-2
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-10-30 15:42:09
|
显示全部楼层
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
files1 = systemfunc ("ls /gzy/R1850.*.nc")
f1 = addfiles(files1,"r")
a = f1[:]->LWCF
b = dim_avg_n_Wrap(a,0)
c = f1[:]->SWCF
d = dim_avg_n_Wrap(c,0)
files2 = systemfunc ("ls /gzy/Ref.*.nc")
f2 = addfiles(files2,"r")
e = f2[:]->LWCF
f = dim_avg_n_Wrap(e,0)
g = f2[:]->SWCF
h = dim_avg_n_Wrap(g,0)
LW=f
LW=f-b
SW=f
SW=h-d
plot = new(2,graphic)
wks = gsn_open_wks("pdf","/gzy/CRE/CRE20001850")
gsn_define_colormap(wks,"BlWhRe")
res1 = True
res1@mpFillOn = True ; turn map fill off
res1@mpOutlineOn = True ; turn the map outline on
res1@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res1@cnLevels = (/-10,-8,-6,-4,-2,0,2,4,6,8,10/) ; set levels
res1@cnFillOn = True ; turn on color fill
res1@cnLinesOn = False ; turn off the contour lines
res1@cnLineLabelsOn = False ; turn the line labels off
res1@gsnDraw = False ; don't draw
res1@gsnFrame = False ; don't advance frame
res1@cnInfoLabelOn = False ; turn off cn info label
res1@tiMainString = "annual mean LWCRE in CAM5 2000-1850"
res1@lbLabelBarOn = False
res1@gsnRightString= "W/m2"
res2 = True
res2@mpFillOn = True ; turn map fill off
res2@mpOutlineOn = True ; turn the map outline on
res2@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res2@cnLevels = (/-10,-8,-6,-4,-2,0,2,4,6,8,10/) ; set levels
res2@cnFillOn = True ; turn on color fill
res2@cnLinesOn = False ; turn off the contour lines
res2@cnLineLabelsOn = False ; turn the line labels off
res2@gsnDraw = False ; don't draw
res2@gsnFrame = False ; don't advance frame
res2@cnInfoLabelOn = False ; turn off cn info label
res2@tiMainString = "annual mean SWCRE in CAM5 2000-1850"
res2@lbLabelBarOn = False
res2@gsnRightString= "W/m2"
plot(0) = gsn_csm_contour_map(wks,LW,res1)
plot(1) = gsn_csm_contour_map(wks,SW,res2)
resP = True ; modify the panel plot
resP@gsnPanelLabelBar = False ; add common colorbar
resP@lbLabelFontHeightF = 0.007
gsn_panel(wks,plot(0:1),(/2,1/),resP) ; now draw as one plot
end |
|