Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
4228a779
Commit
4228a779
authored
Nov 26, 2014
by
Thomas Jahns
🤸
Browse files
Merge declaration and initialization.
parent
1bef0ac7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf.c
View file @
4228a779
...
...
@@ -786,15 +786,13 @@ void cdf_write_record(stream_t *streamptr, int memtype, const void *data, int nm
void
cdfReadRecord
(
stream_t
*
streamptr
,
double
*
data
,
int
*
nmiss
)
{
int
levelID
,
varID
,
tsID
,
recID
,
vrecID
;
if
(
CDI_Debug
)
Message
(
"streamID = %d"
,
streamptr
->
self
);
tsID
=
streamptr
->
curTsID
;
vrecID
=
streamptr
->
tsteps
[
tsID
].
curRecID
;
recID
=
streamptr
->
tsteps
[
tsID
].
recIDs
[
vrecID
];
varID
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
varID
;
levelID
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
levelID
;
int
tsID
=
streamptr
->
curTsID
;
int
vrecID
=
streamptr
->
tsteps
[
tsID
].
curRecID
;
int
recID
=
streamptr
->
tsteps
[
tsID
].
recIDs
[
vrecID
];
int
varID
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
varID
;
int
levelID
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
levelID
;
cdfReadVarSliceDP
(
streamptr
,
varID
,
levelID
,
data
,
nmiss
);
}
...
...
@@ -802,16 +800,12 @@ void cdfReadRecord(stream_t *streamptr, double *data, int *nmiss)
static
void
cdfDefTimeValue
(
stream_t
*
streamptr
,
int
tsID
)
{
int
fileID
;
int
ncvarid
;
taxis_t
*
taxis
;
fileID
=
streamptr
->
fileID
;
int
fileID
=
streamptr
->
fileID
;
if
(
CDI_Debug
)
Message
(
"streamID = %d, fileID = %d"
,
streamptr
->
self
,
fileID
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
taxis
_t
*
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
streamptr
->
ncmode
==
1
)
{
...
...
@@ -824,7 +818,7 @@ void cdfDefTimeValue(stream_t *streamptr, int tsID)
double
timevalue
=
cdiEncodeTimeval
(
taxis
->
vdate
,
taxis
->
vtime
,
&
streamptr
->
tsteps
[
0
].
taxis
);
if
(
CDI_Debug
)
Message
(
"tsID = %d timevalue = %f"
,
tsID
,
timevalue
);
ncvarid
=
streamptr
->
basetime
.
ncvarid
;
int
ncvarid
=
streamptr
->
basetime
.
ncvarid
;
cdf_put_var1_double
(
fileID
,
ncvarid
,
&
index
,
&
timevalue
);
if
(
taxis
->
has_bounds
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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