Export NC files. More...
#include <WriteNC.hpp>
Classes | |
class | AttData |
class | VarData |
Public Member Functions | |
WriteNC (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~WriteNC () |
Destructor. More... | |
ErrorCode | write_file (const char *file_name, const bool overwrite, const FileOptions &opts, const EntityHandle *output_list, const int num_sets, const std::vector< std::string > &qa_list, const Tag *tag_list=NULL, int num_tags=0, int export_dimension=3) |
Writes out a file. More... | |
Public Member Functions inherited from moab::WriterIface | |
virtual | ~WriterIface () |
Static Public Member Functions | |
static WriterIface * | factory (Interface *) |
Factory method. More... | |
Private Types | |
enum | EntityLocation { ENTLOCVERT = 0 , ENTLOCNSEDGE , ENTLOCEWEDGE , ENTLOCFACE , ENTLOCSET , ENTLOCEDGE , ENTLOCREGION } |
ENTLOCNSEDGE for north/south edge ENTLOCWEEDGE for west/east edge. More... | |
Private Member Functions | |
ErrorCode | parse_options (const FileOptions &opts, std::vector< std::string > &var_names, std::vector< std::string > &desired_names, std::vector< int > &tstep_nums, std::vector< double > &tstep_vals) |
ErrorCode | process_conventional_tags (EntityHandle fileSet) |
ErrorCode | process_concatenated_attribute (const void *attPtr, int attSz, std::vector< int > &attLen, std::map< std::string, AttData > &attributes) |
Private Attributes | |
std::vector< std::string > | dimNames |
This info will be reconstructed from metadata stored on conventional fileSet tags Dimension names. More... | |
std::vector< int > | dimLens |
Dimension lengths. More... | |
std::set< std::string > | usedCoordinates |
Will collect used dimensions (coordinate variables) More... | |
std::set< std::string > | dummyVarNames |
Dummy variables (for dimensions that have no corresponding coordinate variables) More... | |
std::map< std::string, AttData > | globalAtts |
Global attribs. More... | |
std::map< std::string, VarData > | varInfo |
Variable info. More... | |
Interface * | mbImpl |
Interface instance. More... | |
WriteUtilIface * | mWriteIface |
const char * | fileName |
File var. More... | |
int | fileId |
File numbers assigned by (p)netcdf. More... | |
DebugOutput | dbgOut |
Debug stuff. More... | |
bool | noMesh |
Write options. More... | |
bool | noVars |
bool | append |
Tag | mGlobalIdTag |
Cached tags for writing. This will be important for ordering the data, in parallel. More... | |
bool | isParallel |
Are we writing in parallel? (probably in the future) More... | |
std::string | grid_type |
CAM Euler, etc,. More... | |
NCWriteHelper * | myHelper |
Helper class instance. More... | |
Friends | |
class | NCWriteHelper |
class | ScdNCWriteHelper |
class | UcdNCWriteHelper |
class | NCWriteEuler |
class | NCWriteFV |
class | NCWriteHOMME |
class | NCWriteMPAS |
class | NCWriteGCRM |
Export NC files.
Definition at line 70 of file WriteNC.hpp.
|
private |
ENTLOCNSEDGE for north/south edge ENTLOCWEEDGE for west/east edge.
Enumerator | |
---|---|
ENTLOCVERT | |
ENTLOCNSEDGE | |
ENTLOCEWEDGE | |
ENTLOCFACE | |
ENTLOCSET | |
ENTLOCEDGE | |
ENTLOCREGION |
Definition at line 105 of file WriteNC.hpp.
moab::WriteNC::WriteNC | ( | Interface * | impl = NULL | ) |
Constructor.
Definition at line 32 of file WriteNC.cpp.
References mWriteIface, and moab::Interface::query_interface().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 43 of file WriteNC.cpp.
References mbImpl, mWriteIface, myHelper, and moab::Interface::release_interface().
|
static |
Factory method.
Definition at line 27 of file WriteNC.cpp.
References iface, and WriteNC().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 140 of file WriteNC.cpp.
References append, dbgOut, ErrorCode, moab::FileOptions::get_int_option(), moab::FileOptions::get_ints_option(), moab::FileOptions::get_null_option(), moab::ParallelComm::get_pcomm(), moab::FileOptions::get_reals_option(), moab::FileOptions::get_strs_option(), moab::DebugOutput::get_verbosity(), isParallel, moab::FileOptions::match_option(), MB_ENTITY_NOT_FOUND, MB_SET_ERR, MB_SUCCESS, MB_TYPE_OUT_OF_RANGE, MB_UNSUPPORTED_OPERATION, mbImpl, noMesh, noVars, moab::DebugOutput::set_prefix(), moab::DebugOutput::set_rank(), and moab::DebugOutput::set_verbosity().
Referenced by write_file().
|
private |
Definition at line 455 of file WriteNC.cpp.
References moab::WriteNC::AttData::attDataType, moab::WriteNC::AttData::attLen, moab::WriteNC::AttData::attValue, dbgOut, MB_SET_ERR, MB_SUCCESS, and moab::DebugOutput::tprintf().
Referenced by process_conventional_tags().
|
private |
Definition at line 244 of file WriteNC.cpp.
References dbgOut, dimLens, dimNames, dummyVarNames, moab::WriteNC::VarData::entLoc, ErrorCode, globalAtts, grid_type, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TAG_VARLEN, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mbImpl, moab::WriteNC::VarData::numAtts, process_concatenated_attribute(), moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_get_length(), moab::Interface::tag_get_name(), moab::DebugOutput::tprintf(), moab::WriteNC::VarData::varAtts, moab::WriteNC::VarData::varDims, varInfo, and moab::WriteNC::VarData::varName.
Referenced by write_file().
|
virtual |
Writes out a file.
Implements moab::WriterIface.
Definition at line 50 of file WriteNC.cpp.
References append, moab::NCWriteHelper::collect_mesh_info(), moab::NCWriteHelper::collect_variable_data(), dbgOut, ErrorCode, fileId, fileName, moab::NCWriteHelper::get_nc_helper(), moab::Interface::globalId_tag(), moab::NCWriteHelper::init_file(), isParallel, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, mGlobalIdTag, myHelper, NCFUNC, parse_options(), process_conventional_tags(), moab::DebugOutput::tprintf(), and moab::NCWriteHelper::write_values().
|
friend |
Definition at line 75 of file WriteNC.hpp.
|
friend |
Definition at line 76 of file WriteNC.hpp.
|
friend |
Definition at line 79 of file WriteNC.hpp.
|
friend |
Definition at line 72 of file WriteNC.hpp.
|
friend |
Definition at line 77 of file WriteNC.hpp.
|
friend |
Definition at line 78 of file WriteNC.hpp.
|
friend |
Definition at line 73 of file WriteNC.hpp.
|
friend |
Definition at line 74 of file WriteNC.hpp.
|
private |
Definition at line 202 of file WriteNC.hpp.
Referenced by parse_options(), and write_file().
|
private |
Debug stuff.
Definition at line 193 of file WriteNC.hpp.
Referenced by moab::NCWriteHelper::collect_variable_data(), moab::NCWriteHelper::init_file(), parse_options(), process_concatenated_attribute(), process_conventional_tags(), and write_file().
|
private |
Dimension lengths.
Definition at line 152 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteHelper::collect_variable_data(), moab::NCWriteMPAS::collect_variable_data(), and process_conventional_tags().
|
private |
This info will be reconstructed from metadata stored on conventional fileSet tags Dimension names.
Definition at line 149 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteHelper::collect_variable_data(), moab::NCWriteMPAS::collect_variable_data(), moab::NCWriteHelper::init_file(), and process_conventional_tags().
|
private |
Dummy variables (for dimensions that have no corresponding coordinate variables)
Definition at line 158 of file WriteNC.hpp.
Referenced by moab::NCWriteHelper::collect_variable_data(), moab::NCWriteHelper::init_file(), process_conventional_tags(), and moab::NCWriteHelper::write_values().
|
private |
File numbers assigned by (p)netcdf.
Definition at line 190 of file WriteNC.hpp.
Referenced by write_file().
|
private |
|
private |
Global attribs.
Definition at line 161 of file WriteNC.hpp.
Referenced by moab::NCWriteHelper::init_file(), and process_conventional_tags().
|
private |
CAM Euler, etc,.
Definition at line 211 of file WriteNC.hpp.
Referenced by moab::NCWriteHelper::get_nc_helper(), and process_conventional_tags().
|
private |
Are we writing in parallel? (probably in the future)
Definition at line 208 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), parse_options(), write_file(), and moab::NCWriteHelper::write_set_variables().
|
private |
Interface instance.
Definition at line 183 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::NCWriteHelper::collect_variable_data(), parse_options(), process_conventional_tags(), write_file(), moab::NCWriteGCRM::write_nonset_variables(), moab::ScdNCWriteHelper::write_nonset_variables(), moab::NCWriteHOMME::write_nonset_variables(), moab::NCWriteMPAS::write_nonset_variables(), and ~WriteNC().
|
private |
Cached tags for writing. This will be important for ordering the data, in parallel.
Definition at line 205 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), and write_file().
|
private |
Definition at line 184 of file WriteNC.hpp.
Referenced by WriteNC(), and ~WriteNC().
|
private |
Helper class instance.
Definition at line 214 of file WriteNC.hpp.
Referenced by write_file(), and ~WriteNC().
|
private |
|
private |
Definition at line 201 of file WriteNC.hpp.
Referenced by parse_options().
|
private |
Will collect used dimensions (coordinate variables)
Definition at line 155 of file WriteNC.hpp.
Referenced by moab::NCWriteHelper::collect_variable_data(), moab::NCWriteHelper::init_file(), and moab::NCWriteHelper::write_values().
|
private |
Variable info.
Definition at line 164 of file WriteNC.hpp.
Referenced by moab::NCWriteGCRM::collect_variable_data(), moab::NCWriteHelper::collect_variable_data(), moab::ScdNCWriteHelper::collect_variable_data(), moab::NCWriteHOMME::collect_variable_data(), moab::NCWriteMPAS::collect_variable_data(), moab::NCWriteHelper::init_file(), process_conventional_tags(), and moab::NCWriteHelper::write_values().