34 using std::ostringstream ;
50 : _name( name ), _size( size ), _dimid( 0 ), _defined( false ), _ref( 1 )
65 if( !_ref )
delete this ;
87 ostringstream dimname_strm ;
89 FONcDim::DimNameNum++ ;
90 _name = dimname_strm.str() ;
96 int stax = nc_def_dim( ncid, _name.c_str(), _size, &_dimid ) ;
97 if( stax != NC_NOERR )
99 string err = (string)
"fileout.netcdf - "
100 +
"Failed to add dimension " + _name ;
117 << (
void *)
this <<
")" << endl ;
virtual void decref()
Decrement the reference count for this dimension.
static ostream & LMarg(ostream &strm)
FONcDim(const string &name, int size)
Constructor for FOncDim that defines the dimension of an array.
static void handle_error(int stax, string &err, const string &file, int line)
handle any netcdf errors
virtual void define(int ncid)
define the DAP dimension in the netcdf file
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
static string id2netcdf(string in)
convert the provided string to a netcdf allowed identifier.