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
254e51b6
Commit
254e51b6
authored
Jul 13, 2011
by
Uwe Schulzweida
Browse files
added standard name for ZAXIS_HEIGHT
parent
308d84cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf.c
View file @
254e51b6
...
...
@@ -4032,15 +4032,18 @@ int isDBSAxis(const char *longname)
}
static
int
isHeightAxis
(
const
char
*
longname
)
int
isHeightAxis
(
const
char
*
stdname
,
const
char
*
longname
)
{
int
status
=
FALSE
;
if
(
strcmp
(
longname
,
"height"
)
==
0
||
strcmp
(
longname
,
"height above the surface"
)
==
0
)
{
status
=
TRUE
;
}
if
(
strcmp
(
stdname
,
"height"
)
==
0
)
status
=
TRUE
;
if
(
status
==
FALSE
)
if
(
strcmp
(
longname
,
"height"
)
==
0
||
strcmp
(
longname
,
"height above the surface"
)
==
0
)
{
status
=
TRUE
;
}
return
(
status
);
}
...
...
@@ -4784,7 +4787,7 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
{
if
(
isDBSAxis
(
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
longname
)
)
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HEIGHT
;
}
}
...
...
@@ -4867,7 +4870,7 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
{
if
(
isDBSAxis
(
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
longname
)
)
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HEIGHT
;
continue
;
}
...
...
src/zaxis.c
View file @
254e51b6
...
...
@@ -29,7 +29,7 @@ ZaxistypeEntry[] = {
{
2
,
"lev"
,
"hybrid"
,
""
,
"level"
},
{
2
,
"lev"
,
"hybrid_half"
,
""
,
"level"
},
{
2
,
"lev"
,
"pressure"
,
"air_pressure"
,
"Pa"
},
{
1
,
"height"
,
"height"
,
"
"
,
"m"
},
{
1
,
"height"
,
"height"
,
"
height"
,
"m"
},
{
2
,
"depth"
,
"depth_below_sea"
,
""
,
"m"
},
{
2
,
"depth"
,
"depth_below_land"
,
""
,
"cm"
},
{
0
,
"lev"
,
"isentropic"
,
""
,
"K"
},
...
...
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