Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
NCHelperHOMME.hpp
Go to the documentation of this file.
1 //-------------------------------------------------------------------------
2 // Filename : NCHelperHOMME.hpp
3 //
4 // Purpose : Climate NC file helper for HOMME grid
5 //
6 // Creator : Danqing Wu
7 //-------------------------------------------------------------------------
8 
9 #ifndef NCHELPERHOMME_HPP
10 #define NCHELPERHOMME_HPP
11 
12 #include "NCHelper.hpp"
13 
14 namespace moab
15 {
16 
17 //! Child helper class for HOMME grid (CAM_SE)
18 class NCHelperHOMME : public UcdNCHelper
19 {
20  public:
21  NCHelperHOMME( ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet );
22  static bool can_read_file( ReadNC* readNC, int fileId );
23 
24  private:
25  //! Implementation of NCHelper::init_mesh_vals()
26  virtual ErrorCode init_mesh_vals();
27  //! Implementation of NCHelper::check_existing_mesh()
29  //! Implementation of NCHelper::create_mesh()
30  virtual ErrorCode create_mesh( Range& faces );
31  //! Implementation of NCHelper::get_mesh_type_name()
32  virtual std::string get_mesh_type_name()
33  {
34  return "CAM_SE";
35  }
36 
37  //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
38  virtual ErrorCode read_ucd_variables_to_nonset_allocate( std::vector< ReadNC::VarData >& vdatas,
39  std::vector< int >& tstep_nums );
40 #ifdef MOAB_HAVE_PNETCDF
41  //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
42  virtual ErrorCode read_ucd_variables_to_nonset_async( std::vector< ReadNC::VarData >& vdatas,
43  std::vector< int >& tstep_nums );
44 #else
45  //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
46  virtual ErrorCode read_ucd_variables_to_nonset( std::vector< ReadNC::VarData >& vdatas,
47  std::vector< int >& tstep_nums );
48 #endif
49 
50  private:
51  int _spectralOrder; // Read from variable 'np'
52  int connectId; // For connectivity file
53  bool isConnFile; // Is the data file being read actually a connectivity file in disguise?
54 };
55 
56 } // namespace moab
57 
58 #endif