- 积分
- 3314
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-7-29
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
将Panel图和panel图中的每个小图比较发现 panel图使用的色标是第一幅图的 根本没有用统一共同的色标啊 有控制使用同一个色标的命令啊
我的程序是
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
cs1 =new((/10,49,80,80/),float)
cs2 =new((/10,49,80,80/),float)
cs3 =new((/10,49,80,80/),float)
cs4 =new((/10,49,80,80/),float)
cs5 =new((/10,49,80,80/),float)
do xuhao = 1,10
a = addfile("/gpfshome/zhanglei2/yuanguanghui/jieguo/meigai/wrfout_d03_"+xuhao+".nc","r")
b = addfile("/gpfshome/zhanglei2/yuanguanghui/jieguo/+25/wrfout_d03_"+xuhao+".nc","r")
c = addfile("/gpfshome/zhanglei2/yuanguanghui/jieguo/+50/wrfout_d03_"+xuhao+".nc","r")
d = addfile("/gpfshome/zhanglei2/yuanguanghui/jieguo/-25/wrfout_d03_"+xuhao+".nc","r")
e = addfile("/gpfshome/zhanglei2/yuanguanghui/jieguo/-50/wrfout_d03_"+xuhao+".nc","r")
sh1 = wrf_user_getvar(a,"LH",-1)
cs1(xuhao-1,:,:,:)=sh1(:,:,:)
sh2 = wrf_user_getvar(b,"LH",-1)
cs2(xuhao-1,:,:,:)=sh2(:,:,:)
sh3 = wrf_user_getvar(c,"LH",-1)
cs3(xuhao-1,:,:,:)=sh3(:,:,:)
sh4 = wrf_user_getvar(d,"LH",-1)
cs4(xuhao-1,:,:,:)=sh4(:,:,:)
sh5 = wrf_user_getvar(e,"LH",-1)
cs5(xuhao-1,:,:,:)=sh5(:,:,:)
end do
x1=dim_avg_n(cs1,0)
x2=dim_avg_n(cs2,0)
x3=dim_avg_n(cs3,0)
x4=dim_avg_n(cs4,0)
x5=dim_avg_n(cs5,0)
; type = "x11"
type = "png"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"latent heat flux")
gsn_define_colormap(wks,"Redblue") ; overwrite the .hluresfile color map
; Set some basic resources
res = True
res@NoHeaderFooter = True ; Switch headers and footers off
res@cnFillOn = True
res@lbLabelBarOn = False
pltres = True
pltres@PanelPlot = True ; Indicate these plots are to be paneled.
pltres@CommonTitle = True
mpres = True
mpres@tmXBLabelFontHeightF = 0.02
mpres@tmYLLabelFontHeightF = 0.02
mpres@vpWidthF = 0.8 ; set width and height
mpres@vpHeightF = 0.3
mpres@vpXF = 0.1
mpres@vpYF = 0.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
times = wrf_user_getvar(a,"times",-1)
ntimes = dimsizes(times)
do it=17,41,1
print("Working on time: " + times(it))
res@TimeLabel = times(it)
plots = new ( 5, graphic )
contour = wrf_contour(a,wks,x1(it,:,:),res)
pltres@PlotTitle = "CTL"
plots(0) = wrf_map_overlays(a,wks,contour,pltres,mpres)
delete(contour)
contour = wrf_contour(b,wks,x2(it,:,:),res)
pltres@PlotTitle = "Wet25"
plots(1) = wrf_map_overlays(b,wks,contour,pltres,mpres)
delete(contour)
;**********************************************************************
contour = wrf_contour(c,wks,x3(it,:,:),res)
pltres@PlotTitle = "Wet50"
plots(2) = wrf_map_overlays(c,wks,contour,pltres,mpres)
delete(contour)
;**********************************************************************
contour = wrf_contour(d,wks,x4(it,:,:),res)
pltres@PlotTitle = "Dry25"
plots(3) = wrf_map_overlays(d,wks,contour,pltres,mpres)
delete(contour)
;**********************************************************************
contour = wrf_contour(e,wks,x5(it,:,:),res)
pltres@PlotTitle = "Dry50"
pltres@gsnLeftStringFontHeightF = 0.05
plots(4) = wrf_map_overlays(e,wks,contour,pltres,mpres)
delete(contour)
;**********************************************************************
; Panel the WRF plots.
pnlres = True
pnlres@txString = sh1@description + " (" + sh1@units + ")"
; pnlres@gsnPanelYWhiteSpacePercent = 13 ; Add white space b/w plots.
pnlres@gsnPanelLabelBar = True ; Turn on common labelbar
pnlres@lbLabelAutoStride = True ; Spacing of lbar labels.
pnlres@lbBoxMinorExtentF = 0.13
pnlres@gsnMaximize = True
pnlres@gsnPanelBottom = 0.05
pnlres@gsnPanelFigureStrings= (/"a)","b)","c)","d)","e)"/)
pnlres@amJust = "TopLeft"
pnlres@gsnPanelYWhiteSpacePercent = 5
pnlres@gsnPanelXWhiteSpacePercent = 5
gsn_panel(wks,plots,(/2,3/),pnlres)
end do
end
|
-
panel图
-
panel中的第三幅图
|