bes
Updated for version 3.20.6
|
36 #include "FONcUtils.h"
40 #include "FONcShort.h"
42 #include "FONcFloat.h"
43 #include "FONcDouble.h"
44 #include "FONcStructure.h"
46 #include "FONcArray.h"
47 #include "FONcSequence.h"
49 #include <BESInternalError.h>
61 FONcArray::Dimensions.clear();
63 FONcDim::DimNameNum = 0;
78 string allowed =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+_.@";
81 string first =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
83 string::size_type i = 0;
85 while ((i = in.find_first_not_of(allowed, i)) != string::npos) {
86 in.replace(i, 1,
"_");
90 if (first.find(in[0]) == string::npos) {
104 nc_type x_type = NC_NAT;
106 string var_type = element->type_name();
107 if (var_type ==
"Byte")
109 else if (var_type ==
"String")
111 else if (var_type ==
"Int16")
118 else if (var_type ==
"UInt16")
120 else if (var_type ==
"Int32")
122 else if (var_type ==
"UInt32")
124 else if (var_type ==
"Float32")
126 else if (var_type ==
"Float64")
151 vector<string>::const_iterator i = embed.begin();
152 vector<string>::const_iterator e = embed.end();
154 for (; i != e; i++) {
158 new_name += FONC_EMBEDDED_SEPARATOR + (*i);
164 new_name += FONC_EMBEDDED_SEPARATOR + name;
213 case dods_structure_c:
216 case dods_sequence_c:
220 string err = (string)
"file out netcdf, unable to " +
"write unknown variable type";
247 assert(stax != NC_NOERR);
A class representing the DAP Byte class for file out netcdf.
static string id2netcdf(string in)
convert the provided string to a netcdf allowed identifier.
A DAP Array with file out netcdf information included.
static string gen_name(const vector< string > &embed, const string &name, string &original)
generate a new name for the embedded variable
static void handle_error(int stax, const string &err, const string &file, int line)
handle any netcdf errors
static nc_type get_nc_type(BaseType *element)
translate the OPeNDAP data type to a netcdf data type
A DAP Sequence with file out netcdf information included.
static vector< FONcMap * > Maps
global list of maps that could be shared amongst the different grids
static void reset()
Resets the FONc transformation for a new input and out file.
A class representing the DAP Str class for file out netcdf.
A DAP Int32 and UInt32 with file out netcdf information included.
A DAP Structure with file out netcdf information included.
exception thrown if internal error encountered
static FONcBaseType * convert(BaseType *v)
Creates a FONc object for the given DAP object.
A DAP BaseType with file out netcdf information included.
A DAP Grid with file out netcdf information included.
A DAP Int16 and UInt16 with file out netcdf information included.
A DAP Float64 with file out netcdf information included.
A DAP Float32 with file out netcdf information included.
static string name_prefix
If a variable name, dimension name, or attribute name begins with a character that is not supported b...