Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
de622e89
Commit
de622e89
authored
12 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
added operator seinfo
parent
b1b23139
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+8
-0
8 additions, 0 deletions
ChangeLog
src/Sinfo.c
+49
-16
49 additions, 16 deletions
src/Sinfo.c
src/modules.c
+1
-1
1 addition, 1 deletion
src/modules.c
with
58 additions
and
17 deletions
ChangeLog
+
8
−
0
View file @
de622e89
...
...
@@ -3,11 +3,19 @@
* using CDI library version 1.5.8
* Version 1.5.8 released
2012-10-19 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added operator seinfo
2012-10-17 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* eca_rr1: result has wrong long name attribute [Bug #2763]
* eca_pd: disabled, use eca_rr1 (same functionallity) [Bug #2763]
2012-10-14 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added operator tee
2012-10-13 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* remaplaf: fixed bug in binary_search_int()
...
...
This diff is collapsed.
Click to expand it.
src/Sinfo.c
+
49
−
16
View file @
de622e89
...
...
@@ -33,8 +33,9 @@
void
*
Sinfo
(
void
*
argument
)
{
int
SINFO
,
SINFOP
,
SINFON
,
SINFOC
;
enum
{
func_generic
,
func_param
,
func_name
,
func_code
}
;
int
operatorID
;
int
operfunc
,
lensemble
;
int
indf
;
int
varID
;
int
gridsize
=
0
;
...
...
@@ -61,13 +62,20 @@ void *Sinfo(void *argument)
cdoInitialize
(
argument
);
SINFO
=
cdoOperatorAdd
(
"sinfo"
,
0
,
0
,
NULL
);
SINFOP
=
cdoOperatorAdd
(
"sinfop"
,
0
,
0
,
NULL
);
SINFON
=
cdoOperatorAdd
(
"sinfon"
,
0
,
0
,
NULL
);
SINFOC
=
cdoOperatorAdd
(
"sinfoc"
,
0
,
0
,
NULL
);
cdoOperatorAdd
(
"sinfo"
,
func_generic
,
0
,
NULL
);
cdoOperatorAdd
(
"sinfop"
,
func_param
,
0
,
NULL
);
cdoOperatorAdd
(
"sinfon"
,
func_name
,
0
,
NULL
);
cdoOperatorAdd
(
"sinfoc"
,
func_code
,
0
,
NULL
);
cdoOperatorAdd
(
"seinfo"
,
func_generic
,
1
,
NULL
);
cdoOperatorAdd
(
"seinfop"
,
func_param
,
1
,
NULL
);
cdoOperatorAdd
(
"seinfon"
,
func_name
,
1
,
NULL
);
cdoOperatorAdd
(
"seinfoc"
,
func_code
,
1
,
NULL
);
operatorID
=
cdoOperatorID
();
operfunc
=
cdoOperatorF1
(
operatorID
);
lensemble
=
cdoOperatorF2
(
operatorID
);
for
(
indf
=
0
;
indf
<
cdoStreamCnt
();
indf
++
)
{
streamID
=
streamOpenRead
(
cdoStreamName
(
indf
));
...
...
@@ -77,15 +85,30 @@ void *Sinfo(void *argument)
printf
(
" File format: "
);
printFiletype
(
streamID
,
vlistID
);
if
(
operatorID
==
SINFON
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter name
\n
"
,
-
(
indf
+
1
));
else
if
(
operatorID
==
SINFOC
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Table Code
\n
"
,
-
(
indf
+
1
));
if
(
lensemble
)
{
if
(
operfunc
==
func_name
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Einfo Levels Num Gridsize Num Dtype : Parameter name
\n
"
,
-
(
indf
+
1
));
else
if
(
operfunc
==
func_code
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Einfo Levels Num Gridsize Num Dtype : Table Code
\n
"
,
-
(
indf
+
1
));
else
fprintf
(
stdout
,
"%6d : Institut Source Ttype Einfo Levels Num Gridsize Num Dtype : Parameter ID
\n
"
,
-
(
indf
+
1
));
}
else
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter ID
\n
"
,
-
(
indf
+
1
));
{
if
(
operfunc
==
func_name
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter name
\n
"
,
-
(
indf
+
1
));
else
if
(
operfunc
==
func_code
)
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Table Code
\n
"
,
-
(
indf
+
1
));
else
fprintf
(
stdout
,
"%6d : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter ID
\n
"
,
-
(
indf
+
1
));
}
nvars
=
vlistNvars
(
vlistID
);
...
...
@@ -122,6 +145,16 @@ void *Sinfo(void *argument)
else
if
(
tsteptype
==
TSTEP_ACCUM
)
fprintf
(
stdout
,
"%-8s "
,
"accum"
);
else
fprintf
(
stdout
,
"%-8s "
,
"unknown"
);
/* ensemble information */
if
(
lensemble
)
{
int
ensID
,
ensCount
,
forecast_type
;
if
(
vlistInqVarEnsemble
(
vlistID
,
varID
,
&
ensID
,
&
ensCount
,
&
forecast_type
)
)
fprintf
(
stdout
,
"%2d/%-2d "
,
ensID
,
ensCount
);
else
fprintf
(
stdout
,
"--/-- "
);
}
/* layer info */
levelsize
=
zaxisInqSize
(
zaxisID
);
fprintf
(
stdout
,
"%6d "
,
levelsize
);
...
...
@@ -148,11 +181,11 @@ void *Sinfo(void *argument)
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
oper
atorID
==
SINFON
)
vlistInqVarName
(
vlistID
,
varID
,
varname
);
if
(
oper
func
==
func_name
)
vlistInqVarName
(
vlistID
,
varID
,
varname
);
if
(
oper
atorID
==
SINFON
)
if
(
oper
func
==
func_name
)
fprintf
(
stdout
,
"%-11s"
,
varname
);
else
if
(
oper
atorID
==
SINFOC
)
else
if
(
oper
func
==
func_code
)
fprintf
(
stdout
,
"%4d %4d"
,
tabnum
,
code
);
else
fprintf
(
stdout
,
"%-11s"
,
paramstr
);
...
...
This diff is collapsed.
Click to expand it.
src/modules.c
+
1
−
1
View file @
de622e89
...
...
@@ -397,7 +397,7 @@ void *Maggraph(void *argument);
#define ScatterOperators {"scatter"}
#define ShowinfoOperators {"showyear", "showmon", "showdate", "showtime", "showtimestamp", "showcode", "showunit", \
"showparam", "showname", "showstdname", "showlevel", "showltype", "showformat"}
#define SinfoOperators {"sinfo", "sinfop", "sinfon", "sinfoc"}
#define SinfoOperators {"sinfo", "sinfop", "sinfon", "sinfoc"
, "seinfo", "seinfop", "seinfon", "seinfoc"
}
#define Smooth9Operators {"smooth9"}
#define SortOperators {"sortcode", "sortname", "sortlevel"}
#define SorttimestampOperators {"sorttimestamp", "sorttaxis"}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment