The simple answer is that you cannot delete a variable. This is a "feature" of the NetCDF C-API and is not a disadvantage of Scientific.IO.NetCDF or any other python netcdf module.
From the official NetCDF User Guide: Attributes are more dynamic than variables or sizes; they can be deleted and their type, length and values ββchanged after they are created, while the netCDF interface does not allow you to delete a variable or change its type or shape.
The problem can be solved indirectly by copying everything except the offensive variable into a new NetCDF file.
source share