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
365db31d
Commit
365db31d
authored
Sep 04, 2018
by
Uwe Schulzweida
Browse files
CDI_reduce_dim: wrong result when reduce time dimension (bug fix).
parent
d92ff985
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
365db31d
...
...
@@ -4,7 +4,8 @@
2018-09-04 Uwe Schulzweida
* NetCDF: added support for single scalar variable
* CDI_reduce_dim: wrong result when reduce time dimension (bug fix)
* NetCDF: added support for single scalar variable
2018-08-10 Uwe Schulzweida
...
...
src/cdf_write.c
View file @
365db31d
...
...
@@ -1029,7 +1029,7 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
int
zaxisindex
=
vlistZaxisIndex
(
vlistID
,
zaxisID
);
int
zid
=
streamptr
->
zaxisID
[
zaxisindex
];
if
(
timetype
!=
TIME_CONSTANT
)
if
(
vlistHasTime
(
vlistID
)
&&
timetype
!=
TIME_CONSTANT
)
{
start
[
ndims
]
=
(
size_t
)
ntsteps
-
1
;
count
[
ndims
]
=
1
;
...
...
@@ -1123,7 +1123,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
int
zaxisindex
=
vlistZaxisIndex
(
vlistID
,
zaxisID
);
int
zid
=
streamptr
->
zaxisID
[
zaxisindex
];
if
(
timetype
!=
TIME_CONSTANT
)
if
(
vlistHasTime
(
vlistID
)
&&
timetype
!=
TIME_CONSTANT
)
{
start
[
ndims
]
=
(
size_t
)
ntsteps
-
1
;
count
[
ndims
]
=
1
;
...
...
@@ -1222,7 +1222,7 @@ void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
bool
swapxy
=
(
dimorder
[
2
]
==
2
||
dimorder
[
0
]
==
1
)
&&
xid
!=
CDI_UNDEFID
&&
yid
!=
CDI_UNDEFID
;
size_t
ndims
=
0
;
if
(
timetype
!=
TIME_CONSTANT
)
if
(
vlistHasTime
(
vlistID
)
&&
timetype
!=
TIME_CONSTANT
)
{
start
[
ndims
]
=
(
size_t
)
ntsteps
-
1
;
count
[
ndims
]
=
1
;
...
...
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