Closing netCDF file in assignment 7

Closing netCDF file in assignment 7

by Matthew Gerry -
Number of replies: 1

In the example in lecture, we defined a pointer to an NcFile object. Then, when we were done with it, the only way to close the file was to delete this pointer.

The situation in the assignment differs as we don't use a pointer, we just declare the NcFile object itself. I get trouble when I try to "delete" this, and when I try to delete the address (i.e. putting an ampersand in front of the NcFile variable name).

Is there some other way we should close the netCDF files for this assignment? Thanks.