Skip to content
GitLab
Menu
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
2c52a42b
Commit
2c52a42b
authored
Apr 07, 2016
by
Thomas Jahns
🤸
Browse files
Remove data dependency in cdfDefComplex.
parent
b938aa13
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_o.c
View file @
2c52a42b
...
...
@@ -107,8 +107,7 @@ void cdfDefTimestep(stream_t *streamptr, int tsID)
static
void
cdfDefComplex
(
stream_t
*
streamptr
,
int
gridID
,
int
gridindex
)
{
int
dimID
=
CDI_UNDEFID
;
int
fileID
=
streamptr
->
fileID
;
int
dimID
;
ncgrid_t
*
ncgrid
=
streamptr
->
ncgrid
;
for
(
int
index
=
0
;
index
<
gridindex
;
++
index
)
...
...
@@ -120,23 +119,22 @@ void cdfDefComplex(stream_t *streamptr, int gridID, int gridindex)
if
(
gridtype0
==
GRID_SPECTRAL
||
gridtype0
==
GRID_FOURIER
)
{
dimID
=
ncgrid
[
index
].
ncIDs
[
CDF_DIMID_X
];
break
;
goto
dimIDEstablished
;
}
}
}
if
(
dimID
==
CDI_UNDEFID
)
{
static
const
char
axisname
[]
=
"nc2"
;
size_t
dimlen
=
2
;
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_def_dim
(
fileID
,
axisname
,
dimlen
,
&
dimID
);
cdf_enddef
(
fileID
);
streamptr
->
ncmode
=
2
;
}
{
static
const
char
axisname
[]
=
"nc2"
;
size_t
dimlen
=
2
;
int
fileID
=
streamptr
->
fileID
;
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_def_dim
(
fileID
,
axisname
,
dimlen
,
&
dimID
);
cdf_enddef
(
fileID
);
streamptr
->
ncmode
=
2
;
}
dimIDEstablished:
ncgrid
[
gridindex
].
gridID
=
gridID
;
ncgrid
[
gridindex
].
ncIDs
[
CDF_DIMID_X
]
=
dimID
;
}
...
...
Write
Preview
Supports
Markdown
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