Changeset 1392


Ignore:
Timestamp:
01/10/18 11:55:33 (3 years ago)
Author:
oabramkina
Message:

Correcting a bug in case if default_value is given as short int.

Location:
XIOS/dev/XIOS_DEV_CMIP6/src/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_output.cpp

    r1391 r1392  
    19891989           { 
    19901990              double default_value = field->default_value.getValue(); 
     1991              short sdefault_value = (short)default_value; 
    19911992              float fdefault_value = (float)default_value; 
    19921993              if (type == NC_DOUBLE) 
    19931994                 SuperClassWriter::setDefaultValue(fieldid, &default_value); 
     1995              else if (type == NC_SHORT) 
     1996                  SuperClassWriter::setDefaultValue(fieldid, &sdefault_value); 
    19941997              else 
    19951998                 SuperClassWriter::setDefaultValue(fieldid, &fdefault_value); 
  • XIOS/dev/XIOS_DEV_CMIP6/src/io/onetcdf4_decl.cpp

    r1158 r1392  
    1717  
    1818  template void CONetCDF4::setDefaultValue<double>(const StdString & varname, const double* value) ; 
     19  template void CONetCDF4::setDefaultValue<short>(const StdString & varname, const short* value) ; 
    1920  template void CONetCDF4::setDefaultValue<float>(const StdString & varname, const float* value) ; 
    2021} 
Note: See TracChangeset for help on using the changeset viewer.