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

Branch EP merged with Dev_cmip6 @r1490

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/node/file.cpp

    r1460 r1491  
    657657 
    658658      bool isCollective = par_access.isEmpty() || par_access == par_access_attr::collective; 
    659       #ifdef _usingEP 
    660         if (isOpen) data_out->closeFile(); 
    661         if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 
    662         else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 
    663         isOpen = true; 
    664       #elif _usingMPI 
    665         if (isOpen) data_out->closeFile(); 
    666         if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 
    667         else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 
    668         isOpen = true; 
    669       #endif 
     659      bool  readMetaDataPar = true; 
     660      if (!context->hasServer) readMetaDataPar = (read_metadata_par.isEmpty()) ? false : read_metadata_par; 
     661       
     662      if (isOpen) data_out->closeFile(); 
     663      //if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 
     664      //else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 
     665      bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 
     666      if (time_counter_name.isEmpty()) 
     667        data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 
     668      else 
     669        data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 
     670 
     671      isOpen = true; 
    670672    } 
    671673  } 
Note: See TracChangeset for help on using the changeset viewer.