From 126ec183179e728725aea7ba1b2183168cf9ae89 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 24 Nov 2012 17:45:19 -0500 Subject: [PATCH] Cast the proper pair and enfore NetCDF4 file format if possible (even for NetCDF3 C++ interface) --- src/loadSimu.hpp | 2 +- src/yorick_nc3.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/loadSimu.hpp b/src/loadSimu.hpp index 8e4c507..7a72259 100644 --- a/src/loadSimu.hpp +++ b/src/loadSimu.hpp @@ -77,7 +77,7 @@ namespace CosmoTool if (i == attributes.end()) return 0; - return reinterpret_cast(i->first); + return reinterpret_cast(i->second.first); } void new_attribute(const std::string& n, void *p, FreeFunction free_func) diff --git a/src/yorick_nc3.cpp b/src/yorick_nc3.cpp index d760009..92d55b6 100644 --- a/src/yorick_nc3.cpp +++ b/src/yorick_nc3.cpp @@ -151,7 +151,7 @@ namespace CosmoTool { ProgressiveOutput::saveArrayProgressive(const std::string& fname, uint32_t *dimList, 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()); @@ -202,7 +202,7 @@ namespace CosmoTool { void saveArray(const std::string& fname, 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());