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

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

File:
1 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); 
Note: See TracChangeset for help on using the changeset viewer.