Changeset 878 for XIOS/trunk/src/io/onetcdf4.cpp
- Timestamp:
- 07/01/16 16:55:33 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/onetcdf4.cpp
r857 r878 13 13 14 14 CONetCDF4::CONetCDF4(const StdString& filename, bool append, bool useClassicFormat, 15 bool useCFConvention, 15 16 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 16 17 : path() 17 18 , wmpi(false) 18 19 , useClassicFormat(useClassicFormat) 19 { 20 this->initialize(filename, append, useClassicFormat, comm, multifile, timeCounterName); 20 , useCFConvention(useCFConvention) 21 { 22 this->initialize(filename, append, useClassicFormat, useCFConvention, comm, multifile, timeCounterName); 21 23 } 22 24 … … 29 31 ///-------------------------------------------------------------- 30 32 31 void CONetCDF4::initialize(const StdString& filename, bool append, bool useClassicFormat, 33 void CONetCDF4::initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 32 34 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 33 35 { 34 36 this->useClassicFormat = useClassicFormat; 37 this->useCFConvention = useCFConvention; 35 38 36 39 int mode = useClassicFormat ? 0 : NC_NETCDF4; … … 284 287 std::vector<StdSize> dimsizes; 285 288 int dimSize = dim.size(); 289 286 290 StdSize size; 287 291 StdSize totalSize; … … 292 296 std::vector<StdString>::const_iterator it = dim.begin(), end = dim.end(); 293 297 294 for ( ; it != end; it++)298 for (int idx = 0; it != end; it++, ++idx) 295 299 { 296 300 const StdString& dimid = *it; … … 314 318 if (totalSize >= maxSize) *it = 1; 315 319 } 316 317 320 int storageType = (0 == dimSize) ? NC_CONTIGUOUS : NC_CHUNKED; 318 321 CNetCdfInterface::defVarChunking(grpid, varid, storageType, &dimsizes[0]); … … 570 573 } 571 574 575 bool CONetCDF4::dimExist(const StdString& dimname) 576 { 577 int grpid = this->getCurrentGroup(); 578 return CNetCdfInterface::isDimExisted(grpid, dimname); 579 } 580 572 581 void CONetCDF4::sync(void) 573 582 {
Note: See TracChangeset
for help on using the changeset viewer.