Changeset 453 for XIOS/trunk
- Timestamp:
- 01/09/14 09:41:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/output/onetcdf4.cpp
r438 r453 246 246 std::vector<StdSize> dimsizes ; 247 247 StdSize size ; 248 StdSize totalSize ; 249 StdSize maxSize=1024*1024*256 ; // == 2GB/8 if output double 248 250 249 251 int grpid = this->getCurrentGroup(); … … 262 264 263 265 CheckError(nc_def_var (grpid, name.c_str(), type, dimids.size(), &(dimids[0]), &varid)); 266 267 // set chunksize : size of one record 268 // but must not be > 2GB (netcdf or HDF5 problem) 269 totalSize=1 ; 270 for(vector<StdSize>::reverse_iterator it=dimsizes.rbegin(); it!=dimsizes.rend();++it) 271 { 272 totalSize*= *it ; 273 if (totalSize>=maxSize) *it=1 ; 274 } 275 264 276 CheckError(nc_def_var_chunking (grpid, varid, NC_CHUNKED, &(dimsizes[0]))); 265 277 CheckError(nc_def_var_fill(grpid, varid, true, NULL));
Note: See TracChangeset
for help on using the changeset viewer.