- 积分
- 164
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-3-10
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2022-4-23 11:40:50
|
显示全部楼层
他返回的是(12,1),脚本如下,大佬能帮忙看看吗,感谢
begin
f1= addfile("/cygdrive/d/lunwen/O3_1980_2016_merra2_instM_3d_asm_Np.nc4","r")
o3 = f1->O3(:,:,:,:)
o31 = dim_avg_n_Wrap(o3(:,{100:150},:,:), 1)
o31 = o31*1.0e+6
dim = dimsizes(o31)
ny = dim(0)/12
var = onedtond(ndtooned(o31), (/ny,12,dim(1),dim(2)/))
copy_VarCoords(o31(0,:,:), var(0,0,:,:))
o3m= dtrend_leftdim(var, False)
f= addfile("/cygdrive/d/lunwen/sst.mnmean.v5.nc","r")
yyyymm = cd_calendar( f->time, -1)
ymstrt = 198001
ymlast = 201612
istrt = ind(yyyymm.eq.ymstrt)
ilast = ind(yyyymm.eq.ymlast)
temp = f->sst
sst = temp(istrt:ilast,{:},{:})
dim2= dimsizes(sst)
ny1= dim2(0)/12
sst1= onedtond(ndtooned(sst), (/ny1,12,dim2(1),dim2(2)/))
copy_VarCoords(sst(0,:,:), sst1(0,0,:,:))
sst2=sst1(:,:,{0:60},{100:280})
sstnew= dtrend_leftdim(sst2, False)
sst3=dim_avg_n_Wrap(sst2(:,:,{30:40},{150:180}),(/2,3/))
o2=dim_avg_n_Wrap(o3m(:,:,{65:90},{-180:180}),(/2,3/))
sst3!0="time"
sst3!1="month"
o2!0="time"
o2!1="month"
sst4=sst3(month|:,time|:)
o4=o2(month|:,time|:)
ccr=esccr(o4,sst4,0)
printVarSummary(ccr)
这是输出结果
Variable: ccr
Type: float
Total Size: 48 bytes
12 values
Number of Dimensions: 2
Dimensions and sizes: [12] x [1]
Coordinates:
Number Of Attributes: 1
_FillValue : 1e+15
fatal:ScalarFieldInitialize: Insufficient number of elements in sfDataArray
fatal:Unable to initialize layer-Can't Create
fatal:Unable to access object with id:-4
fatal:Unable to access object with id:-4
warning:Unable to add DataItem "(null)" to DataList "cnScalarFieldData"
fatal:CompileDataList:DataList has no valid members
|
|