17 |
|
|
18 |
#include <iostream> |
#include <iostream> |
19 |
#include <boost/python/extract.hpp> |
#include <boost/python/extract.hpp> |
20 |
|
#ifdef USE_NETCDF |
21 |
#include <netcdfcpp.h> |
#include <netcdfcpp.h> |
22 |
|
#endif |
23 |
|
|
24 |
using namespace std; |
using namespace std; |
25 |
|
|
272 |
#ifdef PASO_MPI |
#ifdef PASO_MPI |
273 |
throw DataException("Error - DataConstant:: dump is not implemented for MPI yet.") |
throw DataException("Error - DataConstant:: dump is not implemented for MPI yet.") |
274 |
#endif |
#endif |
275 |
|
#ifdef USE_NETCDF |
276 |
const NcDim* ncdims[DataArrayView::maxRank]; |
const NcDim* ncdims[DataArrayView::maxRank]; |
277 |
NcVar* var; |
NcVar* var; |
278 |
int rank = getPointDataView().getRank(); |
int rank = getPointDataView().getRank(); |
325 |
throw DataException("Error - DataConstant:: appending variable to netCDF file failed."); |
throw DataException("Error - DataConstant:: appending variable to netCDF file failed."); |
326 |
if (! (var->put(&m_data[0],dims)) ) |
if (! (var->put(&m_data[0],dims)) ) |
327 |
throw DataException("Error - DataConstant:: copy data to netCDF buffer failed."); |
throw DataException("Error - DataConstant:: copy data to netCDF buffer failed."); |
328 |
|
#else |
329 |
|
throw DataException("Error - DataConstant:: dump is not configured with netCDF. Please contact your installation manager."); |
330 |
|
#endif |
331 |
} |
} |
332 |
|
|
333 |
} // end of namespace |
} // end of namespace |