我的 MSc 论文代码有一些问题。我正在关注https://github.com/ErikaWarnatzsch/Malawi-Future-Climate-Modelling-Assessment/edit/master/Histogram_TasMAX.py模型,以便能够在使用历史记录的同时为未来的 RCP 场景(4.5 和 8.5)构建直方图和观测数据。我正在查看的区域位于哥伦比亚中部地带。(env) C:\Users\issaa\Desktop\190720>python testewhistogram_tasmax.pyC:\Users\issaa\Anaconda3\envs\env\lib\site-packages\iris\fileformats\cf.py:1038: UserWarning: Ignoring variable 'rotated_pole' referenced by variable 'tasmax': Dimensions ('time', 'string1') do not span ('time', 'rlat', 'rlon') warnings.warn(msg)C:\Users\issaa\Anaconda3\envs\env\lib\site-packages\iris\fileformats\cf.py:1038: UserWarning: Ignoring variable 'rotated_pole' referenced by variable 'tasmax': Dimensions ('time', 'string1') do not span ('time', 'rlat', 'rlon') warnings.warn(msg)C:\Users\issaa\Anaconda3\envs\env\lib\site-packages\iris\fileformats\cf.py:1038: UserWarning: Ignoring variable 'rotated_pole' referenced by variable 'tasmax': Dimensions ('time', 'string1') do not span ('time', 'rlat', 'rlon') warnings.warn(msg)Traceback (most recent call last): File "testewhistogram_tasmax.py", line 161, in <module> main() File "testewhistogram_tasmax.py", line 77, in main CRU - iris.load_cube(CRU, 'near-surface temperature maximum')TypeError: unsupported operand type(s) for -: 'str' and 'Cube'我在 Internet 上看到一些关于它是 Python 2/Python 3 键入错误的信息——但是我仍然有点困惑从这里去哪里。非常感谢您的帮助:)
1 回答
RISEBY
TA贡献1856条经验 获得超5个赞
我认为这只是一个错字!
CRU - iris.load_cube(CRU, 'near-surface temperature maximum')
该行在应该有“=”的地方有一个“-”。
类型错误中的“-”我看的时候并没有真正为我注册,但那一行显然不是你想做的!
添加回答
举报
0/150
提交
取消