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
05e85e71
Commit
05e85e71
authored
Aug 15, 2014
by
Uwe Schulzweida
Browse files
gridCompare: check position parameter of unstructured grids only if gridnumber > 0
parent
392e395d
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
05e85e71
...
...
@@ -3,6 +3,10 @@
* Version 1.7.0 released
* using CGRIBEX library version 1.7.0
2014-08-15 Uwe Schulzweida
* gridCompare: check position parameter of unstructured grids only if gridnumber > 0
2014-08-13 Uwe Schulzweida
* cgribex: use timerange indicator to identify different variables
...
...
src/grid.c
View file @
05e85e71
...
...
@@ -2316,12 +2316,21 @@ int gridCompare(int gridID, grid_t grid)
{
char
uuidOfHGrid
[
17
];
gridInqUUID
(
gridID
,
uuidOfHGrid
);
/*
printf("compare unstructured grids\n");
printf("gridID %d\n", gridID);
printf("gridsize %d\n", grid.size);
if ( uuidOfHGrid[0] != 0 && grid.uuid[0] != 0 && memcmp(grid.uuid, uuidOfHGrid, 16) )
printf("uuidOfHGrid differ\n");
printf("nvertex %d %d\n", grid.nvertex, gridInqNvertex(gridID));
printf("number %d %d\n", grid.number, gridInqNumber(gridID));
printf("position %d %d\n", grid.position, gridInqPosition(gridID));
*/
if
(
uuidOfHGrid
[
0
]
!=
0
&&
grid
.
uuid
[
0
]
!=
0
)
if
(
!
differ
&&
memcmp
(
uuidOfHGrid
,
grid
.
uuid
,
16
)
!=
0
)
differ
=
1
;
if
(
!
differ
&&
grid
.
nvertex
!=
gridInqNvertex
(
gridID
)
)
differ
=
1
;
if
(
!
differ
&&
grid
.
number
!=
gridInqNumber
(
gridID
)
)
differ
=
1
;
if
(
!
differ
&&
grid
.
position
!=
gridInqPosition
(
gridID
)
)
differ
=
1
;
if
(
!
differ
&&
grid
.
number
>
0
&&
grid
.
position
!=
gridInqPosition
(
gridID
)
)
differ
=
1
;
if
(
!
differ
)
differ
=
compareXYvals2
(
gridID
,
grid
.
size
,
grid
.
xvals
,
grid
.
yvals
);
}
...
...
src/varscan.c
View file @
05e85e71
...
...
@@ -354,12 +354,12 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
if
(
vartable
[
varID
].
gridID
!=
gridID
)
{
Message
(
"param = %s gridID = %d"
,
paramstr
,
gridID
);
Error
(
"horizontal grid must not change for same param!"
);
Error
(
"horizontal grid must not change for same param
eter
!"
);
}
if
(
vartable
[
varID
].
zaxistype
!=
zaxistype
)
{
Message
(
"param = %s zaxistype = %d"
,
paramstr
,
zaxistype
);
Error
(
"zaxistype must not change for same param!"
);
Error
(
"zaxistype must not change for same param
eter
!"
);
}
}
...
...
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