add auto-close destructor
using best principles of object-oriented programming, add a auto-closing file destructor, such that when netcdf_file leaves procedure scope, the file data is flushed and the file is closed.
using best principles of object-oriented programming, add a auto-closing file destructor, such that when netcdf_file leaves procedure scope, the file data is flushed and the file is closed.