How to delete a variable in a Scientific.IO.NetCDF.NetCDFFile?

ぐ巨炮叔叔 提交于 2019-12-04 10:26:37

The simple answer is that you can not delete a variable. This is a "feature" of the NetCDF C-API and is not a shortcoming of Scientific.IO.NetCDF or any of the other python netcdf modules.

From the official NetCDF user guide: Attributes are more dynamic than variables or dimensions; they can be deleted and have their type, length, and values changed after they are created, whereas the netCDF interface provides no way to delete a variable or to change its type or shape.

The problem can be solved indirectly, by copying everything except the offending variable to a new NetCDF file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!