moab
NCHelperHOMME.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : NCHelperHOMME.hpp
00003 //
00004 // Purpose       : Climate NC file helper for HOMME grid
00005 //
00006 // Creator       : Danqing Wu
00007 //-------------------------------------------------------------------------
00008 
00009 #ifndef NCHELPERHOMME_HPP
00010 #define NCHELPERHOMME_HPP
00011 
00012 #include "NCHelper.hpp"
00013 
00014 namespace moab {
00015 
00017 class NCHelperHOMME : public UcdNCHelper
00018 {
00019 public:
00020   NCHelperHOMME(ReadNC* readNC, int fileId, const FileOptions& opts, EntityHandle fileSet);
00021   static bool can_read_file(ReadNC* readNC, int fileId);
00022 
00023 private:
00025   virtual ErrorCode init_mesh_vals();
00027   virtual ErrorCode check_existing_mesh();
00029   virtual ErrorCode create_mesh(Range& faces);
00031   virtual std::string get_mesh_type_name() { return "CAM_SE"; }
00032 
00034   virtual ErrorCode read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
00035                                                          std::vector<int>& tstep_nums);
00036 #ifdef PNETCDF_FILE
00037 
00038   virtual ErrorCode read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
00039                                                       std::vector<int>& tstep_nums);
00040 #else
00041 
00042   virtual ErrorCode read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas,
00043                                                 std::vector<int>& tstep_nums);
00044 #endif
00045 
00046 private:
00047   int _spectralOrder; // Read from variable 'np'
00048   int connectId; // For connectivity file
00049   bool isConnFile; // Is the data file being read actually a connectivity file in disguise?
00050 };
00051 
00052 } // namespace moab
00053 
00054 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines