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
a636b8f4
Commit
a636b8f4
authored
Apr 07, 2016
by
Thomas Jahns
🤸
Browse files
Shorten unitIsHeight.
parent
e86fbe04
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cdf_util.c
View file @
a636b8f4
...
...
@@ -94,14 +94,11 @@ bool is_timeaxis_units(const char *timeunits)
bool
is_height_units
(
const
char
*
units
)
{
bool
status
=
false
;
int
u0
=
units
[
0
];
if
(
(
u0
==
'm'
&&
(
!
units
[
1
]
||
strncmp
(
units
,
"meter"
,
5
)
==
0
))
||
(
!
units
[
2
]
&&
units
[
1
]
==
'm'
&&
(
u0
==
'c'
||
u0
==
'd'
||
u0
==
'k'
))
)
{
status
=
true
;
}
bool
status
=
(
u0
==
'm'
&&
(
!
units
[
1
]
||
strncmp
(
units
,
"meter"
,
5
)
==
0
))
||
(
!
units
[
2
]
&&
units
[
1
]
==
'm'
&&
(
u0
==
'c'
||
u0
==
'd'
||
u0
==
'k'
));
return
status
;
}
...
...
src/stream_cdf_i.c
View file @
a636b8f4
...
...
@@ -1938,10 +1938,8 @@ void grid_set_chunktype(grid_t *grid, ncvar_t *ncvar)
if
(
grid
->
type
==
GRID_UNSTRUCTURED
)
{
if
(
ncvar
->
chunks
[
ndims
-
1
]
==
grid
->
size
)
ncvar
->
chunktype
=
CDI_CHUNK_GRID
;
else
ncvar
->
chunktype
=
CDI_CHUNK_AUTO
;
ncvar
->
chunktype
=
ncvar
->
chunks
[
ndims
-
1
]
==
grid
->
size
?
CDI_CHUNK_GRID
:
CDI_CHUNK_AUTO
;
}
else
{
...
...
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