- 积分
- 9356
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-7-3
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2021-7-22 16:02:13
|
显示全部楼层
好的,路径是改过来了,但是报错了
File "grd2nc.py", line 3, in <module>
open_CtlDataset('/mnt/e/Study/Data_assimilation/paper/model2data/DATA_back45/nature/t30.ctl').to_netcdf('output.nc')
File "/home/changmh/anaconda3/lib/python3.8/site-packages/xarray/core/dataset.py", line 1799, in to_netcdf
return to_netcdf(
File "/home/changmh/anaconda3/lib/python3.8/site-packages/xarray/backends/api.py", line 1029, in to_netcdf
_validate_attrs(dataset, invalid_netcdf=invalid_netcdf and engine == "h5netcdf")
File "/home/changmh/anaconda3/lib/python3.8/site-packages/xarray/backends/api.py", line 171, in _validate_attrs
check_attr(k, v, valid_types)
File "/home/changmh/anaconda3/lib/python3.8/site-packages/xarray/backends/api.py", line 163, in check_attr
raise TypeError(
TypeError: Invalid value for attr 'pdef': None. For serialization to netCDF files, its value must be of one of the following types: str, Number, ndarray, number, list, tuple
|
|