如何在python中使用xarray增加气候数据集?
输入: 输出: (64800,72)(7264800)(64800,0)数组([],形状=(64800,0),数据类型=浮点64)坐标:* 时间(时间)日期时间64[ns]*空间(空间)多索引如何在python中使用xarray增加气候数据集?,python,matrix-multiplication,python-xarray,code-climate,Python,Matrix Multiplication,Python Xarray,Code Climate,输入: 输出: (64800,72)(7264800)(64800,0)数组([],形状=(64800,0),数据类型=浮点64)坐标:* 时间(时间)日期时间64[ns]*空间(空间)多索引 纬度(空间)浮动64-90.0-90.0-90.0-90.0。。。89.089.089.089.0 经度(空间)浮动64 0.0 1.0 2.0 3.0 4.0。。。356.0 357.0 358.0 359.0(‘空间’、‘时间’) 最初,Xt矩阵的大小为6480072,Y为7264800。这两个矩
- 纬度(空间)浮动64-90.0-90.0-90.0-90.0。。。89.089.089.089.0
- 经度(空间)浮动64 0.0 1.0 2.0 3.0 4.0。。。356.0 357.0 358.0 359.0(‘空间’、‘时间’)
Cxy=(Xt@Y)/(72)
tws = ds1.lwe_thickness
print(tws.size)
print(tws.shape)
# tws
# vectorization
stacked1 = tws.stack(space =("latitude", "longitude")) #
stacked
print(stacked1.shape)
# standardization
Y = (stacked1-stacked1.mean())/(stacked1.std())
print(Y)
print(Y.shape)
print(Xt.shape) # precipitation dataset
print(Y.shape) # total water storage dataset
# co-variance between precipitation and total water storage
Cxy = (Xt*Y)/(72)
print(Cxy.shape)
print(Cxy)
print(Cxy.dims)