Changeset 517 for XIOS/trunk/src/output/netCdfInterface.cpp
- Timestamp:
- 11/26/14 12:06:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/output/netCdfInterface.cpp
r505 r517 524 524 } 525 525 526 /*! 527 Set or unset the fill mode for a NetCDF file specified by its file id. 528 \param [in] ncid File id 529 \param [in] fill Define whether the fill mode should be enabled or not 530 \return Status code 531 */ 532 int CNetCdfInterface::setFill(int ncid, bool fill) 533 { 534 int old_fill_mode; 535 int status = nc_set_fill(ncid, fill ? NC_FILL : NC_NOFILL, &old_fill_mode); 536 if (NC_NOERR != status) 537 { 538 StdString errormsg(nc_strerror(status)); 539 StdStringStream sstr; 540 541 sstr << "Error when calling function nc_set_fill(ncid, fill ? NC_FILL : NC_NOFILL, &old_fill_mode)" << std::endl; 542 sstr << errormsg << std::endl; 543 sstr << "Unable to set the fill mode to : " << (fill ? "NC_FILL" : "NC_NOFILL") << std::endl; 544 StdString e = sstr.str(); 545 throw CNetCdfException(e); 546 } 547 548 return status; 549 } 550 526 551 /*! 527 552 This function makes a request to netcdf with a ncid, to set the fill parameters for a variable,
Note: See TracChangeset
for help on using the changeset viewer.