Ignore:
Timestamp:
04/23/18 11:18:05 (6 years ago)
Author:
yushan
Message:

Branch EP merged with Dev_cmip6 @r1490

Location:
XIOS/dev/branch_openmp/src/io
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/io/inetcdf4.cpp

    r1463 r1491  
    77namespace xios 
    88{ 
    9   CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 
     9  //CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 
     10  CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, 
     11                       bool readMetaDataPar /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 
    1012  { 
    1113    // Don't use parallel mode if there is only one process 
     
    1719        comm = NULL; 
    1820    } 
    19     mpi = comm && !multifile; 
     21    //mpi = comm && !multifile; 
     22    mpi = comm && !multifile && readMetaDataPar; 
    2023    ep_lib::MPI_Info info_null; 
    2124 
  • XIOS/dev/branch_openmp/src/io/inetcdf4.hpp

    r1460 r1491  
    2323      /// Constructors /// 
    2424      CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm = NULL, bool multifile = true, 
    25                 const StdString& timeCounterName = "time_counter"); 
     25                bool readMetaDataPar = false, const StdString& timeCounterName = "time_counter"); 
     26                //const StdString& timeCounterName = "time_counter"); 
    2627      CINetCDF4(const CINetCDF4& inetcdf4);       // Not implemented. 
    2728      CINetCDF4(const CINetCDF4* const inetcdf4); // Not implemented. 
  • XIOS/dev/branch_openmp/src/io/nc4_data_input.cpp

    r1482 r1491  
    1010namespace xios 
    1111{ 
    12   CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 
     12  //CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 
     13  CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, 
     14                               bool readMetaDataPar /*= false*/, bool ugridConvention /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 
    1315    : SuperClass() 
    14     , SuperClassWriter(filename, &comm_file, multifile, timeCounterName) 
     16    , SuperClassWriter(filename, &comm_file, multifile, readMetaDataPar, timeCounterName) 
     17    //, SuperClassWriter(filename, &comm_file, multifile, timeCounterName) 
    1518    , comm_file(comm_file) 
    1619    , filename(filename) 
    1720    , isCollective(isCollective) 
     21    , ugridConvention(ugridConvention) 
    1822    , readMetaDataDomains_(), readValueDomains_() 
    1923    , readMetaDataAxis_(), readValueAxis_() 
     
    422426      StdString boundsLonName = this->getBoundsId(lonName); 
    423427 
    424       int nbVertex = this->getNbVertex(fieldId); 
     428      if (ugridConvention && domain->nvertex.isEmpty()) 
     429      { 
     430        ERROR("void CNc4DataInput::readDomainAttributeValueFromFile(...)", 
     431          << " Attribute nvertex must be specified for domain " << domain->getDomainOutputName() 
     432          << " read from UGRID file " << this->filename << " ."<< std::endl); 
     433      } 
     434//      int nbVertex = this->getNbVertex(fieldId); 
     435      int nbVertex = (ugridConvention) ? domain->nvertex : this->getNbVertex(fieldId); 
     436       
    425437      if (!domain->nvertex.isEmpty() && (domain->nvertex != nbVertex)) 
    426438      { 
  • XIOS/dev/branch_openmp/src/io/nc4_data_input.hpp

    r1328 r1491  
    2525    /// Constructors /// 
    2626    CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true, 
    27                   const StdString& timeCounterName = "time_counter"); 
     27                  bool readMetaDataPar = false, bool ugridConvention = false, const StdString& timeCounterName = "time_counter"); 
     28                  //const StdString& timeCounterName = "time_counter"); 
    2829    CNc4DataInput(const CNc4DataInput& dataInput);       // Not implemented. 
    2930    CNc4DataInput(const CNc4DataInput* const dataInput); // Not implemented. 
     
    7475    const StdString filename; 
    7576    bool isCollective; 
     77    bool ugridConvention; 
    7678  }; // class CNc4DataInput 
    7779 
Note: See TracChangeset for help on using the changeset viewer.