16 |
|
|
17 |
#include "DataConstant.h" |
#include "DataConstant.h" |
18 |
#include "DataException.h" |
#include "DataException.h" |
19 |
|
#ifdef USE_NETCDF |
20 |
#include <netcdfcpp.h> |
#include <netcdfcpp.h> |
21 |
|
#endif |
22 |
|
|
23 |
using namespace std; |
using namespace std; |
24 |
|
|
559 |
void |
void |
560 |
DataTagged::dump(const std::string fileName) const |
DataTagged::dump(const std::string fileName) const |
561 |
{ |
{ |
562 |
|
#ifdef PASO_MPI |
563 |
|
throw DataException("Error - DataTagged:: dump is not implemented for MPI yet.") |
564 |
|
#endif |
565 |
|
#ifdef USE_NETCDF |
566 |
const int ldims=DataArrayView::maxRank+1; |
const int ldims=DataArrayView::maxRank+1; |
567 |
const NcDim* ncdims[ldims]; |
const NcDim* ncdims[ldims]; |
568 |
NcVar *var, *tags_var; |
NcVar *var, *tags_var; |
641 |
free(tags); |
free(tags); |
642 |
throw DataException("Error - DataTagged:: copy data to netCDF buffer failed."); |
throw DataException("Error - DataTagged:: copy data to netCDF buffer failed."); |
643 |
} |
} |
644 |
|
#else |
645 |
|
throw DataException("Error - DataTagged:: dump is not configured with netCDF. Please contact your installation manager."); |
646 |
|
#endif |
647 |
} |
} |
|
|
|
|
|
|
648 |
} // end of namespace |
} // end of namespace |