bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
Utilities used to help in the return of an OPeNDAP DataDDS object as a netcdf file. More...
#include <FONcUtils.h>
Static Public Member Functions | |
static FONcBaseType * | convert (libdap::BaseType *v, const string &version, const bool classic_model) |
static FONcBaseType * | convert (libdap::BaseType *v, const string &version, const bool classic_model, map< string, int > &, vector< int > &) |
static string | gen_name (const vector< string > &embed, const string &name, string &original) |
generate a new name for the embedded variable | |
static nc_type | get_nc_type (libdap::BaseType *element, bool isNC4_ENHANCED) |
translate the OPeNDAP data type to a netcdf data type | |
static void | handle_error (int stax, const string &err, const string &file, int line) |
handle any netcdf errors | |
static string | id2netcdf (string in) |
convert the provided string to a netcdf allowed identifier. | |
static void | reset () |
Resets the FONc transformation for a new input and out file. | |
Static Public Attributes | |
static string | name_prefix = "" |
If a variable name, dimension name, or attribute name begins with a character that is not supported by netcdf, then use this prefix to prepend to the name. | |
Utilities used to help in the return of an OPeNDAP DataDDS object as a netcdf file.
This class includes static functions to help with the conversion of an OPeNDAP DataDDS object into a netcdf file.
Definition at line 58 of file FONcUtils.h.
|
static |
generate a new name for the embedded variable
This function takes the name of a variable as it exists in a data file, and generates a new name given that netcdf does not have structures or grids. Variables within structures and grids are considered embedded variables, so a new name needs to be generated.
The new name is then passed top id2netcdf to remove any characters that are not allowed by netcdf.
embed | A list of names for parent structures |
name | The name of the variable to use for the new name |
original | The variable name before calling id2netcdf |
Definition at line 182 of file FONcUtils.cc.
|
static |
translate the OPeNDAP data type to a netcdf data type
element | The OPeNDAP element to translate |
IsNC4_ENHANCED | the flag to indicate the output is in netCDF enhanced model |
Definition at line 115 of file FONcUtils.cc.
handle any netcdf errors
Looks up the netcdf error message associated with the provided netcdf return value and throws an exception with that information appended to the provided error message.
stax | A netcdf return value. Should be any value other than NC_NOERR |
err | A provided error message to begin the error message with |
file | The source code file name where the error was generated |
line | The source code line number where the error was generated |
BESError | if the return value represents a netcdf error |
Definition at line 429 of file FONcUtils.cc.
convert the provided string to a netcdf allowed identifier.
The function makes a copy of the incoming parameter to use and returns the new string.
in | identifier to convert |
Definition at line 87 of file FONcUtils.cc.
|
static |
Resets the FONc transformation for a new input and out file.
Definition at line 70 of file FONcUtils.cc.
|
static |
If a variable name, dimension name, or attribute name begins with a character that is not supported by netcdf, then use this prefix to prepend to the name.
Definition at line 60 of file FONcUtils.h.