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
fb9ca294
Commit
fb9ca294
authored
Mar 06, 2016
by
Uwe Schulzweida
Browse files
NetCDF: added support for dimension name of z axis
parent
6ef2b413
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
fb9ca294
...
...
@@ -2,6 +2,10 @@
* Version 1.7.2 released
2016-03-06 Uwe Schulzweida
* NetCDF: added support for dimension name of z axis
2016-03-01 Uwe Schulzweida
* NetCDF: added support for dimension name of x and y axis
...
...
src/stream_cdf.c
View file @
fb9ca294
...
...
@@ -2557,17 +2557,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
}
zaxisInqName
(
zaxisID
,
axisname
);
/*
for ( index = 0; index < nzaxis; index++ )
{
if ( streamptr->zaxisID[index] != UNDEFID )
{
zaxisID0 = vlistZaxis(vlistID, index);
zaxisInqName(zaxisID0, zaxisname0);
if ( strcmp(zaxisname0, axisname) == 0 ) ilevel++;
}
}
*/
if
(
dimID
==
UNDEFID
)
{
char
dimname
[
CDI_MAX_NAME
+
3
];
...
...
@@ -2575,13 +2565,9 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
cdiZaxisInqString
(
zaxisID
,
CDI_ZAXIS_DIMNAME
,
CDI_MAX_NAME
,
dimname
);
if
(
dimname
[
0
]
==
0
)
strcpy
(
dimname
,
axisname
);
int
status
=
checkZaxisName
(
'V'
,
axisname
,
fileID
,
vlistID
,
zaxisID
,
nzaxis
);
/*
if ( status == 0 && ndims )
status = checkZaxisName('D', dimname, fileID, vlistID, zaxisID, nzaxis);
*/
if
(
type
==
ZAXIS_REFERENCE
)
cdfDefZaxisUUID
(
streamptr
,
zaxisID
);
checkZaxisName
(
'V'
,
axisname
,
fileID
,
vlistID
,
zaxisID
,
nzaxis
);
if
(
type
==
ZAXIS_REFERENCE
)
cdfDefZaxisUUID
(
streamptr
,
zaxisID
);
if
(
type
==
ZAXIS_HYBRID
||
type
==
ZAXIS_HYBRID_HALF
)
{
...
...
@@ -2589,10 +2575,11 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
}
else
{
dimID
=
checkDimName
(
fileID
,
dimlen
,
dimname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
//printf("def dim %s %s %d\n", dimname, axisname, dimlen);
if
(
ndims
)
cdf_def_dim
(
fileID
,
axisname
,
dimlen
,
&
dimID
);
if
(
ndims
&&
dimID
==
UNDEFID
)
cdf_def_dim
(
fileID
,
dimname
,
dimlen
,
&
dimID
);
zaxisInqLongname
(
zaxisID
,
longname
);
zaxisInqUnits
(
zaxisID
,
units
);
...
...
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