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
libcdi
Commits
4373c50b
Commit
4373c50b
authored
Sep 21, 2012
by
Uwe Schulzweida
Browse files
vlistInqZaxis: use zaxisGetIndexList() to get global zaxisIDs (bug fix)
parent
6f76ad88
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4373c50b
...
...
@@ -3,6 +3,10 @@
* Version 1.5.8 released
* using CGRIBEX library version 1.5.5
2012-09-21 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* vlistInqZaxis: use zaxisGetIndexList() to get global zaxisIDs (bug fix)
2012-09-20 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* listSizeExtend: init ops, val and status
...
...
src/vlist.c
View file @
4373c50b
...
...
@@ -14,6 +14,8 @@
#include
"vlist_att.h"
#include
"pio_rpc.h"
extern
void
zaxisGetIndexList
(
int
,
int
*
);
static
int
VLIST_Debug
=
0
;
static
int
vlistIsInitialized
=
0
;
...
...
@@ -383,12 +385,22 @@ int vlistInqZaxis(int vlistID, int zaxistype, int nlevels, double *levels, int l
if
(
!
zaxisdefined
)
{
nzaxis
=
zaxisSize
();
for
(
zaxisID
=
0
;
zaxisID
<
nzaxis
;
zaxisID
++
)
if
(
zaxisCompare
(
zaxisID
,
zaxistype
,
nlevels
,
lbounds
,
levels
,
NULL
,
NULL
,
0
)
==
0
)
{
zaxisglobdefined
=
1
;
break
;
}
if
(
nzaxis
>
0
)
{
int
*
zaxisIndexList
;
zaxisIndexList
=
(
int
*
)
malloc
(
nzaxis
*
sizeof
(
int
));
zaxisGetIndexList
(
nzaxis
,
zaxisIndexList
);
for
(
index
=
0
;
index
<
nzaxis
;
index
++
)
{
zaxisID
=
zaxisIndexList
[
index
];
if
(
zaxisCompare
(
zaxisID
,
zaxistype
,
nlevels
,
lbounds
,
levels
,
NULL
,
NULL
,
0
)
==
0
)
{
zaxisglobdefined
=
1
;
break
;
}
}
if
(
zaxisIndexList
)
free
(
zaxisIndexList
);
}
}
if
(
!
zaxisdefined
)
...
...
@@ -534,6 +546,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
nvct
=
zaxisInqVctSize
(
zaxisID
);
vct
=
zaxisInqVctPtr
(
zaxisID
);
}
lbounds
=
0
;
/* <------------ have to defined */
levels2
=
NULL
;
/* <------------ have to defined */
zaxisID2
=
vlistInqZaxis
(
vlistID2
,
zaxisType
,
nlevs2
,
levels
,
lbounds
,
levels2
,
nvct
,
vct
);
...
...
@@ -1084,7 +1097,7 @@ vlistPrintKernel(vlist_t *vlistptr, FILE * fp )
decoSize
=
vlistptr
->
vars
[
varID
].
decoSize
;
size
=
vlistptr
->
vars
[
varID
].
nlevs
*
gridInqSize
(
vlistptr
->
vars
[
varID
].
gridID
);
for
(
i
=
0
;
i
<
decoSize
;
i
++
)
{
rank
=
vlistptr
->
vars
[
varID
].
deco
[
i
].
rank
;
...
...
@@ -1094,7 +1107,7 @@ vlistPrintKernel(vlist_t *vlistptr, FILE * fp )
fprintf
(
fp
,
"%3d %8d %6d %6d %6d %8d %6d
\n
"
,
varID
,
size
,
iorank
,
decoSize
,
rank
,
offset
,
chunk
);
}
}
}
}
}
...
...
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