Commit 71ccbbbd authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

improve HYBRID_HALF support for grb/nc

parent d87845f8
......@@ -1673,8 +1673,7 @@ void cdfDefVCT(int streamID, int zaxisID)
streamptr = stream_to_pointer(streamID);
type = zaxisInqType(zaxisID);
if ( type == ZAXIS_HYBRID )
if ( type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF )
{
int i;
int fileID;
......@@ -1852,12 +1851,12 @@ void cdfDefZaxis(int streamID, int zaxisID)
if ( type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF )
{
size_t ilev = zaxisInqVctSize(zaxisID)/2;
size_t mlev = ilev - 1;
int ilev = zaxisInqVctSize(zaxisID)/2;
int mlev = ilev - 1;
if ( type == ZAXIS_HYBRID )
{
if ( (int) mlev != dimlen )
if ( mlev != dimlen )
{
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
......@@ -1888,7 +1887,7 @@ void cdfDefZaxis(int streamID, int zaxisID)
if ( type == ZAXIS_HYBRID_HALF )
{
if ( (int) ilev != dimlen )
if ( ilev != dimlen )
{
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
......
......@@ -1920,6 +1920,7 @@ void grbDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int levelID
break;
}
case ZAXIS_HYBRID:
case ZAXIS_HYBRID_HALF:
{
int vctsize;
......
......@@ -686,7 +686,7 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, double *levels, int lbo
zaxisDefUbounds(zaxisID, levels2);
}
if ( zaxistype == ZAXIS_HYBRID )
if ( zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF )
{
/* if ( vctsize > 0 && vctsize >= 2*(nlevels+1)) */
/* if ( vctsize > 0 && vctsize >= 2*(nlevels)) */
......
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