Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
d65b1599
Commit
d65b1599
authored
Dec 11, 2014
by
Uwe Schulzweida
Browse files
intlevel3d: does not work (bug fix)
parent
42158def
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d65b1599
2014-12-1
1
Uwe Schulzweida
2014-12-1
2
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
...
...
NEWS
View file @
d65b1599
CDO NEWS
--------
Version 1.6.7 (1
1
December 2014):
Version 1.6.7 (1
2
December 2014):
Fixed bugs:
* intlevel3d: does not work
* GRIB_API: segfaults when writing grib2 files [Bug #5351]
Version 1.6.6 (27 November 2014):
...
...
src/Intlevel3d.c
View file @
d65b1599
...
...
@@ -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
,
zaxis
ID
1
,
str
);
if
(
str
[
0
]
)
vlistDefVarLongname
(
vlistID3
,
oz3dvar
ID
,
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
++
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment