Commit 18d5e9fc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

info: changed output of table and code number to parameter idenifier

parent 7ae4e356
......@@ -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>
......
......@@ -7,11 +7,11 @@ Operator catalog:
-------------------------------------------------------------
Information
-------------------------------------------------------------
Info info Dataset information listed by code number
Info infov Dataset information listed by variable name
Info info Dataset information listed by parameter identifier
Info infon Dataset information listed by parameter 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
......
......@@ -5,7 +5,7 @@
@Section = Information
@Class = Information
@Arguments = ifiles
@Operators = info infov map
@Operators = info infon 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 number
@Title = Dataset information listed by parameter identifier
@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 number and Level
@Item = Parameter identifier 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_infov
@Title = Dataset information listed by variable name
@BeginOperator_infon
@Title = Dataset information listed by parameter name
@BeginDescription
The same as operator @oper{info} but using the name instead of the code
number to identify the variables.
The same as operator @oper{info} but using the name instead of the
identifier to label the parameter.
@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 infov ifile
cdo infon ifile
@EndVerbatim
This is an example result of a dataset with one 2D variable over 12 time steps:
This is an example result of a dataset with one 2D parameter over 12 time steps:
@BeginListing
-1 : Date Time Varname Level Size Miss : Minimum Mean Maximum
-1 : Date Time Name 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
......
......@@ -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
......
......@@ -219,7 +219,7 @@ void printMap(int nlon, int nlat, double *array, double missval, double min, dou
void *Info(void *argument)
{
int INFO, INFOV, INFOP, MAP;
int INFO, INFOP, INFON, INFOC, 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 == INFOV )
fprintf(stdout, "%6d : Date Time Varname Level Size Miss :"
if ( operatorID == INFON )
fprintf(stdout, "%6d : Date Time Name Level Size Miss :"
" Minimum Mean Maximum\n", -(indf+1));
else if ( operatorID == INFOP )
fprintf(stdout, "%6d : Date Time Param Level Size Miss :"
else if ( operatorID == INFOC )
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 == INFOV ) vlistInqVarName(vlistID, varID, varname);
if ( operatorID == INFON ) vlistInqVarName(vlistID, varID, varname);
if ( operatorID == INFOV )
if ( operatorID == INFON )
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);
......
......@@ -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", "infov", "infop", "map"}
#define InfoOperators {"info", "infop", "infon", "infoc", "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" },
......
......@@ -2,7 +2,7 @@
static char *InfoHelp[] = {
"NAME",
" info, infov, map - Information and simple statistics",
" info, infon, 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 number",
" info Dataset information listed by parameter identifier",
" 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 number and Level",
" - Parameter identifier 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!",
" infov Dataset information listed by variable name",
" The same as operator info but using the name instead of the code",
" number to identify the variables.",
" infon Dataset information listed by parameter name",
" The same as operator info but using the name instead of the",
" identifier to label the parameter.",
" 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment