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
65f32915
Commit
65f32915
authored
Jul 18, 2011
by
Uwe Schulzweida
Browse files
added support for zaxis standard name: depth
parent
34e4eab6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf.c
View file @
65f32915
...
...
@@ -4084,15 +4084,18 @@ int isDBLAxis(const char *longname)
}
static
int
isD
BS
Axis
(
const
char
*
longname
)
int
isD
epth
Axis
(
const
char
*
stdname
,
const
char
*
longname
)
{
int
status
=
FALSE
;
if
(
strcmp
(
longname
,
"depth_below_sea"
)
==
0
||
strcmp
(
longname
,
"depth below sea"
)
==
0
)
{
status
=
TRUE
;
}
if
(
strcmp
(
stdname
,
"depth"
)
==
0
)
status
=
TRUE
;
if
(
status
==
FALSE
)
if
(
strcmp
(
longname
,
"depth_below_sea"
)
==
0
||
strcmp
(
longname
,
"depth below sea"
)
==
0
)
{
status
=
TRUE
;
}
return
(
status
);
}
...
...
@@ -4853,7 +4856,7 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
}
else
if
(
strcmp
(
ncvars
[
ncvarid
].
units
,
"m"
)
==
0
)
{
if
(
isD
BS
Axis
(
ncvars
[
ncvarid
].
longname
)
)
if
(
isD
epth
Axis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HEIGHT
;
...
...
@@ -4936,7 +4939,7 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
}
else
if
(
strcmp
(
ncvars
[
ncvarid
].
units
,
"m"
)
==
0
)
{
if
(
isD
BS
Axis
(
ncvars
[
ncvarid
].
longname
)
)
if
(
isD
epth
Axis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
else
if
(
isHeightAxis
(
ncvars
[
ncvarid
].
stdname
,
ncvars
[
ncvarid
].
longname
)
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HEIGHT
;
...
...
src/zaxis.c
View file @
65f32915
...
...
@@ -30,7 +30,7 @@ ZaxistypeEntry[] = {
{
2
,
"lev"
,
"hybrid_half"
,
""
,
"level"
},
{
2
,
"lev"
,
"pressure"
,
"air_pressure"
,
"Pa"
},
{
1
,
"height"
,
"height"
,
"height"
,
"m"
},
{
2
,
"depth"
,
"depth_below_sea"
,
"
"
,
"m"
},
{
2
,
"depth"
,
"depth_below_sea"
,
"
depth"
,
"m"
},
{
2
,
"depth"
,
"depth_below_land"
,
""
,
"cm"
},
{
0
,
"lev"
,
"isentropic"
,
""
,
"K"
},
{
0
,
"lev"
,
"trajectory"
,
""
,
""
},
...
...
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