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
fad1fa14
Commit
fad1fa14
authored
Jun 07, 2012
by
Uwe Schulzweida
Browse files
cdi.c cleanup
parent
a3196ad3
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/cdi.c
View file @
fad1fa14
...
...
@@ -268,7 +268,7 @@ void printShortinfo(int streamID, int vlistID, int vardis)
int
nrecs
,
nvars
,
nzaxis
,
ntsteps
;
int
levelID
,
levelsize
;
int
tsID
,
ntimeout
;
int
tstep
ID
,
taxisID
;
int
tstep
type
,
taxisID
;
int
nbyte
,
nbyte0
;
int
index
;
char
varname
[
CDI_MAX_NAME
];
...
...
@@ -320,17 +320,17 @@ void printShortinfo(int streamID, int vlistID, int vardis)
fprintf
(
stdout
,
"unknown "
);
if
(
vardis
)
fprintf
(
stdout
,
"%-1
2s
"
,
varname
);
fprintf
(
stdout
,
"%-1
1s
"
,
varname
);
else
fprintf
(
stdout
,
"%-1
2s
"
,
paramstr
);
fprintf
(
stdout
,
"%-1
1s
"
,
paramstr
);
tstep
ID
=
vlistInqVarTsteptype
(
vlistID
,
varID
);
if
(
tstep
ID
==
TSTEP_CONSTANT
)
fprintf
(
stdout
,
"%-8s"
,
"constant"
);
else
if
(
tstep
ID
==
TSTEP_INSTANT
)
fprintf
(
stdout
,
"%-8s"
,
"instant"
);
else
if
(
tstep
ID
==
TSTEP_MIN
)
fprintf
(
stdout
,
"%-8s"
,
"min"
);
else
if
(
tstep
ID
==
TSTEP_MAX
)
fprintf
(
stdout
,
"%-8s"
,
"max"
);
else
if
(
tstep
ID
==
TSTEP_ACCUM
)
fprintf
(
stdout
,
"%-8s"
,
"accum"
);
else
fprintf
(
stdout
,
"%-8s"
,
"unknown"
);
tstep
type
=
vlistInqVarTsteptype
(
vlistID
,
varID
);
if
(
tstep
type
==
TSTEP_CONSTANT
)
fprintf
(
stdout
,
"%-8s"
,
"constant"
);
else
if
(
tstep
type
==
TSTEP_INSTANT
)
fprintf
(
stdout
,
"%-8s"
,
"instant"
);
else
if
(
tstep
type
==
TSTEP_MIN
)
fprintf
(
stdout
,
"%-8s"
,
"min"
);
else
if
(
tstep
type
==
TSTEP_MAX
)
fprintf
(
stdout
,
"%-8s"
,
"max"
);
else
if
(
tstep
type
==
TSTEP_ACCUM
)
fprintf
(
stdout
,
"%-8s"
,
"accum"
);
else
fprintf
(
stdout
,
"%-8s"
,
"unknown"
);
datatype
=
vlistInqVarDatatype
(
vlistID
,
varID
);
...
...
@@ -432,7 +432,7 @@ void printShortinfo(int streamID, int vlistID, int vardis)
if
(
taxisID
!=
CDI_UNDEFID
)
{
int
calendar
,
unit
;
int
calendar
,
t
unit
s
;
if
(
taxisInqType
(
taxisID
)
==
TAXIS_RELATIVE
)
{
...
...
@@ -445,20 +445,26 @@ void printShortinfo(int streamID, int vlistID, int vardis)
fprintf
(
stdout
,
" RefTime = %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d"
,
year
,
month
,
day
,
hour
,
minute
,
second
);
unit
=
taxisInqTunit
(
taxisID
);
if
(
unit
!=
CDI_UNDEFID
)
t
unit
s
=
taxisInqTunit
(
taxisID
);
if
(
t
unit
s
!=
CDI_UNDEFID
)
{
if
(
unit
==
TUNIT_YEAR
)
if
(
t
unit
s
==
TUNIT_YEAR
)
fprintf
(
stdout
,
" Units = years"
);
else
if
(
unit
==
TUNIT_MONTH
)
else
if
(
t
unit
s
==
TUNIT_MONTH
)
fprintf
(
stdout
,
" Units = months"
);
else
if
(
unit
==
TUNIT_DAY
)
else
if
(
t
unit
s
==
TUNIT_DAY
)
fprintf
(
stdout
,
" Units = days"
);
else
if
(
unit
==
TUNIT_HOUR
)
else
if
(
tunits
==
TUNIT_12HOURS
)
fprintf
(
stdout
,
" Units = 12hours"
);
else
if
(
tunits
==
TUNIT_6HOURS
)
fprintf
(
stdout
,
" Units = 6hours"
);
else
if
(
tunits
==
TUNIT_3HOURS
)
fprintf
(
stdout
,
" Units = 3hours"
);
else
if
(
tunits
==
TUNIT_HOUR
)
fprintf
(
stdout
,
" Units = hours"
);
else
if
(
unit
==
TUNIT_MINUTE
)
else
if
(
t
unit
s
==
TUNIT_MINUTE
)
fprintf
(
stdout
,
" Units = minutes"
);
else
if
(
unit
==
TUNIT_SECOND
)
else
if
(
t
unit
s
==
TUNIT_SECOND
)
fprintf
(
stdout
,
" Units = seconds"
);
else
fprintf
(
stdout
,
" Units = unknown"
);
...
...
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