Skip to content
Snippets Groups Projects
Commit 5ae4bab2 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdfDefVar: check for xtype.

parent faa4ee09
No related branches found
No related tags found
No related merge requests found
Pipeline #19748 failed
......@@ -889,10 +889,11 @@ cdfDefVar(stream_t *streamptr, int varID)
#ifdef HAVE_NETCDF4
#ifdef NC_QUANTIZE_BITROUND
if (dtype == CDI_DATATYPE_FLT32 || dtype == CDI_DATATYPE_FLT64)
if (xtype == NC_FLOAT || xtype == NC_DOUBLE)
{
const int nsd = vlistInqVarNSD(vlistID, varID);
if (nsd > 0) nc_def_var_quantize(fileID, ncvarID, NC_QUANTIZE_BITROUND, nsd);
//if (nsd > 0) nc_def_var_quantize(fileID, ncvarID, NC_QUANTIZE_GRANULARBR, nsd);
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment