Last change
on this file since 643 was
599,
checked in by rlacroix, 9 years ago
|
Implement reading fields from NetCDF files.
|
-
Property copyright set to
Software name : XIOS (Xml I/O Server) http://forge.ipsl.jussieu.fr/ioserver Creation date : January 2009 Licence : CeCCIL version2 see license file in root directory : Licence_CeCILL_V2-en.txt or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement) CNRS/IPSL (Institut Pierre Simon Laplace) Project Manager : Yann Meurdesoif yann.meurdesoif@cea.fr
|
File size:
1.1 KB
|
Rev | Line | |
---|
[591] | 1 | #ifndef __XIOS_NC4_DATA_INPUT__ |
---|
| 2 | #define __XIOS_NC4_DATA_INPUT__ |
---|
[219] | 3 | |
---|
[591] | 4 | /// XIOS headers /// |
---|
| 5 | #include "xios_spl.hpp" |
---|
[599] | 6 | #include "data_input.hpp" |
---|
[219] | 7 | #include "inetcdf4.hpp" |
---|
| 8 | |
---|
[335] | 9 | namespace xios |
---|
[219] | 10 | { |
---|
[599] | 11 | class CNc4DataInput |
---|
| 12 | : protected CINetCDF4 |
---|
| 13 | , public virtual CDataInput |
---|
| 14 | { |
---|
| 15 | public: |
---|
| 16 | /// Type definitions /// |
---|
| 17 | typedef CINetCDF4 SuperClassWriter; |
---|
| 18 | typedef CDataInput SuperClass; |
---|
[219] | 19 | |
---|
[599] | 20 | /// Constructors /// |
---|
| 21 | CNc4DataInput(const StdString& filename, MPI_Comm comm_file, bool multifile, bool isCollective = true); |
---|
| 22 | CNc4DataInput(const CNc4DataInput& dataInput); // Not implemented. |
---|
| 23 | CNc4DataInput(const CNc4DataInput* const dataInput); // Not implemented. |
---|
[219] | 24 | |
---|
[599] | 25 | /// Destructor /// |
---|
| 26 | virtual ~CNc4DataInput(void); |
---|
[219] | 27 | |
---|
[599] | 28 | /// Getters /// |
---|
| 29 | const StdString& getFileName(void) const; |
---|
[219] | 30 | |
---|
[599] | 31 | protected: |
---|
| 32 | // Read methods |
---|
| 33 | virtual StdSize getFieldNbRecords_(CField* field); |
---|
| 34 | virtual void readFieldData_(CField* field); |
---|
| 35 | virtual void closeFile_(void); |
---|
[219] | 36 | |
---|
[599] | 37 | private: |
---|
| 38 | /// Private attributes /// |
---|
| 39 | MPI_Comm comm_file; |
---|
| 40 | const StdString filename; |
---|
| 41 | bool isCollective; |
---|
| 42 | }; // class CNc4DataInput |
---|
[335] | 43 | } // namespace xios |
---|
[219] | 44 | |
---|
[591] | 45 | #endif //__XIOS_NC4_DATA_INPUT__ |
---|
Note: See
TracBrowser
for help on using the repository browser.