34 using std::ostringstream;
39 #include "FONcUtils.h"
41 int FONcDim::DimNameNum = 0;
50 _name(name), _size(size), _dimid(0), _defined(false), _ref(1)
64 if (!_ref)
delete this;
83 ostringstream dimname_strm;
84 dimname_strm <<
"dim" << FONcDim::DimNameNum + 1;
85 FONcDim::DimNameNum++;
86 _name = dimname_strm.str();
91 int stax = nc_def_dim(ncid, _name.c_str(), _size, &_dimid);
92 if (stax != NC_NOERR) {
93 string err = (string)
"fileout.netcdf - " +
"Failed to add dimension " + _name;
108 strm << BESIndent::LMarg <<
"FONcDim::dump - (" << (
void *)
this <<
")" << endl;
110 strm << BESIndent::LMarg <<
"name = " << _name << endl;
111 strm << BESIndent::LMarg <<
"size = " << _size << endl;
112 strm << BESIndent::LMarg <<
"dimid = " << _dimid << endl;
113 strm << BESIndent::LMarg <<
"already defined? ";
119 BESIndent::UnIndent();