Changeset 606 for XIOS/trunk/src/output/netCdfInterface.cpp
- Timestamp:
- 06/03/15 15:06:25 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/output/netCdfInterface.cpp
r578 r606 525 525 526 526 /*! 527 This function sets the compression level to the specified variable 528 \param [in] ncid Groud id (or file id) 529 \param [in] varId Id of the variable 530 \param [in] compressionLevel The compression level from 0 to 9 (0 disables the compression, 9 is the higher compression) 531 \return Status code 532 */ 533 int CNetCdfInterface::defVarDeflate(int ncid, int varId, int compressionLevel) 534 { 535 int status = nc_def_var_deflate(ncid, varId, false, (compressionLevel > 0), compressionLevel); 536 if (NC_NOERR != status) 537 { 538 StdString errormsg(nc_strerror(status)); 539 StdStringStream sstr; 540 541 sstr << "Error in calling function " << "nc_def_var_deflate(ncid, varId, false, (compressionLevel > 0), compressionLevel)" << std::endl; 542 sstr << errormsg << std::endl; 543 sstr << "Unable to set the compression level of the variable with id: " << varId 544 << " and compression level: " << compressionLevel << std::endl; 545 StdString e = sstr.str(); 546 throw CNetCdfException(e); 547 } 548 549 return status; 550 } 551 552 /*! 527 553 Set or unset the fill mode for a NetCDF file specified by its file id. 528 554 \param [in] ncid File id
Note: See TracChangeset
for help on using the changeset viewer.