Commit 81324990 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Revert last commit.

parent 30793bb4
......@@ -3,10 +3,6 @@
* using EXSE library version 1.4.1
* Version 1.9.6 released
2018-09-28 Uwe Schulzweida
* cdfDefVar: set astype to NC_DOUBLE (bug fix)
2018-09-26 Uwe Schulzweida
* Added gridInqXvalsPart() and gridInqYvalsPart() [patch from: Niklas Rber]
......
......@@ -700,6 +700,13 @@ int cdfDefVar(stream_t *streamptr, int varID)
if ( laddoffset || lscalefactor )
{
nc_type astype = (xtype == NC_FLOAT) ? NC_FLOAT : NC_DOUBLE;
if ( (astype == NC_DOUBLE) &&
IS_EQUAL(addoffset, (double) ((float) addoffset)) &&
IS_EQUAL(scalefactor, (double) ((float) scalefactor)) )
{
astype = NC_FLOAT;
}
cdf_put_att_double(fileID, ncvarid, "add_offset", astype, 1, &addoffset);
cdf_put_att_double(fileID, ncvarid, "scale_factor", astype, 1, &scalefactor);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment