Commit 7dd8dfd5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

deflate compression with netCDF4 doesn't work (bug fix)

parent aef9a356
2011-10-02 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* deflate compression with netCDF4 doesn't work (bug fix) [report: Geert Jan van Oldenborgh]
2011-09-21 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* correct netCDF dimension order of unstructured grids (bug fix) [report: Ralf Mueller]
......
......@@ -2715,8 +2715,7 @@ int cdfDefVar(int streamID, int varID)
dimorder[0] = ixyz/100;
dimorder[1] = (ixyz-dimorder[0]*100)/10;
dimorder[2] = (ixyz-dimorder[0]*100-dimorder[1]*10);
if ( dimorder[0] == 3 ) lchunk = FALSE; /* ZYX and ZXY */
if ( dimorder[0] != 3 ) lchunk = FALSE; /* ZYX and ZXY */
if ( ((dimorder[0]>0)+(dimorder[1]>0)+(dimorder[2]>0)) < ((xid!=UNDEFID)+(yid!=UNDEFID)+(zid!=UNDEFID)) )
{
......@@ -2877,12 +2876,15 @@ int cdfDefVar(int streamID, int varID)
}
else
{
static int lwarn = TRUE;
if ( lwarn )
if ( lchunk )
{
lwarn = FALSE;
Warning("Deflate compression is only available for netCDF4!");
static int lwarn = TRUE;
if ( lwarn )
{
lwarn = FALSE;
Warning("Deflate compression is only available for netCDF4!");
}
}
}
}
......
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