例如,我有一个数组:
ncdf1['level'].loc['2017':'2017']
<xarray.DataArray 'level' (time: 246)>
array([302.52 , 302.42 , 302.3 , ..., 310.07 , 310.74 , 309.723])
Coordinates:
* time (time) datetime64[ns] 2017-01-01 2017-01-02 ... 2017-12-21
但当我尝试绘制它时,我会得到额外的一个月(如果尝试了多年,则为一年):
ncdat['level'].loc['2017':'2017'].plot(color='#1f78b4')
我怎样才能从1月到12月自动生成绘图
ncdat
<xarray.Dataset>
Dimensions: (time: 4680)
Coordinates:
* time (time) datetime64[ns] 2005-01-01 2005-01-02 ... 2019-05-09
Data variables:
level (time) float64 307.7 307.4 307.2 307.0 ... 300.4 301.3 303.2 303.0
storage (time) float64 0.02 0.02 0.02 0.02 0.02 ... 0.001 0.001 0.007 0.006
我不明白这个问题
什么是ncdat?它是什么数据类型
你能添加一个ncdat的屏幕截图吗
xarray的屏幕截图
相关问题 更多 >
编程相关推荐