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
a8c2d179
Commit
a8c2d179
authored
Apr 29, 2019
by
Uwe Schulzweida
Browse files
Simplify if statement.
parent
659194a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cdf_read.c
View file @
a8c2d179
...
...
@@ -726,7 +726,6 @@ void cdfReadVarSliceDPPart(stream_t *streamptr, int varID, int levelID, int varT
cdfGetSliceSlapDescription
(
streamptr
,
varID
,
levelID
,
&
swapxy
,
&
start
,
&
count
);
const
int
gridId
=
vlistInqVarGrid
(
vlistID
,
varID
);
//int time = vlistInqVarTsteptype(vlistID, varID);
const
size_t
gridsize
=
gridInqSize
(
gridId
);
unsigned
int
position
=
0
;
...
...
@@ -758,7 +757,6 @@ void cdfReadVarSliceSPPart(stream_t *streamptr, int varID, int levelID, int varT
cdfGetSliceSlapDescription
(
streamptr
,
varID
,
levelID
,
&
swapxy
,
&
start
,
&
count
);
const
int
gridId
=
vlistInqVarGrid
(
vlistID
,
varID
);
// int time = vlistInqVarTsteptype(vlistID, varID);
size_t
gridsize
=
gridInqSize
(
gridId
);
unsigned
int
position
=
0
;
...
...
@@ -831,17 +829,9 @@ void cdfReadVarDPPart(stream_t *streamptr, int varID, int varType, int startpoin
size_t
start
[
4
],
count
[
4
];
cdfGetSlapDescription
(
streamptr
,
varID
,
&
start
,
&
count
);
const
int
timetype
=
vlistInqVarTimetype
(
vlistID
,
varID
);
if
(
timetype
)
{
start
[
2
]
=
start
[
2
]
+
startpoint
;
count
[
2
]
=
length
;
}
else
{
start
[
1
]
=
start
[
1
]
+
startpoint
;
count
[
1
]
=
length
;
}
const
int
ltime
=
TIME_CONSTANT
!=
vlistInqVarTimetype
(
vlistID
,
varID
);
start
[
1
+
ltime
]
=
start
[
1
+
ltime
]
+
startpoint
;
count
[
1
+
ltime
]
=
length
;
cdf_get_vara_double
(
streamptr
->
fileID
,
ncvarid
,
start
,
count
,
data
);
...
...
@@ -859,17 +849,9 @@ void cdfReadVarSPPart(stream_t *streamptr, int varID, int varType, int startpoin
size_t
start
[
4
],
count
[
4
];
cdfGetSlapDescription
(
streamptr
,
varID
,
&
start
,
&
count
);
const
int
timetype
=
vlistInqVarTimetype
(
vlistID
,
varID
);
if
(
timetype
)
{
start
[
2
]
=
start
[
2
]
+
startpoint
;
count
[
2
]
=
length
;
}
else
{
start
[
1
]
=
start
[
1
]
+
startpoint
;
count
[
1
]
=
length
;
}
const
int
ltime
=
TIME_CONSTANT
!=
vlistInqVarTimetype
(
vlistID
,
varID
);
start
[
1
+
ltime
]
=
start
[
1
+
ltime
]
+
startpoint
;
count
[
1
+
ltime
]
=
length
;
cdf_get_vara_float
(
streamptr
->
fileID
,
ncvarid
,
start
,
count
,
data
);
...
...
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