Ignore:
Timestamp:
08/25/15 16:52:45 (9 years ago)
Author:
rlacroix
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/axis.hpp

    r633 r676  
    6767         const std::set<StdString> & getRelFiles(void) const; 
    6868 
     69         const std::vector<int>& getIndexesToWrite(void) const; 
     70         int getNumberWrittenIndexes() const; 
     71         int getTotalNumberWrittenIndexes() const; 
     72         int getOffsetWrittenIndexes() const; 
     73 
    6974         /// Test /// 
    7075         bool IsWritten(const StdString & filename) const; 
     76         bool isWrittenCompressed(const StdString& filename) const; 
    7177         bool isDistributed(void) const; 
     78         bool isCompressible(void) const; 
    7279 
    7380         /// Mutateur /// 
    7481         void addRelFile(const StdString & filename); 
     82         void addRelFileCompressed(const StdString& filename); 
    7583 
    7684         /// Vérifications /// 
     
    97105                                    CServerDistributionDescription::ServerDistributionType disType = CServerDistributionDescription::BAND_DISTRIBUTION); 
    98106 
     107         void checkEligibilityForCompressedOutput(); 
     108 
    99109         bool hasTransformation(); 
    100110         void solveInheritanceTransformation(); 
     
    107117        CArray<double,1> value_srv; 
    108118        CArray<double,2> bound_srv; 
    109       private : 
     119 
     120      private: 
    110121         void checkData(); 
    111122         void checkMask(); 
     
    128139 
    129140         void setTransformations(const TransMapTypes&); 
     141 
    130142      private: 
    131143         bool isChecked; 
    132144         bool areClientAttributesChecked_; 
    133          std::set<StdString> relFiles; 
     145         std::set<StdString> relFiles, relFilesCompressed; 
    134146         TransMapTypes transformationMap_; 
    135147         bool isDistributed_; 
     148         //! True if and only if the data defined on the axis can be outputted in a compressed way 
     149         bool isCompressible_; 
    136150         std::map<int,int> nbConnectedClients_; // Mapping of number of communicating client to a server 
    137151         std::map<int, vector<size_t> > indSrv_; // Global index of each client sent to server 
     152         std::map<int, vector<int> > indWrittenSrv_; // Global written index of each client sent to server 
     153         std::vector<int> indexesToWrite; 
     154         int numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; 
    138155         std::vector<int> connectedServerRank_; 
    139156         std::map<int, CArray<int,1> > indiSrv_; 
Note: See TracChangeset for help on using the changeset viewer.