- 积分
- 108
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2023-12-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请问一下大家为啥会报这个错啊
Cannot convert from 'kelvin ** 2' ([temperature] ** 2) to 'degree_Celsius' ([temperature])
好像是说单位K和℃不匹配,但我没有单位是K的量啊,有人知道为啥吗
t_clim=f_t.air.loc[f_t.time.dt.month.isin([6,7,8])].loc['1981':'2010'].loc[:,1000:300,55:15,70:140]
#print(t_clim) #(90,8,17,29) ℃
rh_clim=f_rh.rhum.loc[f_rh.time.dt.month.isin([6,7,8])].loc['1981':'2010'].loc[:,:,55:15,70:140]
#print(rh_clim) #%
time=rh_clim.time
lat=rh_clim.lat
lon = rh_clim.lon
lev = rh_clim.level #1e+03 925.0 850.0 700.0 600.0 500.0 400.0 300.0
t_clim=np.array(t_clim)*units.degC
rh_clim=np.array(rh_clim)* units.percent
t_clim_mean=np.mean(t_clim,0)*units.degC
# 露点温度
td_clim=np.zeros((90,8,17,29))#*units.degree_Celsius
for i in range(90):
for j in range(8):
td_clim[i,j,:,:]= mpcalc.dewpoint_from_relative_humidity(t_clim[i,j,:,:], rh_clim[i,j,:,:])
print(td_clim)
td_clim=np.mean(td_clim,0)*units.degree_Celsius
#print(td_clim) #(8,17,29)
k_clim= np.zeros((17,29))*units.degree_Celsius
k_clim[:,:]=(t_clim_mean[2,:,:]-t_clim_mean[5,:,:])+td_clim[2,:,:]-(t_clim_mean[3,:,:]-td_clim[3,:,:])
print(k_clim)
|
|