- 积分
- 32410
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-11
- 最后登录
- 1970-1-1
|
NCL
系统平台: |
|
问题截图: |
- |
问题概况: |
我想画pannel图,对应控制实验,敏感试验,差值。一共3个时刻,总共9张图在一个图中。差值的单独用一个色标。 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
运行结果报错
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: edust
Type: float
Total Size: 604800 bytes
151200 values
Number of Dimensions: 4
Dimensions and sizes: [3] x [1] x [180] x [280]
Coordinates:
fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 926 in file /nuist/p/public/app/ncl/6.3.0/pgi/13.3-0/lib/ncarg/nclscripts/csm/gsn_csm.ncl
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 1551 in file /nuist/p/public/app/ncl/6.3.0/pgi/13.3-0/lib/ncarg/nclscripts/csm/gsn_csm.ncl
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 6944 in file /nuist/p/public/app/ncl/6.3.0/pgi/13.3-0/lib/ncarg/nclscripts/csm/gsn_csm.ncl
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 67 in file panneledust.ncl
脚本如下http://met.sysu.edu.cn/GloCli/Te ... cations/panel.shtml第15个例子
;***************************************
begin
files = systemfunc("ls -1 ./wrfout_d02*")
f=addfiles(files,"r")
edust = wrf_user_getvar(f,"EDUST1",-1)+wrf_user_getvar(f,"EDUST2",-1)+wrf_user_getvar(f,"EDUST3",-1)+wrf_user_getvar(f,"EDUST4",-1)+wrf_user_getvar(f,"EDUST5",-1)
printVarSummary(edust)
edust@lat2d = wrf_user_getvar(f,"XLAT",-1) ; latitude/longitude
edust@lon2d = wrf_user_getvar(f,"XLONG",-1) ; required for plotting
filesno = systemfunc("ls -1 ./no/wrfout_d02*")
a=addfiles(filesno,"r")
edustno = wrf_user_getvar(a,"EDUST1",-1)+wrf_user_getvar(a,"EDUST2",-1)+wrf_user_getvar(a,"EDUST3",-1)+wrf_user_getvar(a,"EDUST4",-1)+wrf_user_getvar(a,"EDUST5",-1)
edustno@lat2d = wrf_user_getvar(a,"XLAT",-1) ; latitude/longitude
edustno@lon2d = wrf_user_getvar(a,"XLONG",-1) ; required for plotting
edustd = edust-edustno
edustd@lat2d = wrf_user_getvar(f,"XLAT",-1) ; latitude/longitude
edustd@lon2d = wrf_user_getvar(f,"XLONG",-1) ; required for plotting
;***************************************
; create first two individual plots
;***************************************
wks = gsn_open_wks("png","paneledust111") ; send graphics to PNG file
plot = new(3,graphic)
plotno = new(3,graphic)
res = True ; plot mods desired
res@cnFillOn = True ; turn on color
res@cnLinesOn = False ; turn off contour lines
res@cnFillPalette = "MPL_YlOrBr" ; set color map
res@lbLabelBarOn = False ; turn off individual label bars
res@gsnDraw = False ; don't draw yet
res@gsnFrame = False ; don't advance frame yet
res@gsnAddCyclic = False ; data already has cyclic point
res@mpMinLatF = min(edust@lat2d)
res@mpMaxLatF = max(edust@lat2d)
res@mpMinLonF = min(edust@lon2d)
res@mpMaxLonF = max(edust@lon2d)
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes"
res@mpOutlineOn = True
res@mpOutlineSpecifiers = (/"China:states"/)
res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
;res@cnLevelSelectionMode = "ManualLevels"; manual set levels so lb consistent
;res@cnMinLevelValF = 0 ; min level
;res@cnMaxLevelValF = 28 ; max level
;res@cnLevelSpacingF = 2 ; contour interval
;res@mpLandFillColor = "white" ; make land white
res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res@cnLevels = (/10,50,100,200,500,1000,2000,5000,10000/)
res@gsnCenterString = "ec-smois"
plot(0) = gsn_csm_contour_map_ce(wks,edust(0,0,:,:),res)
plot(1) = gsn_csm_contour_map_ce(wks,edust(1,0,:,:),res)
plot(2) = gsn_csm_contour_map_ce(wks,edust(2,0,:,:),res)
;***************************************
; panel first two plots
;***************************************
pres1 = True
pres1@gsnPanelLabelBar = True ; common label bar
pres1@gsnFrame = False ; don't advance frame yet
pres1@lbOrientation = "vertical" ; vertical label bar
; we use PanelBottom to tell the plot to only draw in the top part of the page.
; since there are two plots here, and we have limited the plot to the upper
; 0.6 of the page, each plot will have a size 0.3.
pres1@gsnPanelBottom = 0.3 ; move bottom up from 0.0 to 0.4
gsn_panel(wks,plot,(/1,3/),pres1)
;***************************************
res@gsnCenterString = "ec-no"
plotno(0) = gsn_csm_contour_map_ce(wks,edustno(0,0,:,:),res)
plotno(1) = gsn_csm_contour_map_ce(wks,edustno(1,0,:,:),res)
plotno(2) = gsn_csm_contour_map_ce(wks,edustno(2,0,:,:),res)
pres1@gsnPanelBottom = 0.5 ; move bottom up from 0.0 to 0.4
gsn_panel(wks,plotno,(/1,3/),pres1)
; create third individual plots
;***************************************
res@cnFillPalette = "CBR_coldhot" ; set color map
res@cnMinLevelValF = 0 ; min level
res@cnMaxLevelValF = 200 ; max level
res@cnLevelSpacingF = 20 ; contour interval
res@gsnCenterString = "difference"
plot2 = new(3,graphic)
plot2(0) = gsn_csm_contour_map_ce(wks,edustd(0,0,:,:),res)
plot2(1) = gsn_csm_contour_map_ce(wks,edustd(1,0,:,:),res)
plot2(2) = gsn_csm_contour_map_ce(wks,edustd(2,0,:,:),res)
;***************************************
; create panel of just third plot to keep aspect ratio
; the same as the panel above
;***************************************
pres2 = True
pres2@gsnPanelLabelBar = True ; common label bar
pres2@gsnPanelTop = 0.3 ; draw up to the bdry of upper plot
pres2@gsnPanelBottom = 0.1 ; move bottom up so size is 0.3
pres2@gsnFrame = False ; don't advance frame yet
pres2@lbOrientation = "vertical" ; vertical label bar
gsn_panel(wks,plot2,(/1,3/),pres2)
; now advance frame for all plots
frame(wks)
end
|
|