Commit 2581172a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Implementation of CDI_reduce_dim for z axis.

parent 1e3ab1cd
......@@ -2,6 +2,10 @@
* Version 1.9.1 released
2017-09-01 Uwe Schulzweida
* Implementation of CDI_reduce_dim for z axis
2017-08-30 Uwe Schulzweida
* Implementation of CDI_reduce_dim for time axis
......
......@@ -982,11 +982,10 @@ void cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dty
if ( sdata_sp ) Free(sdata_sp);
}
x
void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, int nmiss)
{
if ( streamptr->accessmode == 0 ) cdfEndDef(streamptr);
// if ( streamptr->ncmode == 0 ) { cdfEndDef(streamptr); streamptr->ncmode = 2; }
size_t xsize = 0, ysize = 0;
size_t size;
......@@ -1082,7 +1081,6 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
const int rect[][2], const void *data, int nmiss)
{
if ( streamptr->accessmode == 0 ) cdfEndDef(streamptr);
// if ( streamptr->ncmode == 0 ) { cdfEndDef(streamptr); streamptr->ncmode = 2; }
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
size_t xsize = 0, ysize = 0;
......@@ -1184,7 +1182,6 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, int nmiss)
{
if ( streamptr->accessmode == 0 ) cdfEndDef(streamptr);
// if ( streamptr->ncmode == 0 ) { streamptr->ncmode = 2; cdfEndDef(streamptr); }
size_t xsize = 0, ysize = 0;
size_t start[5];
......
......@@ -1507,7 +1507,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
}
if ( is_scalar ) ndims = 0;
// if ( CDI_reduce_dim ) return;
if ( CDI_reduce_dim ) return;
switch (type)
{
......@@ -2011,6 +2011,12 @@ void cdfDefVars(stream_t *streamptr)
int zaxisID = vlistZaxis(vlistID, index);
if ( streamptr->zaxisID[index] == CDI_UNDEFID ) cdfDefZaxis(streamptr, zaxisID);
}
if ( streamptr->ncmode != 2 )
{
cdf_enddef(streamptr->fileID);
streamptr->ncmode = 2;
}
}
#endif
......
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