Closed ernestum closed 6 years ago
This is odd, it should be available. What happens when you try to open a file, and specify NC_SHARE?
It is just plain not possible. If you have a look at the open
method of ncFile where the nc_open/nc_create of the underlying c library is called, you see, that there is no way for me to control flags directly. I can only indirectly make it use one of NC_WRITE
, NC_NOWRITE
, NC_NETCDF4 | NC_NOCLOBBER
, NC_NETCDF4 | NC_CLOBBER
based on the file mode that I provide. This is by the way the only place in the library, that nc_create/nc_open are called. That means the is not other detour I could take to get the NC_SHARE flag in.
Updated ncFile.cpp to add a constructor that will take any/all flags from netcdf.h. Got a test in the pipeline now, will close this out once it's merged.
The NC_SHARE flag can not be accessed from this c++ library. Is there any particular reason for this? You can read more about the NC_SHARE flage here.