Cast the proper pair and enfore NetCDF4 file format if possible (even for NetCDF3 C++ interface)
This commit is contained in:
parent
4c9b2ef96b
commit
126ec18317
@ -77,7 +77,7 @@ namespace CosmoTool
|
|||||||
if (i == attributes.end())
|
if (i == attributes.end())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return reinterpret_cast<T *>(i->first);
|
return reinterpret_cast<T *>(i->second.first);
|
||||||
}
|
}
|
||||||
|
|
||||||
void new_attribute(const std::string& n, void *p, FreeFunction free_func)
|
void new_attribute(const std::string& n, void *p, FreeFunction free_func)
|
||||||
|
@ -151,7 +151,7 @@ namespace CosmoTool {
|
|||||||
ProgressiveOutput<T>::saveArrayProgressive(const std::string& fname, uint32_t *dimList,
|
ProgressiveOutput<T>::saveArrayProgressive(const std::string& fname, uint32_t *dimList,
|
||||||
uint32_t rank)
|
uint32_t rank)
|
||||||
{
|
{
|
||||||
NcFile *f = new NcFile(fname.c_str(), NcFile::Replace);
|
NcFile *f = new NcFile(fname.c_str(), NcFile::Replace, 0, 0, NcFile::Netcdf4);
|
||||||
|
|
||||||
assert(f->is_valid());
|
assert(f->is_valid());
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ namespace CosmoTool {
|
|||||||
void saveArray(const std::string& fname,
|
void saveArray(const std::string& fname,
|
||||||
T *array, uint32_t *dimList, uint32_t rank)
|
T *array, uint32_t *dimList, uint32_t rank)
|
||||||
{
|
{
|
||||||
NcFile f(fname.c_str(), NcFile::Replace);
|
NcFile f(fname.c_str(), NcFile::Replace, 0, 0, NcFile::Netcdf4);
|
||||||
|
|
||||||
assert(f.is_valid());
|
assert(f.is_valid());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user