Ignore:
Timestamp:
10/27/16 18:14:46 (5 years ago)
Author:
mhnguyen
Message:

Implementing domain interpolation weights exportation
The option 'file' locates file to read if it exists, otherwise a new file with name = 'file' will be created

+) Write interpolation weights into a file

Test
+) On Curie
+) Work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/domain_algorithm_interpolate.hpp

    r933 r982  
    1212#include "domain_algorithm_transformation.hpp" 
    1313#include "transformation.hpp" 
     14#include "nc4_data_output.hpp" 
    1415 
    1516namespace xios { 
     
    1718class CDomain; 
    1819class CInterpolateDomain; 
     20 
    1921 
    2022/*! 
     
    3537private: 
    3638  void readInterpolationInfo(std::string& filename, std::map<int,std::vector<std::pair<int,double> > >& interpMapValue); 
     39  void writeInterpolationInfo(std::string& filename, std::map<int,std::vector<std::pair<int,double> > >& interpMapValue); 
    3740  void processPole(std::map<int,std::vector<std::pair<int,double> > >& interMapValuePole, 
    3841                   int nbGlobalPointOnPole); 
    3942  void computeRemap(); 
    4043  void readRemapInfo(); 
     44  void writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >&); 
    4145  void exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue); 
     46 
    4247private: 
    4348  CInterpolateDomain* interpDomain_; 
     49  bool writeToFile_; 
     50 
     51  // class WriteNetCdf; 
     52  class WriteNetCdf : public CNc4DataOutput 
     53  { 
     54  public: 
     55    WriteNetCdf(const StdString& filename, const MPI_Comm comm); 
     56    int addDimensionWrite(const StdString& name, const StdSize size = UNLIMITED_DIM); 
     57    int addVariableWrite(const StdString& name, nc_type type, 
     58                         const std::vector<StdString>& dim); 
     59    void writeDataIndex(const CArray<int,1>& data, const StdString& name, 
     60                        bool collective, StdSize record, 
     61                        const std::vector<StdSize>* start = NULL, 
     62                        const std::vector<StdSize>* count = NULL); 
     63    void writeDataIndex(const CArray<double,1>& data, const StdString& name, 
     64                        bool collective, StdSize record, 
     65                        const std::vector<StdSize>* start = NULL, 
     66                        const std::vector<StdSize>* count = NULL); 
     67  }; 
     68 
    4469 
    4570private: 
Note: See TracChangeset for help on using the changeset viewer.