bes
Updated for version 3.20.6
|
32 #include <BESInternalError.h>
36 #include "FONcUtils.h"
37 #include "FONcAttributes.h"
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" ;
87 _varname, _orig_varname ) ;
105 BESDEBUG(
"fonc",
"FOncByte::write for var " << _varname << endl ) ;
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 "
149 strm << BESIndent::LMarg <<
"FONcByte::dump - ("
150 << (
void *)
this <<
")" << endl ;
151 BESIndent::Indent() ;
152 strm << BESIndent::LMarg <<
"name = " << _b->name() << endl ;
153 BESIndent::UnIndent() ;
virtual void define(int ncid)
Define the variable in the netcdf file.
static void handle_error(int stax, const string &err, const string &file, int line)
handle any netcdf errors
virtual string name()
returns the name of the DAP Byte
virtual nc_type type()
returns the netcdf type of the DAP Byte
static void add_variable_attributes(int ncid, int varid, BaseType *b)
Add the attributes for an OPeNDAP variable to the netcdf file.
exception thrown if internal error encountered
virtual ~FONcByte()
Destructor that cleans up the byte.
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.
A DAP BaseType with file out netcdf information included.
virtual void define(int ncid)
define the DAP Byte in the netcdf file
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
FONcByte(BaseType *b)
Constructor for FONcByte that takes a DAP Byte.
virtual void write(int ncid)
Write the byte out to the netcdf file.