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)) )
{ {
...@@ -2877,12 +2876,15 @@ int cdfDefVar(int streamID, int varID) ...@@ -2877,12 +2876,15 @@ int cdfDefVar(int streamID, int varID)
} }
else else
{ {
static int lwarn = TRUE; if ( lchunk )
if ( lwarn )
{ {
lwarn = FALSE; static int lwarn = TRUE;
Warning("Deflate compression is only available for netCDF4!");
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