bes
Updated for version 3.20.6
|
32 #include <BESInternalError.h>
36 #include "FONcFloat.h"
37 #include "FONcUtils.h"
38 #include "FONcAttributes.h"
51 _f =
dynamic_cast<Float32 *
>(b) ;
54 string s = (string)
"File out netcdf, FONcFloat was passed a "
55 +
"variable that is not a DAP Float32" ;
88 _varname, _orig_varname ) ;
106 BESDEBUG(
"fonc",
"FONcFloat::write for var " << _varname << endl ) ;
107 size_t var_index[] = {0} ;
108 float *data =
new float ;
109 _f->buf2val( (
void**)&data ) ;
110 int stax = nc_put_var1_float( ncid, _varid, var_index, data ) ;
111 ncopts = NC_VERBOSE ;
112 if( stax != NC_NOERR )
114 string err = (string)
"fileout.netcdf - "
115 +
"Failed to write float data for "
120 BESDEBUG(
"fonc",
"FONcFloat::done write for var " << _varname << endl ) ;
152 strm << BESIndent::LMarg <<
"FONcFloat::dump - ("
153 << (
void *)
this <<
")" << endl ;
154 BESIndent::Indent() ;
155 strm << BESIndent::LMarg <<
"name = " << _f->name() << endl ;
156 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
FONcFloat(BaseType *b)
Constructor for FONcFloat that takes a DAP Float32.
virtual void write(int ncid)
Write the float out to the netcdf file.
static void add_variable_attributes(int ncid, int varid, BaseType *b)
Add the attributes for an OPeNDAP variable to the netcdf file.
virtual ~FONcFloat()
Destructor that cleans up this instance.
virtual void define(int ncid)
define the DAP Float32 in the netcdf file
exception thrown if internal error encountered
virtual nc_type type()
returns the netcdf type of the DAP Float32
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 string name()
returns the name of the DAP Float32
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes