#include <NCWriteDomain.hpp>
Inheritance diagram for moab::NCWriteDomain:
Collaboration diagram for moab::NCWriteDomain:Public Member Functions | |
| NCWriteDomain (WriteNC *writeNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
| virtual | ~NCWriteDomain () override |
| ErrorCode | collect_mesh_info () override |
| Collect necessary info about local mesh (implemented in child classes) More... | |
| ErrorCode | init_file (std::vector< std::string > &var_names, std::vector< std::string > &desired_names, bool _append) override |
| Initialize file: this is where all defines are done. Virtual so that grid-output writers (NCWriteScrip / NCWriteESMF / NCWriteDomain) can synthesize a fresh schema from mesh state instead of going through the climate var_names plumbing. More... | |
| ErrorCode | write_values (std::vector< std::string > &var_names, std::vector< int > &tstep_nums) override |
| Take the info from VarData and write first non-set variables, then set variables. Virtual for the same reason as init_file. More... | |
Public Member Functions inherited from moab::NCWriteHelper | |
| NCWriteHelper (WriteNC *writeNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
| virtual | ~NCWriteHelper () |
| virtual ErrorCode | collect_variable_data (std::vector< std::string > &var_names, std::vector< int > &tstep_nums) |
| Collect data for specified variables (partially implemented in child classes) More... | |
Protected Member Functions | |
| ErrorCode | write_nonset_variables (std::vector< WriteNC::VarData > &vdatas, std::vector< int > &tstep_nums) override |
Private Attributes | |
| long | mLocalCells |
| long | mGlobalCells |
| int | mMaxCornersGlobal |
| long | mNi |
| On-disk grid extents. For now we always emit ni = mGlobalCells, nj = 1 — i.e. a flat layout that the CESM domain reader handles identically to the rectangular case but with j collapsed. More... | |
| long | mNj |
| bool | mHasAreas |
| bool | mHasMask |
| bool | mHasFrac |
| std::vector< int > | mLocalGids |
| std::vector< double > | mXc |
| std::vector< double > | mYc |
| std::vector< double > | mXv |
| std::vector< double > | mYv |
| std::vector< int > | mMask |
| std::vector< double > | mAreas |
| std::vector< double > | mFrac |
| int | mDimN |
| int | mDimNi |
| int | mDimNj |
| int | mDimNv |
| int | mVarXc |
| int | mVarYc |
| int | mVarXv |
| int | mVarYv |
| int | mVarMask |
| int | mVarArea |
| int | mVarFrac |
Additional Inherited Members | |
Static Public Member Functions inherited from moab::NCWriteHelper | |
| static NCWriteHelper * | get_nc_helper (WriteNC *writeNC, int fileId, const FileOptions &opts, EntityHandle fileSet) |
| Get appropriate helper instance for WriteNC class based on some info in the file set. More... | |
Protected Attributes inherited from moab::NCWriteHelper | |
| WriteNC * | _writeNC |
| Allow NCWriteHelper to directly access members of WriteNC. More... | |
| int | _fileId |
| Cache some information from WriteNC. More... | |
| const FileOptions & | _opts |
| EntityHandle | _fileSet |
| int | nTimeSteps |
| Dimensions of time and level. More... | |
| int | nLevels |
| int | tDim |
| Dimension numbers for time and level. More... | |
| int | levDim |
| Range | localCellsOwned |
| Local owned cells, edges and vertices. More... | |
| Range | localEdgesOwned |
| Range | localVertsOwned |
| std::vector< double > | timeStepVals |
| Time values of output timesteps. More... | |
Definition at line 47 of file NCWriteDomain.hpp.
|
inline |
Definition at line 50 of file NCWriteDomain.hpp.
|
overridevirtual |
Definition at line 19 of file NCWriteDomain.cpp.
|
overridevirtual |
Collect necessary info about local mesh (implemented in child classes)
Implements moab::NCWriteHelper.
Definition at line 48 of file NCWriteDomain.cpp.
References moab::NCWriteHelper::_fileSet, moab::NCWriteHelper::_writeNC, moab::Range::begin(), moab::WriteNC::dbgOut, moab::Range::empty(), moab::Range::end(), moab::ParallelComm::filter_pstatus(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::WriteNC::isParallel, moab::NCWriteHelper::localCellsOwned, mAreas, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, moab::WriteNC::mbImpl, mFrac, mGlobalCells, moab::WriteNC::mGlobalIdTag, mHasAreas, mHasFrac, mHasMask, mLocalCells, mLocalGids, mMask, mMaxCornersGlobal, mNi, mNj, mXc, mXv, mYc, mYv, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_size(), PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::DebugOutput::tprintf(), and moab::anonymous_namespace{NCWriteDomain.cpp}::xyz_to_latlon_deg().
|
overridevirtual |
Initialize file: this is where all defines are done. Virtual so that grid-output writers (NCWriteScrip / NCWriteESMF / NCWriteDomain) can synthesize a fresh schema from mesh state instead of going through the climate var_names plumbing.
Reimplemented from moab::NCWriteHelper.
Definition at line 201 of file NCWriteDomain.cpp.
References moab::NCWriteHelper::_fileId, MB_SET_ERR, MB_SUCCESS, mDimN, mDimNi, mDimNj, mDimNv, mGlobalCells, mMaxCornersGlobal, mNi, mNj, mVarArea, mVarFrac, mVarMask, mVarXc, mVarXv, mVarYc, mVarYv, and NCFUNC.
|
overrideprotectedvirtual |
Implements moab::NCWriteHelper.
Definition at line 419 of file NCWriteDomain.cpp.
References MB_SUCCESS.
|
overridevirtual |
Take the info from VarData and write first non-set variables, then set variables. Virtual for the same reason as init_file.
Reimplemented from moab::NCWriteHelper.
Definition at line 282 of file NCWriteDomain.cpp.
References moab::NCWriteHelper::_fileId, moab::NCWriteHelper::_writeNC, moab::WriteNC::dbgOut, ErrorCode, moab::WriteNC::isParallel, mAreas, MB_SET_ERR, MB_SUCCESS, mFrac, mGlobalCells, mHasAreas, mLocalCells, mLocalGids, mMask, mMaxCornersGlobal, mVarArea, mVarFrac, mVarMask, mVarXc, mVarXv, mVarYc, mVarYv, mXc, mXv, mYc, mYv, NCFUNCAP, and moab::DebugOutput::tprintf().
|
private |
Definition at line 93 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 96 of file NCWriteDomain.hpp.
Referenced by init_file().
|
private |
Definition at line 97 of file NCWriteDomain.hpp.
Referenced by init_file().
|
private |
Definition at line 98 of file NCWriteDomain.hpp.
Referenced by init_file().
|
private |
Definition at line 99 of file NCWriteDomain.hpp.
Referenced by init_file().
|
private |
Definition at line 94 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 74 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), init_file(), and write_values().
|
private |
Definition at line 83 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 85 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info().
|
private |
Definition at line 84 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info().
|
private |
Definition at line 73 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 87 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 92 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 75 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), init_file(), and write_values().
|
private |
On-disk grid extents. For now we always emit ni = mGlobalCells, nj = 1 — i.e. a flat layout that the CESM domain reader handles identically to the rectangular case but with j collapsed.
Definition at line 80 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and init_file().
|
private |
Definition at line 81 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and init_file().
|
private |
Definition at line 105 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 106 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 104 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 100 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 102 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 101 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 103 of file NCWriteDomain.hpp.
Referenced by init_file(), and write_values().
|
private |
Definition at line 88 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 90 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 89 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().
|
private |
Definition at line 91 of file NCWriteDomain.hpp.
Referenced by collect_mesh_info(), and write_values().