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
866ba861
Commit
866ba861
authored
Sep 09, 2016
by
Uwe Schulzweida
Browse files
Set zaxistype to ZAXIS_PRESSURE only if zaxistype is undefined.
parent
a42ea933
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
866ba861
...
...
@@ -858,7 +858,6 @@ static
bool
isHybridSigmaPressureCoordinate
(
int
ncid
,
int
ncvarid
,
ncvar_t
*
ncvars
,
const
ncdim_t
*
ncdims
)
{
bool
status
=
false
;
int
ncfvarid
=
ncvarid
;
ncvar_t
*
ncvar
=
&
ncvars
[
ncvarid
];
if
(
strcmp
(
ncvar
->
stdname
,
"atmosphere_hybrid_sigma_pressure_coordinate"
)
==
0
)
...
...
@@ -872,6 +871,7 @@ bool isHybridSigmaPressureCoordinate(int ncid, int ncvarid, ncvar_t *ncvars, con
int
ret
;
int
apvarid1
=
-
1
,
bvarid1
=
-
1
,
psvarid1
=
-
1
,
avarid1
=
-
1
,
p0varid1
=
-
1
;
int
ncfvarid
=
ncvarid
;
if
(
ncvars
[
ncfvarid
].
lformula
&&
ncvars
[
ncfvarid
].
lformulaterms
)
ret
=
scan_hybrid_formula
(
ncid
,
ncfvarid
,
&
apvarid1
,
&
bvarid1
,
&
psvarid1
,
&
avarid1
,
&
p0varid1
);
if
(
apvarid1
!=
-
1
)
ncvars
[
apvarid1
].
isvar
=
FALSE
;
...
...
@@ -1931,11 +1931,6 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
ncvars
[
ncvarid
].
isy
=
true
;
continue
;
}
else
if
(
is_pressure_units
(
ncvars
[
ncvarid
].
units
)
)
{
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_PRESSURE
;
continue
;
}
else
if
(
strcmp
(
ncvars
[
ncvarid
].
units
,
"level"
)
==
0
||
strcmp
(
ncvars
[
ncvarid
].
units
,
"1"
)
==
0
)
{
if
(
strcmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at layer midpoints"
)
==
0
)
...
...
@@ -1950,6 +1945,11 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_GENERIC
;
continue
;
}
else
if
(
ncvars
[
ncvarid
].
zaxistype
==
UNDEFID
&&
is_pressure_units
(
ncvars
[
ncvarid
].
units
)
)
{
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_PRESSURE
;
continue
;
}
else
if
(
is_DBL_axis
(
ncvars
[
ncvarid
].
longname
)
)
{
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_DEPTH_BELOW_LAND
;
...
...
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