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
f2f31fd5
Commit
f2f31fd5
authored
Feb 27, 2017
by
Thomas Jahns
🤸
Browse files
Use bool for two-state variable.
parent
88fc2411
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gribapi_utilities.c
View file @
f2f31fd5
...
...
@@ -712,7 +712,12 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
}
if
(
gridtype
==
GRID_GAUSSIAN
||
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_PROJECTION
||
gridtype
==
GRID_LCC
)
GRIB_CHECK
(
grib_get_long
(
gh
,
"uvRelativeToGrid"
,
&
grid
->
uvRelativeToGrid
),
0
);
{
long
temp
;
GRIB_CHECK
(
grib_get_long
(
gh
,
"uvRelativeToGrid"
,
&
temp
),
0
);
assert
(
temp
==
0
||
temp
==
1
);
grid
->
uvRelativeToGrid
=
(
bool
)
temp
;
}
grid
->
type
=
gridtype
;
grid
->
projtype
=
projtype
;
...
...
src/grid.c
View file @
f2f31fd5
...
...
@@ -3941,7 +3941,7 @@ void gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid)
if
(
gridptr
->
uvRelativeToGrid
!=
uvRelativeToGrid
)
{
gridMark4Update
(
gridID
);
gridptr
->
uvRelativeToGrid
=
uvRelativeToGrid
;
gridptr
->
uvRelativeToGrid
=
(
bool
)
uvRelativeToGrid
;
}
}
...
...
src/grid.h
View file @
f2f31fd5
...
...
@@ -104,7 +104,8 @@ struct grid_t {
int
np
;
/* number of parallels between a pole and the equator */
bool
lcomplex
;
bool
hasdims
;
long
uvRelativeToGrid
;
/* Some models deliver wind U,V relative to the grid-cell */
/* Some models deliver wind U,V relative to the grid-cell */
bool
uvRelativeToGrid
;
struct
gridaxis_t
x
;
struct
gridaxis_t
y
;
const
struct
gridVirtTable
*
vtable
;
...
...
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