52 Int16 *i16 =
dynamic_cast<Int16 *
>(b) ;
53 UInt16 *u16 =
dynamic_cast<UInt16 *
>(b) ;
56 string s = (string)
"File out netcdf, FONcShort was passed a "
57 +
"variable that is not a DAP Int16 or UInt16" ;
88 FONcAttributes::add_attributes( ncid,
_varid, _bt ) ;
109 size_t var_index[] = {0} ;
110 short *data =
new short ;
111 _bt->buf2val( (
void**)&data ) ;
112 int stax = nc_put_var1_short( ncid,
_varid, var_index, data ) ;
113 if( stax != NC_NOERR )
115 string err = (string)
"fileout.netcdf - "
116 +
"Failed to write short data for "
154 << (
void *)
this <<
")" << endl ;
virtual void define(int ncid)
define the DAP Int16 or UInt16 in the netcdf file
exception thrown if inernal error encountered
virtual nc_type type()
returns the netcdf type of the DAP object
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 string name()
returns the name of the DAP Int16 or UInt16
static ostream & LMarg(ostream &strm)
static void handle_error(int stax, string &err, const string &file, int line)
handle any netcdf errors
A DAP BaseType with file out netcdf information included.
FONcShort(BaseType *b)
Constructor for FOncShort that takes a DAP Int16 or UInt16.
virtual ~FONcShort()
Destructor that cleans up the short.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
virtual void write(int ncid)
Write the short out to the netcdf file.
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes