source: XIOS/trunk/src/data_output.hpp @ 773

Last change on this file since 773 was 676, checked in by rlacroix, 9 years ago

Add support for indexed output.

If the new field attribute "indexed_output" is set to true and a mask is defined (either at grid, domain or axis level), the indexed data will be outputed instead of the full data with missing values.

See http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html#compression-by-gathering for more information.

  • 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: 2.4 KB
Line 
1#ifndef __XIOS_DATA_OUTPUT__
2#define __XIOS_DATA_OUTPUT__
3
4/// XIOS headers ///
5#include "xios_spl.hpp"
6#include "exception.hpp"
7#include "grid.hpp"
8#include "field.hpp"
9
10
11namespace xios
12{
13      /// ////////////////////// Déclarations ////////////////////// ///
14      class CDataOutput
15      {
16         public :
17
18            /// Définition de type ///
19            typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataOutputType;
20
21            /// Ecriture ///
22            void writeFile     (CFile*     file);
23            void writeAttribute(CVariable* var);
24            void syncFile      (void);
25            void closeFile     (void);
26            void writeField    (CField* field);
27            void writeFieldGrid(CField* field);
28            void writeTimeDimension(void);
29            void writeFieldData(CField* field);
30
31            virtual void definition_start(void) = 0;
32            virtual void definition_end(void)   = 0;
33
34            //!< Test if the file was opened in append mode
35            virtual bool IsInAppendMode() const { return appendMode; };
36
37            virtual ~CDataOutput(void);
38
39         protected:
40
41            /// Ecriture ///
42            void writeGrid(CGrid* grid, bool allowCompressedOutput = false);
43            void writeGrid(CDomain* domain, CAxis* axis);
44            void writeGrid(CDomain* domain);
45            void writeGrid(std::vector<CDomain*> domain, std::vector<CAxis*> axis);
46
47            virtual void writeFile_     (CFile*      file)   = 0;
48            virtual void writeAttribute_(CVariable*  var)    = 0;
49            virtual void closeFile_     (void)               = 0;
50            virtual void syncFile_      (void)               = 0;
51            virtual void writeField_    (CField*     field)  = 0;
52            virtual void writeFieldData_(CField*     field)  = 0;
53            virtual void writeDomain_   (CDomain*    domain) = 0;
54            virtual void writeAxis_     (CAxis*      axis)   = 0;
55            virtual void writeGridCompressed_(CGrid* grid)   = 0;
56            virtual void writeTimeDimension_(void)           = 0;
57            virtual void writeTimeAxis_ (CField*     field,
58                                         const shared_ptr<CCalendar> cal) = 0;
59
60            /// Propriétés protégées ///
61            EDataOutputType type;
62            bool appendMode; //!< If true, we are appending data to an existing file
63
64      }; // class CDataOutput
65
66} // namespace xios
67
68#endif //__XIOS_DATA_OUTPUT__
Note: See TracBrowser for help on using the repository browser.