Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
18d5e9fc
Commit
18d5e9fc
authored
Mar 11, 2011
by
Uwe Schulzweida
Browse files
info: changed output of table and code number to parameter idenifier
parent
7ae4e356
Changes
7
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
18d5e9fc
...
...
@@ -5,7 +5,8 @@
2011-03-11 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* sinfo: changed output of table and code number to parameter idenifier
* info: changed output of table and code number to parameter idenifier
* sinfo: changed output of table and code number to parameter idenifier
2011-03-09 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
OPERATORS
View file @
18d5e9fc
...
...
@@ -7,11 +7,11 @@ Operator catalog:
-------------------------------------------------------------
Information
-------------------------------------------------------------
Info info Dataset information listed by
code numb
er
Info info
v
Dataset information listed by
v
ar
iable
name
Info info Dataset information listed by
parameter identifi
er
Info info
n
Dataset information listed by
p
ar
ameter
name
Info map Dataset information and simple map
Sinfo sinfo Short
dataset
information listed by parameter identifier
Sinfo sinfon Short
dataset
information listed by parameter name
Sinfo sinfo Short information listed by parameter identifier
Sinfo sinfon Short information listed by parameter name
Diff diff Compare two datasets listed by code number
Diff diffv Compare two datasets listed by variable name
Ninfo npar Number of parameters
...
...
doc/tex/mod/Info
View file @
18d5e9fc
...
...
@@ -5,7 +5,7 @@
@Section = Information
@Class = Information
@Arguments = ifiles
@Operators = info info
v
map
@Operators = info info
n
map
@BeginDescription
This module writes information about the structure and contents
...
...
@@ -17,14 +17,14 @@ The information displayed depends on the chosen operator.
@BeginOperator_info
@Title = Dataset information listed by
code numb
er
@Title = Dataset information listed by
parameter identifi
er
@BeginDescription
Prints information and simple statistics for each field of all
input datasets. For each field the operator prints one line with the following elements:
@BeginItemize
@Item = Date and Time
@Item =
Code numb
er and Level
@Item =
Parameter identifi
er and Level
@Item = Size of the grid and number of Missing values
@Item = Minimum, Mean and Maximum \\
The mean value is computed without the use of area weights!
...
...
@@ -33,12 +33,12 @@ The mean value is computed without the use of area weights!
@EndOperator
@BeginOperator_info
v
@Title = Dataset information listed by
v
ar
iable
name
@BeginOperator_info
n
@Title = Dataset information listed by
p
ar
ameter
name
@BeginDescription
The same as operator @oper{info} but using the name instead of the
code
number to identify
the
v
ar
iables
.
The same as operator @oper{info} but using the name instead of the
identifier to label
the
p
ar
ameter
.
@EndDescription
@EndOperator
...
...
@@ -56,11 +56,11 @@ datasets. The map will be printed only for fields on a regular lon/lat grid.
@BeginExample
To print information and simple statistics for each field of a dataset use:
@BeginVerbatim
cdo info
v
ifile
cdo info
n
ifile
@EndVerbatim
This is an example result of a dataset with one 2D
v
ar
iable
over 12 time steps:
This is an example result of a dataset with one 2D
p
ar
ameter
over 12 time steps:
@BeginListing
-1 : Date Time
Varn
ame Level Size Miss : Minimum Mean Maximum
-1 : Date Time
N
ame
Level Size Miss : Minimum Mean Maximum
1 : 1987-01-31 12:00:00 SST 0 2048 1361 : 232.77 266.65 305.31
2 : 1987-02-28 12:00:00 SST 0 2048 1361 : 233.64 267.11 307.15
3 : 1987-03-31 12:00:00 SST 0 2048 1361 : 225.31 267.52 307.67
...
...
doc/tex/mod/Sinfo
View file @
18d5e9fc
...
...
@@ -17,7 +17,7 @@ The information displayed depends on the chosen operator.
@BeginOperator_sinfo
@Title = Short
dataset
information listed by parameter identifier
@Title = Short information listed by parameter identifier
@BeginDescription
Prints short information of a dataset. The information is divided into
...
...
@@ -35,7 +35,7 @@ And the last section contains short information of the time axis.
@BeginOperator_sinfon
@Title = Short
dataset
information listed by parameter name
@Title = Short information listed by parameter name
@BeginDescription
The same as operator @oper{sinfo} but using the name instead of the
...
...
src/Info.c
View file @
18d5e9fc
...
...
@@ -219,7 +219,7 @@ void printMap(int nlon, int nlat, double *array, double missval, double min, dou
void
*
Info
(
void
*
argument
)
{
int
INFO
,
INFO
V
,
INFO
P
,
MAP
;
int
INFO
,
INFO
P
,
INFON
,
INFO
C
,
MAP
;
int
operatorID
;
int
i
;
int
indf
,
indg
;
...
...
@@ -248,8 +248,9 @@ void *Info(void *argument)
cdoInitialize
(
argument
);
INFO
=
cdoOperatorAdd
(
"info"
,
0
,
0
,
NULL
);
INFOV
=
cdoOperatorAdd
(
"infov"
,
0
,
0
,
NULL
);
INFOP
=
cdoOperatorAdd
(
"infop"
,
0
,
0
,
NULL
);
INFON
=
cdoOperatorAdd
(
"infon"
,
0
,
0
,
NULL
);
INFOC
=
cdoOperatorAdd
(
"infoc"
,
0
,
0
,
NULL
);
MAP
=
cdoOperatorAdd
(
"map"
,
0
,
0
,
NULL
);
operatorID
=
cdoOperatorID
();
...
...
@@ -282,14 +283,14 @@ void *Info(void *argument)
{
if
(
(
tsID
==
0
&&
recID
==
0
)
||
operatorID
==
MAP
)
{
if
(
operatorID
==
INFO
V
)
fprintf
(
stdout
,
"%6d : Date Time
Varname
Level Size Miss :"
if
(
operatorID
==
INFO
N
)
fprintf
(
stdout
,
"%6d : Date Time
Name
Level Size Miss :"
" Minimum Mean Maximum
\n
"
,
-
(
indf
+
1
));
else
if
(
operatorID
==
INFO
P
)
fprintf
(
stdout
,
"%6d : Date Time
Param
Level Size Miss :"
else
if
(
operatorID
==
INFO
C
)
fprintf
(
stdout
,
"%6d : Date Time
Code
Level Size Miss :"
" Minimum Mean Maximum
\n
"
,
-
(
indf
+
1
));
else
fprintf
(
stdout
,
"%6d : Date Time
Code
Level Size Miss :"
fprintf
(
stdout
,
"%6d : Date Time
Param
Level Size Miss :"
" Minimum Mean Maximum
\n
"
,
-
(
indf
+
1
));
}
...
...
@@ -307,14 +308,14 @@ void *Info(void *argument)
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
operatorID
==
INFO
V
)
vlistInqVarName
(
vlistID
,
varID
,
varname
);
if
(
operatorID
==
INFO
N
)
vlistInqVarName
(
vlistID
,
varID
,
varname
);
if
(
operatorID
==
INFO
V
)
if
(
operatorID
==
INFO
N
)
fprintf
(
stdout
,
"%6d :%s %s %-10s "
,
indg
,
vdatestr
,
vtimestr
,
varname
);
else
if
(
operatorID
==
INFOP
)
fprintf
(
stdout
,
"%6d :%s %s %-10s "
,
indg
,
vdatestr
,
vtimestr
,
paramstr
);
else
else
if
(
operatorID
==
INFOC
)
fprintf
(
stdout
,
"%6d :%s %s %3d "
,
indg
,
vdatestr
,
vtimestr
,
code
);
else
fprintf
(
stdout
,
"%6d :%s %s %-10s "
,
indg
,
vdatestr
,
vtimestr
,
paramstr
);
level
=
zaxisInqLevel
(
zaxisID
,
levelID
);
fprintf
(
stdout
,
"%7g "
,
level
);
...
...
src/modules.c
View file @
18d5e9fc
...
...
@@ -302,7 +302,7 @@ void *Wct(void *argument);
#define ImportbinaryOperators {"import_binary", "import_grads"}
#define ImportcmsafOperators {"import_cmsaf"}
#define ImportobsOperators {"import_obs"}
#define InfoOperators {"info", "info
v
", "info
p
", "map"}
#define InfoOperators {"info", "info
p", "infon
", "info
c
", "map"}
#define InputOperators {"input", "inputsrv", "inputext"}
#define IntgridOperators {"intgridbil", "intpoint", "interpolate", "boxavg", "thinout"}
#define IntgridtrajOperators {"intgridtraj"}
...
...
@@ -723,6 +723,7 @@ static char *opalias[][2] =
{
"globavg"
,
"fldavg"
},
{
"gradsdes"
,
"gradsdes2"
},
{
"infos"
,
"sinfo"
},
{
"infov"
,
"infon"
},
{
"intgrid"
,
"intgridbil"
},
{
"log"
,
"ln"
},
{
"lmean"
,
"ymonmean"
},
...
...
src/operator_help.h
View file @
18d5e9fc
...
...
@@ -2,7 +2,7 @@
static
char
*
InfoHelp
[]
=
{
"NAME"
,
" info, info
v
, map - Information and simple statistics"
,
" info, info
n
, map - Information and simple statistics"
,
""
,
"SYNOPSIS"
,
" <operator> ifiles"
,
...
...
@@ -14,17 +14,17 @@ static char *InfoHelp[] = {
" The information displayed depends on the chosen operator."
,
""
,
"OPERATORS"
,
" info Dataset information listed by
code numb
er"
,
" info Dataset information listed by
parameter identifi
er"
,
" Prints information and simple statistics for each field of all"
,
" input datasets. For each field the operator prints one line with the following elements:"
,
" - Date and Time"
,
" -
Code numb
er and Level"
,
" -
Parameter identifi
er and Level"
,
" - Size of the grid and number of Missing values"
,
" - Minimum, Mean and Maximum
\\
"
,
" The mean value is computed without the use of area weights!"
,
" info
v
Dataset information listed by
v
ar
iable
name"
,
" The same as operator info but using the name instead of the
code
"
,
"
number to identify
the
v
ar
iables
."
,
" info
n
Dataset information listed by
p
ar
ameter
name"
,
" The same as operator info but using the name instead of the"
,
"
identifier to label
the
p
ar
ameter
."
,
" map Dataset information and simple map"
,
" Prints information, simple statistics and a map for each field of all input"
,
" datasets. The map will be printed only for fields on a regular lon/lat grid."
,
...
...
@@ -45,7 +45,7 @@ static char *SinfoHelp[] = {
" The information displayed depends on the chosen operator."
,
""
,
"OPERATORS"
,
" sinfo Short
dataset
information listed by parameter identifier"
,
" sinfo Short information listed by parameter identifier"
,
" Prints short information of a dataset. The information is divided into"
,
" 4 sections. Section 1 prints one line per parameter with the following information:"
,
" - institute and source"
,
...
...
@@ -54,7 +54,7 @@ static char *SinfoHelp[] = {
" - number of vertical levels and z-axis number"
,
" Section 2 and 3 gives a short overview of all horizontal and vertical grids."
,
" And the last section contains short information of the time axis."
,
" sinfon Short
dataset
information listed by parameter name"
,
" sinfon Short information listed by parameter name"
,
" The same as operator sinfo but using the name instead of the "
,
" identifier to label the parameter."
,
NULL
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment