Parallel-NetCDF / PnetCDF

Source code repository of PnetCDF library and utilities
https://parallel-netcdf.github.io
Other
80 stars 22 forks source link

truncate file size after ncmpi_del_att #99

Closed wkliao closed 1 year ago

wkliao commented 1 year ago

When a file contains no variables and an existing attribute is deleted, the file size can be larger than the header size. This PR truncates the file size to the header size.

In addition, ncvalidator should treats such an unmatched file size as a warning, rather than an error, because the file is still a valid netCDF file.