Changeset 607 for XIOS/branchs


Ignore:
Timestamp:
06/05/15 10:03:37 (9 years ago)
Author:
rlacroix
Message:

Improve the error message when compression cannot be used.

Location:
XIOS/branchs/xios-1.0/src/output
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/branchs/xios-1.0/src/output/nc4_data_output.cpp

    r606 r607  
    739739           if (field->compression_level.isEmpty()) 
    740740             field->compression_level = field->file->compression_level.isEmpty() ? 0 : field->file->compression_level; 
    741            if (field->compression_level < 0 || field->compression_level > 9) 
    742              ERROR("void CNc4DataOutput::writeField_(CField* field)", 
    743                    "Invalid compression level, the value should range between 0 and 9."); 
    744741           SuperClassWriter::setCompressionLevel(fieldid, field->compression_level); 
    745742 
  • XIOS/branchs/xios-1.0/src/output/onetcdf4.cpp

    r606 r607  
    290290      void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel) 
    291291      { 
     292         if (compressionLevel < 0 || compressionLevel > 9) 
     293           ERROR("void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel)", 
     294                 "Invalid compression level for variable \"" << varname << "\", the value should range between 0 and 9."); 
     295         if (compressionLevel && wmpi) 
     296           ERROR("void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel)", 
     297                 "Impossible to use compression for variable \"" << varname << "\" when using parallel mode."); 
     298 
    292299         int grpid = this->getCurrentGroup(); 
    293300         int varid = this->getVariable(varname); 
Note: See TracChangeset for help on using the changeset viewer.