- 积分
- 9585
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-4-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 aa22556688 于 2014-12-12 12:50 编辑
同学传来脚本,在她的大型机上运行没有问题,但是传给我,放到大型机上运行就出现了如图1的那样的错误,我只改了路径。提示是100行有问题,但是我的脚本100行是end命令,有没有了解怎么回事,求大神指点,非常感谢!!!
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
fi1 = "/cvfs01/disk1/wangq316/zhangchao/data/drought/dry_days.txt"
fi2 = "/cvfs01/disk1/wangq316/zhangchao/data/drought/dry_light.txt"
fi3 = "/cvfs01/disk1/wangq316/zhangchao/data/drought/dry_mid.txt"
fi4 = "/cvfs01/disk1/wangq316/zhangchao/data/drought/dry_strong.txt"
print(22)
nrow1 = numAsciiRow(fi1)
ncol1 = numAsciiCol(fi1)
nrow2 = numAsciiRow(fi2)
ncol2 = numAsciiCol(fi2)
nrow3 = numAsciiRow(fi3)
ncol3 = numAsciiCol(fi3)
nrow4 = numAsciiRow(fi4)
ncol4 = numAsciiCol(fi4)
data1 = asciiread(fi1,(/nrow1,ncol1/),"float")
data2 = asciiread(fi2,(/nrow2,ncol2/),"float")
data3 = asciiread(fi3,(/nrow3,ncol3/),"float")
data4 = asciiread(fi4,(/nrow4,ncol4/),"float")
printVarSummary(data1)
y1 = new((/2,nrow1/),float)
y1(0,:)=data1(:,1)
y1(1,:)=data1(:,2)
x=ispan(1974,2012,1)
x2=data2(:,0)
x3=data3(:,0)
x4=data4(:,0)
y2 = new((/2,nrow2/),float)
;y2@_FillValue=999
printVarSummary(y2)
y2(0,:)=data2(:,1)
y2(1,:)=data2(:,2)
y3 = new((/2,nrow3/),float)
;y3@_FillValue=999
y3(0,:)=data3(:,1)
y3(1,:)=data3(:,2)
y4 = new((/2,nrow4/),float)
;y4@_FillValue=999
y4(0,:)=data4(:,1)
y4(1,:)=data4(:,2)
wks = gsn_open_wks("pdf","../picture/"+get_script_prefix_name())
res = True
res@gsnMaximize = False
res@gsnDraw = False
res@gsnFrame = False ; Don't advance the frame
res@vpWidthF = 0.8 ; Change the aspect ratio, but
res@vpHeightF = 0.5 ; make plot as large as possible
;res@tiMainString = "The ridge of WPSH" ; add title
;res@tmYLMode ="Explicit"
;res@tmYLValues = ispan(1974,2012,1)
;res@tmYLLabels = (/"1974","1978","1982","18N","19N","20N","21N","22N",\
; "23N","24N","25N","26N","27N","28N","29N","30N","31N","32N","33N"/)
;***************** resources for "left" variable
resL = True
resL = res
resL@xyLineThicknesses = 2. ; thicker line
resL@trYMaxF = 250. ; axis max
resL@trYMinF = 0. ; axis min
resL@tiXAxisFont ="times-roman"
resL@tiYAxisFont ="times-roman"
resL@tmXBMode = "Explicit"
resL@tmXBValues = ispan(1974,2012,2)
resL@tmXBLabels = (/"1974","","1978","","1982","","1986","","1990","","1994","","1998","","2002","","2006","","2010",""/)
resL@tmXBLabelFont ="times-roman"
resL@tmYLLabelFont ="times-roman"
resL@xyLineColors = (/"blue","red"/) ; line color
resL@txFont = "times-roman"
;******************* resources for "right" variable
resR = True
resR =res
resR@xyDashPatterns = 1 ; dashed line for 2nd
resR@xyLineThicknesses = 2 ; thicker line
resR@gsnRightString ="~S~o~N~C" ;
resR@gsnLeftString = "days"
resR@trYMaxF = 1.5 ; axis max
resR@trYMinF = -0.5 ; axis min
resR@xyLineColors = "red" ; line color
resR@txFont = "times-roman"
resR@tmXBLabelFont = "times-roman"
resR@tmYLLabelFont = "times-roman"
resR@tiXAxisFont = "times-roman"
resR@tiYAxisFont = "times-roman"
plot=new(4,graphic)
plot(0) = gsn_csm_xy2(wks,x,y1(0,:),y1(1,:),resL,resR)
resL@trYMaxF = 140. ; axis max
y2@_FillValue = 999
y3@_FillValue = 999
y4@_FillValue = 999
printMinMax(y2(1,:),True)
resL@gsnLeftString = "days"
plot(1) = gsn_csm_xy(wks,x2,y2,resL)
resL@trYMaxF = 80. ; axis max
plot(2) = gsn_csm_xy(wks,x3,y3,resL)
resL@trYMaxF = 70. ; axis max
plot(3) = gsn_csm_xy(wks,x4,y4,resL)
gsn_panel(wks,plot(:),(/2,2/),False)
end
|
-
-
|