- 积分
- 1316
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-12-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
参照官网上wavelet的例子计算单站30年降水时间序列的小波谱,数据是单站1988-2017的30年年降水,运行时提示:Segmentation fault (核心已转储)。网上搜了可能原因是内存不够,故使用ulimit -s ulimit修改了内存命令,再次尝试运行,还是提示Segmentation fault (核心已转储)。我再次将数据改为距平来计算(原以为可能是数据过大,计算过程产生的数组内存超边界),但是任然是提示Segmentation fault (核心已转储)。并且在路径下面找不到core文件,只能在Administrator下面找到stackdum文件,内容为:Exception: STATUS_STACK_OVERFLOW at eip=01785E0Beax=000881FC ebx=089BBFD8 ecx=085C2F0C edx=23549E70 esi=260D76B0 edi=0000001F
ebp=00000011 esp=089BBF00 program=E:\Cygwin\usr\local\bin\ncl.exe, pid 2788, thread unknown (0x1AF8)
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
请教大家,有没有遇到这种情况,如有,请问该如何解决。非常谢谢!
附1程序:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
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
data = asciiread("/cygdrive/h/57014-30a.txt", (/30,2/), "float");30行两列,第一列为年份,第二列为扩大10倍年降水
time = data(:,0)
data1 = data(:,1)
data1 = data1 * 0.1
N = dimsizes(time)
print(data1(10)) ;监控运行是否正常
ave1 = 0.0
do i = 0, 29
ave1 = ave1 + data1(i)
end do
ave1=ave1/30.0
print(ave1) ;监控运行是否正常
data1 = data1-ave1
data1 = floattointeger(data1)
;data1 = dtrend(data1, False)
;print(data1) ;监控运行是否正常
mother = 0
param = 6.0
dt = 1
s0 = dt
dj = 0.25
jtot = 1 + floattointeger(((log10(N * dt/s0))/dj)/log10(2.))
print(jtot)
npad = N
nadof = 0
noise = 1
siglvl = 0.1
isigtest = 1
w = wavelet(data1, mother, dt, param, s0, dj, jtot, npad, noise, isigtest, siglvl, nadof)
printVarSummary(w)
print(1)
power = onedtond(w@power, (/jtot,N/))
power!0 = "period"
power&period = w@period
power!1 = "time"
power&time = time
power@long_name = "power spectrum"
power@units = "units^2"
SIG = power
SIG = power/conform(power, w@signif, 0)
SIG@long_name = "significance"
SIG@units = " "
wks = gsn_open_wks("x11", "wave")
plot = new(2, graphic)
res = True
res@gsnFrame = False
res@gsnDraw = False
res@cnFillOn = True
res@cnFillPalette = "BlAqGrYeOrReVi200"
res@cnFillMode = "RasterFill"
res@cnRasterSmoothingOn = True
res@cnLinesOn = True
res@lbOrientation = "Vertical"
res@trYReverse = True
res@tmLabelAutoStride = True
res@vpHeightF = .4
res@vpWidthF =.85
res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF = 0.0
res@cnMaxLevelValF = 20.0
res@cnLevelSpacingF =2.0
res@gsnLeftString = "Wavelet power"
plot(0) = gsn_csm_contour(wks, power, res)
draw(plot(0))
res@cnMinLevelValF =1.0
res@cnMaxLevelValF =4.0
res@cnLevelSpacingF =3.0
res@gsnLeftString = "Wavelet significance"
plot(1) = gsn_csm_contour(wks, SIG, res)
draw(plot(1))
resp = True
resp@gsnPanelMainString = "Wave analy"
resp@gsnPanelYWhiteSpacePercent = 2
gsn_panel(wks, plots, (/2,1/), resp)
end
附2数据:
1988 6264
1989 5044
1990 6492
1991 3923
1992 5677
1993 5720
1994 3743
1995 4383
1996 3247
1997 4123
1998 4823
1999 4478
2000 5474
2001 4366
2002 4083
2003 7682
2004 3747
2005 6157
2006 5471
2007 5948
2008 4559
2009 4271
2010 4019
2011 5953
2012 5101
2013 7173
2014 4571
2015 4032
2016 4603
2017 6605
|
|