Commit d65b1599 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

intlevel3d: does not work (bug fix)

parent 42158def
2014-12-11 Uwe Schulzweida
2014-12-12 Uwe Schulzweida
* using CDI library version 1.6.7
* Version 1.6.7 released
2014-12-11 Uwe Schulzweida
* intlevel3d: does not work (bug fix)
2014-12-03 Uwe Schulzweida
* added File.test.in to test all file formats
......
CDO NEWS
--------
Version 1.6.7 (11 December 2014):
Version 1.6.7 (12 December 2014):
Fixed bugs:
* intlevel3d: does not work
* GRIB_API: segfaults when writing grib2 files [Bug #5351]
Version 1.6.6 (27 November 2014):
......
......@@ -203,7 +203,7 @@ void *Intlevel3d(void *argument)
double *lonIn, *latIn, *lonOut, *latOut;
int zaxisID1 = -1, zaxisID3;
int gridID, zaxisID;
int gridID3 = -1, gridID, zaxisID;
int nlevi, nlevo, nlevel = 0, maxlev;
int lup, ldown;
int **varnmiss = NULL;
......@@ -292,6 +292,7 @@ void *Intlevel3d(void *argument)
nvars = vlistNvars(vlistID2);
if (nvars != 1) cdoAbort("Only one single variable is allowed!");
gridID = vlistInqVarGrid(vlistID2, varID);
gridID3 = gridID;
zaxisID = vlistInqVarZaxis(vlistID2, varID);
gridsize = gridInqSize(gridID);
nlevel = zaxisInqSize(zaxisID);
......@@ -448,7 +449,7 @@ void *Intlevel3d(void *argument)
if ( zaxisID1 == vlistZaxis(vlistID1, i) )
vlistChangeZaxisIndex(vlistID3, i, zaxisID3);
/* add the vertical output field to the output stream */
int oz3dvarID = vlistDefVar(vlistID3,0,zaxisID3,TSTEP_INSTANT);
int oz3dvarID = vlistDefVar(vlistID3, gridID3, zaxisID3, TSTEP_INSTANT);
{
char str[256];
str[0] = 0;
......@@ -456,7 +457,7 @@ void *Intlevel3d(void *argument)
vlistDefVarName(vlistID3,oz3dvarID,str);
str[0] = 0;
vlistInqVarLongname(vlistID2,0,str);
if ( str[0] ) vlistDefVarLongname(vlistID3,zaxisID1, str);
if ( str[0] ) vlistDefVarLongname(vlistID3,oz3dvarID, str);
str[0] = 0;
vlistInqVarUnits(vlistID2,0, str);
if ( str[0] ) vlistDefVarUnits(vlistID3,oz3dvarID, str);
......@@ -473,7 +474,7 @@ void *Intlevel3d(void *argument)
varinterp = (int*) malloc(nvars*sizeof(int)); /* marker for variables to be interpolated */
/* by default no variable should be interpolated */
for (i = 0; i < nvars;i++)
for ( i = 0; i < nvars; i++ )
varinterp[varID] = FALSE;
for ( varID = 0; varID < nvars; varID++ )
......@@ -492,7 +493,7 @@ void *Intlevel3d(void *argument)
* * have the same number of horizontal grid points (i.e. same gridSize) like the two vertical coordinates
* * are NOT the output vertical coordinates itself
*/
if ( zaxisID == zaxisID1 && varID != oz3dvarID && gridsize == gridSize)
if ( zaxisID == zaxisID1 && varID != oz3dvarID && gridsize == gridSize )
{
nlonIn = gridInqXsize(gridID);
nlatIn = gridInqYsize(gridID);
......@@ -600,6 +601,7 @@ void *Intlevel3d(void *argument)
}
}
}
/* copy output z coordinate to output stream */
nlevel = zaxisInqSize(vlistInqVarZaxis(vlistID3, oz3dvarID));
for ( levelID = 0; levelID < nlevel; levelID++ )
......
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