XMLIOSERVER 0.4
Serveur d'Entrées/Sorties parallèles
|
00001 /* ************************************************************************** * 00002 * Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011 * 00003 * ************************************************************************** */ 00004 00005 #ifndef __INETCDF4_HPP__ 00006 #define __INETCDF4_HPP__ 00007 00016 #ifndef __XIOS_NO_EXTERN 00017 00018 // M(essage) P(assing) I(nterface) headers 00019 #include <mpi.h> 00020 00021 // NetCDF headers 00022 #define MPI_INCLUDED 00023 #include <netcdf.h> 00024 00025 #endif // __XIOS_NO_EXTERN 00026 00027 // XMLIOServer headers 00028 #include "xmlioserver_spl.hpp" 00029 00030 // ////////////////////////////// Déclarations ///////////////////////////// // 00031 00032 namespace xmlioserver 00033 { 00035 namespace io 00036 { 00041 class CINetCDF4 00042 { 00043 public : // Définition de type 00044 00046 typedef std::vector<std::string> CNetCDF4Path; 00047 00048 public : // Constructeurs 00049 00051 CINetCDF4(void); // NIY 00052 00057 explicit CINetCDF4(const std::string & _filename); 00058 00063 CINetCDF4(const CINetCDF4 & _inetcdf4);// NIY 00064 00069 CINetCDF4(const CINetCDF4 * const _inetcdf4_ptr); // NIY 00070 00071 public : // Destructeur 00072 00074 ~CINetCDF4(void); 00075 00076 protected : // Accesseurs protégés 00077 00084 int getCurrentGroup(void); 00085 00100 int getGroup(const CNetCDF4Path & _path); 00101 00107 int getVariable(const std::string & _varname); 00108 00114 int getDimension(const std::string & _dimname); 00115 00121 std::vector<std::size_t> getDimensions(const std::string & _varname); 00122 00127 int getUnlimitedDimension(void); 00128 00134 bool varExist(const std::string & _varname); 00135 00136 00137 private : // Vérification des erreurs NetCDF 00138 00152 static void CheckError(int _status); 00153 00154 public : // Propriétés privées 00155 00156 CONetCDF4Path path; 00157 int ncidp; 00159 }; // class CINetCDF4 00160 } // namespace io 00161 00162 } // namespace xmlioserver 00163 00164 #endif // __INETCDF4_HPP__