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
1e3ab1cd
Commit
1e3ab1cd
authored
Aug 31, 2017
by
Uwe Schulzweida
Browse files
preparation for reduce_dim of z axis.
parent
5cbc4e9d
Changes
2
Show whitespace changes
Inline
Side-by-side
src/cdf_write.c
View file @
1e3ab1cd
...
...
@@ -986,6 +986,7 @@ void cdf_write_var_data(int fileID, int vlistID, int varID, int ncvarid, int dty
void
cdf_write_var
(
stream_t
*
streamptr
,
int
varID
,
int
memtype
,
const
void
*
data
,
int
nmiss
)
{
if
(
streamptr
->
accessmode
==
0
)
cdfEndDef
(
streamptr
);
// if ( streamptr->ncmode == 0 ) { cdfEndDef(streamptr); streamptr->ncmode = 2; }
size_t
xsize
=
0
,
ysize
=
0
;
size_t
size
;
...
...
@@ -1081,6 +1082,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
const
int
rect
[][
2
],
const
void
*
data
,
int
nmiss
)
{
if
(
streamptr
->
accessmode
==
0
)
cdfEndDef
(
streamptr
);
// if ( streamptr->ncmode == 0 ) { cdfEndDef(streamptr); streamptr->ncmode = 2; }
int
xid
=
CDI_UNDEFID
,
yid
=
CDI_UNDEFID
;
size_t
xsize
=
0
,
ysize
=
0
;
...
...
@@ -1182,6 +1184,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
void
cdf_write_var_slice
(
stream_t
*
streamptr
,
int
varID
,
int
levelID
,
int
memtype
,
const
void
*
data
,
int
nmiss
)
{
if
(
streamptr
->
accessmode
==
0
)
cdfEndDef
(
streamptr
);
// if ( streamptr->ncmode == 0 ) { streamptr->ncmode = 2; cdfEndDef(streamptr); }
size_t
xsize
=
0
,
ysize
=
0
;
size_t
start
[
5
];
...
...
src/stream_cdf_o.c
View file @
1e3ab1cd
...
...
@@ -1495,20 +1495,20 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
size_t
dimlen
=
(
size_t
)
zaxisInqSize
(
zaxisID
);
int
type
=
zaxisInqType
(
zaxisID
);
bool
is_scalar
=
false
;
int
ndims
=
1
;
if
(
dimlen
==
1
)
{
is_scalar
=
zaxisInqScalar
(
zaxisID
)
>
0
;
bool
is_scalar
=
zaxisInqScalar
(
zaxisID
)
>
0
;
if
(
!
is_scalar
&&
CDI_cmor_mode
)
{
is_scalar
=
true
;
zaxisDefScalar
(
zaxisID
);
}
}
int
ndims
=
is_scalar
?
0
:
1
;
if
(
is_scalar
)
ndims
=
0
;
// if ( CDI_reduce_dim ) return;
if
(
dimlen
==
1
)
switch
(
type
)
{
case
ZAXIS_SURFACE
:
...
...
@@ -1526,6 +1526,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
case
ZAXIS_MIX_LAYER
:
return
;
}
}
zaxisInqName
(
zaxisID
,
axisname
);
...
...
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