50 _b =
dynamic_cast<Byte *
>(b) ;
53 string s = (string)
"File out netcdf, FONcByte was passed a "
54 +
"variable that is not a DAP Byte" ;
85 FONcAttributes::add_attributes( ncid,
_varid, _b ) ;
106 size_t var_index[] = {0} ;
107 unsigned char *data =
new unsigned char ;
108 _b->buf2val( (
void**)&data ) ;
109 int stax = nc_put_var1_uchar( ncid,
_varid, var_index, data ) ;
110 if( stax != NC_NOERR )
112 string err = (string)
"fileout.netcdf - "
113 +
"Failed to write byte data for "
150 << (
void *)
this <<
")" << endl ;
exception thrown if inernal error encountered
FONcByte(BaseType *b)
Constructor for FONcByte that takes a DAP Byte.
virtual void write(int ncid)
Write the byte out to the netcdf file.
virtual void define(int ncid)
Define the variable in the netcdf file.
static void add_original_name(int ncid, int varid, const string &var_name, const string &orig)
Adds an attribute for the variable if the variable name had to be modified in any way...
virtual nc_type type()
returns the netcdf type of the DAP Byte
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
virtual string name()
returns the name of the DAP Byte
virtual ~FONcByte()
Destructor that cleans up the byte.
static ostream & LMarg(ostream &strm)
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 Byte in the netcdf file
A DAP BaseType with file out netcdf information included.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream