- 积分
- 71
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-11-15
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我在大型机上处理十年的小时数据时,想把数据转换成日数据,所以用calculate_daily_values函数,选取十年处理的话会报错,但是只选30天就不会报错,希望各位能帮我看看是哪里的问题
报错信息如下:fatal:Subscript out of range, error in subscript #0
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 18296 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 18 in file hr_to_daily.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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
f1 = addfile("~/data/sfo3_AERhr_UKESM1-0-LL_historical_r1i1p1f2_gn_195001010030-195912302330.nc", "r")
new_cdf = "1950.nc"
nni=37
nnj=33
nnv=3600
sfo3_0 = f1->sfo3(:,85:117,37:73)
printVarSummary(sfo3_0)
opt = True
opt@nval_crit = 24
sfo3_1 = calculate_daily_values(sfo3_0, "avg", 0, opt)
cdf = addfile(new_cdf, "c")
print("Creating new init file....")
; define dimensions
dimNames = (/"lon","lat","time"/)
dimSizes = (/nni, nnj, nnv/)
dimUnlim = (/False,False,False/)
filedimdef(cdf,dimNames,dimSizes,dimUnlim)
; write variables
cdf->sfo3=sfo3_1
end
|
|