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> 2011-09-21 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* correct netCDF dimension order of unstructured grids (bug fix) [report: Ralf Mueller] * correct netCDF dimension order of unstructured grids (bug fix) [report: Ralf Mueller]
......
...@@ -2715,8 +2715,7 @@ int cdfDefVar(int streamID, int varID) ...@@ -2715,8 +2715,7 @@ int cdfDefVar(int streamID, int varID)
dimorder[0] = ixyz/100; dimorder[0] = ixyz/100;
dimorder[1] = (ixyz-dimorder[0]*100)/10; dimorder[1] = (ixyz-dimorder[0]*100)/10;
dimorder[2] = (ixyz-dimorder[0]*100-dimorder[1]*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)) ) if ( ((dimorder[0]>0)+(dimorder[1]>0)+(dimorder[2]>0)) < ((xid!=UNDEFID)+(yid!=UNDEFID)+(zid!=UNDEFID)) )
{ {
...@@ -2876,6 +2875,8 @@ int cdfDefVar(int streamID, int varID) ...@@ -2876,6 +2875,8 @@ int cdfDefVar(int streamID, int varID)
cdfDefVarDeflate(fileID, ncvarid, streamptr->complevel); cdfDefVarDeflate(fileID, ncvarid, streamptr->complevel);
} }
else else
{
if ( lchunk )
{ {
static int lwarn = TRUE; static int lwarn = TRUE;
...@@ -2886,6 +2887,7 @@ int cdfDefVar(int streamID, int varID) ...@@ -2886,6 +2887,7 @@ int cdfDefVar(int streamID, int varID)
} }
} }
} }
}
if ( streamptr->comptype == COMPRESS_SZIP ) if ( streamptr->comptype == COMPRESS_SZIP )
{ {
......
Supports Markdown
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