import pandas as pd
import numpy as np
# 从xlsx文件读取数据
df = pd.read_excel('cal_DISOdata.xlsx')
indicators = df.values
[m, n] = indicators.shape
# 计算diso值
indicators_1 = np.zeros((m, n))
for i in range(m):
for j in range(n):
if (indicators[i, j] >= -1) and (indicators[i, j] <= 1):
indicators_1[i, j] = indicators[i, j]
else:
indicators_1[i, j] = indicators[i, j] / (np.max(indicators[:, j]) - np.min(indicators[:, j]))
nors = indicators_1
dis = np.zeros((m, n))
for i in range(m):
for j in range(n):
if j == 0:
dis[i, j] = 0 + (nors[i, j] - nors[0, j]) ** 2
else:
dis[i, j] = dis[i, j - 1] + (nors[i, j] - nors[0, j]) ** 2
DISO = np.sqrt(dis)
# 输出结果到xlsx文件
df = pd.DataFrame(DISO)
# 将结果保存到test2_output.xlsx文件中
df.to_excel('diso_output.xlsx', sheet_name='Sheet1', index=False)参考以下三篇论文
1.Hu, Z., Chen, D., Chen, X., Zhou, Q., Peng, Y., Li, J., Sang, Y., 2022, CCHZ-DISO: A Timely New Assessment System for data quality or model performance from Da Dao Zhi Jian, Geophysical Research Letters, 49, e2022GL100681.
原文链接:https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2022GL100681
2.Zhou, Q., Chen, D., Hu, Z*., Chen, X*, 2021, Decompositions of Taylor diagram and DISO performance criteria, International Journal of Climatology, 41 (12), 5726-5732. ESI 高被引。
原文链接:https://rmets.onlinelibrary.wiley.com/action/doSearch?AllField=Decompositions+of+Taylor+diagram+and+DISO+performance+criteria&SeriesKey=10970088
3.Hu, Z., Chen, X., Zhou, Q., Chen, D., Li, J., 2019, DISO: A rethink of Taylor diagram, International Journal of Climatology, 39, 2825-2832
原文链接:https://rmets.onlinelibrary.wiley.com/action/doSearch?AllField=DISO%3A+A+rethink+of+Taylor+diagram&SeriesKey=10970088
END
声明:欢迎转载、转发。气象学家公众号转载信息旨在传播交流,其内容由作者负责,不代表本号观点。文中部分图片来源于网络,如涉及内容、版权和其他问题,请联系小编处理。