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
1d8b846c
Commit
1d8b846c
authored
Mar 11, 2011
by
Uwe Schulzweida
Browse files
diff: changed output of code number to parameter idenifier
parent
18d5e9fc
Changes
9
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1d8b846c
...
...
@@ -5,8 +5,9 @@
2011-03-11 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* info: changed output of table and code number to parameter idenifier
* sinfo: changed output of table and code number to parameter idenifier
* info: changed output of code number to parameter idenifier
* diff: changed output of code number to parameter idenifier
2011-03-09 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
NEWS
View file @
1d8b846c
...
...
@@ -8,9 +8,10 @@ Version 1.5.0 (?? March 2011):
* Added support for netCDF level bounds
* Added option -O to overwrite existing output file (only for ens<STAT>, merge, mergetime)
Changed operators:
* sinfov: renamed to sinfon
* sinfo: changed output of table and code number to parameter idenifier
* expr: added functions abs(), int(), nint(), sqr()
* sinfo: changed output of table and code number to parameter idenifier
* info: changed output of code number to parameter idenifier
* diff: changed output of code number to parameter idenifier
Fixed bugs:
* sellonlatbox: does not work as expected when selecting all longitutes
* sellonlatbox: initialization missing for unstructured grids
...
...
OPERATORS
View file @
1d8b846c
...
...
@@ -12,8 +12,8 @@ Operator catalog:
Info map Dataset information and simple map
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 diff
v
Compare two datasets listed by
v
ar
iable
name
Diff diff Compare two datasets listed by
parameter id
Diff diff
n
Compare two datasets listed by
p
ar
ameter
name
Ninfo npar Number of parameters
Ninfo nlevel Number of levels
Ninfo nyear Number of years
...
...
doc/tex/mod/Diff
View file @
1d8b846c
...
...
@@ -5,7 +5,7 @@
@Section = Information
@Class = Information
@Arguments = ifile1 ifile2
@Operators = diff diff
v
@Operators = diff diff
n
@BeginDescription
Compares the contents of two datasets field by field. The input
...
...
@@ -16,14 +16,14 @@ the same header information and dimensions.
@BeginOperator_diff
@Title = Compare two datasets listed by
code number
@Title = Compare two datasets listed by
parameter id
@BeginDescription
Provides statistics on differences between two datasets.
For each pair of fields the operator prints one line with the following information:
@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 = Occurrence of coefficient pairs with different signs (S)
@Item = Occurrence of zero values (Z)
...
...
@@ -42,12 +42,12 @@ For each pair of fields the operator prints one line with the following informat
@EndOperator
@BeginOperator_diff
v
@Title = Compare two datasets listed by
v
ar
iable
name
@BeginOperator_diff
n
@Title = Compare two datasets listed by
p
ar
ameter
name
@BeginDescription
The same as operator @oper{diff}. Using the name instead of the
code number
to
identif
y
the
v
ar
iable
.
The same as operator @oper{diff}. Using the name instead of the
identif
ier to label
the
p
ar
ameter
.
@EndDescription
@EndOperator
...
...
@@ -55,11 +55,11 @@ to identify the variable.
@BeginExample
To print the difference for each field of two datasets use:
@BeginVerbatim
cdo diff
v
ifile1 ifile2
cdo diff
n
ifile1 ifile2
@EndVerbatim
This is an example result of two datasets with one 2D
v
ar
iable
over 12 time steps:
This is an example result of two datasets with one 2D
p
ar
ameter
over 12 time steps:
@BeginListing
Date Time
Varn
ame Level Size Miss : S Z Max_Absdiff Max_Reldiff
Date Time
N
ame
Level Size Miss : S Z Max_Absdiff Max_Reldiff
1 : 1987-01-31 12:00:00 SST 0 2048 1361 : F F 0.00010681 4.1660e-07
2 : 1987-02-28 12:00:00 SST 0 2048 1361 : F F 6.1035e-05 2.3742e-07
3 : 1987-03-31 12:00:00 SST 0 2048 1361 : F F 7.6294e-05 3.3784e-07
...
...
doc/tex/mod/Info
View file @
1d8b846c
...
...
@@ -21,7 +21,8 @@ The information displayed depends on the chosen operator.
@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:
input datasets. For each field the operator prints one line with
the following elements:
@BeginItemize
@Item = Date and Time
@Item = Parameter identifier and Level
...
...
doc/tex/mod/Sinfo
View file @
1d8b846c
...
...
@@ -21,7 +21,8 @@ The information displayed depends on the chosen operator.
@BeginDescription
Prints short information of a dataset. The information is divided into
4 sections. Section 1 prints one line per parameter with the following information:
4 sections. Section 1 prints one line per parameter with the following
information:
@BeginItemize
@Item = institute and source
@Item = parameter identifier
...
...
src/Diff.c
View file @
1d8b846c
...
...
@@ -30,7 +30,7 @@
void
*
Diff
(
void
*
argument
)
{
int
DIFF
,
DIFFP
,
DIFF
V
,
SDIFF
;
int
DIFF
,
DIFFP
,
DIFF
N
,
DIFFC
,
SDIFF
;
int
operatorID
;
int
i
;
int
indg
;
...
...
@@ -59,7 +59,8 @@ void *Diff(void *argument)
DIFF
=
cdoOperatorAdd
(
"diff"
,
0
,
0
,
NULL
);
DIFFP
=
cdoOperatorAdd
(
"diffp"
,
0
,
0
,
NULL
);
DIFFV
=
cdoOperatorAdd
(
"diffv"
,
0
,
0
,
NULL
);
DIFFN
=
cdoOperatorAdd
(
"diffn"
,
0
,
0
,
NULL
);
DIFFC
=
cdoOperatorAdd
(
"diffc"
,
0
,
0
,
NULL
);
SDIFF
=
cdoOperatorAdd
(
"sdiff"
,
0
,
0
,
NULL
);
operatorID
=
cdoOperatorID
();
...
...
@@ -81,13 +82,13 @@ void *Diff(void *argument)
if
(
!
cdoSilentMode
)
{
if
(
operatorID
==
DIFF
V
)
fprintf
(
stdout
,
" Date Time
Varname
Level Size Miss :"
if
(
operatorID
==
DIFF
N
)
fprintf
(
stdout
,
" Date Time
Name
Level Size Miss :"
" S Z Max_Absdiff Max_Reldiff
\n
"
);
else
if
(
operatorID
==
DIFFP
)
else
if
(
operatorID
==
DIFF
||
operatorID
==
DIFFP
)
fprintf
(
stdout
,
" Date Time Param Level Size Miss :"
" S Z Max_Absdiff Max_Reldiff
\n
"
);
else
if
(
operatorID
==
DIFF
)
else
if
(
operatorID
==
DIFF
C
)
fprintf
(
stdout
,
" Date Time Code Level Size Miss :"
" S Z Max_Absdiff Max_Reldiff
\n
"
);
}
...
...
@@ -129,15 +130,15 @@ void *Diff(void *argument)
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
!
cdoSilentMode
)
if
(
operatorID
==
DIFFP
||
operatorID
==
DIFF
V
||
operatorID
==
DIFF
)
if
(
operatorID
==
DIFF
||
operatorID
==
DIFFP
||
operatorID
==
DIFF
N
||
operatorID
==
DIFF
C
)
{
if
(
operatorID
==
DIFF
V
)
vlistInqVarName
(
vlistID1
,
varID1
,
varname
);
if
(
operatorID
==
DIFF
N
)
vlistInqVarName
(
vlistID1
,
varID1
,
varname
);
if
(
operatorID
==
DIFF
V
)
if
(
operatorID
==
DIFF
N
)
fprintf
(
stdout
,
"%6d :%s %s %-10s "
,
indg
,
vdatestr
,
vtimestr
,
varname
);
else
if
(
operatorID
==
DIFFP
)
else
if
(
operatorID
==
DIFF
||
operatorID
==
DIFFP
)
fprintf
(
stdout
,
"%6d :%s %s %-10s "
,
indg
,
vdatestr
,
vtimestr
,
paramstr
);
else
if
(
operatorID
==
DIFF
)
else
if
(
operatorID
==
DIFF
C
)
fprintf
(
stdout
,
"%6d :%s %s %3d "
,
indg
,
vdatestr
,
vtimestr
,
code
);
fprintf
(
stdout
,
"%7g "
,
zaxisInqLevel
(
zaxisID
,
levelID
));
...
...
@@ -172,7 +173,7 @@ void *Diff(void *argument)
}
if
(
!
cdoSilentMode
)
if
(
operatorID
==
DIFFP
||
operatorID
==
DIFF
V
||
operatorID
==
DIFF
)
if
(
operatorID
==
DIFF
||
operatorID
==
DIFFP
||
operatorID
==
DIFF
N
||
operatorID
==
DIFF
C
)
{
fprintf
(
stdout
,
"%7d %7d :"
,
gridsize
,
MAX
(
nmiss1
,
nmiss2
));
...
...
src/modules.c
View file @
1d8b846c
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-201
0
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-201
1
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -266,7 +266,7 @@ void *Wct(void *argument);
#define CopyOperators {"copy", "selall"}
#define DeltimeOperators {"delday", "del29feb"}
#define DetrendOperators {"detrend"}
#define DiffOperators {"diff", "diffp", "diff
v
", "sdiff"}
#define DiffOperators {"diff", "diffp", "diff
n", "diffc
", "sdiff"}
#define DuplicateOperators {"duplicate"}
#define Echam5iniOperators {"import_e5ml", "import_e5res", \
"export_e5ml", "export_e5res"}
...
...
@@ -718,6 +718,7 @@ static int NumModules = sizeof(Modules) / sizeof(Modules[0]);
static
char
*
opalias
[][
2
]
=
{
{
"anomaly"
,
"ymonsub"
},
{
"diffv"
,
"diffn"
},
{
"ggstat"
,
"info"
},
{
"ggstats"
,
"sinfo"
},
{
"globavg"
,
"fldavg"
},
...
...
src/operator_help.h
View file @
1d8b846c
...
...
@@ -16,7 +16,8 @@ static char *InfoHelp[] = {
"OPERATORS"
,
" 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:"
,
" input datasets. For each field the operator prints one line with "
,
" the following elements:"
,
" - Date and Time"
,
" - Parameter identifier and Level"
,
" - Size of the grid and number of Missing values"
,
...
...
@@ -47,7 +48,8 @@ static char *SinfoHelp[] = {
"OPERATORS"
,
" 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:"
,
" 4 sections. Section 1 prints one line per parameter with the following "
,
" information:"
,
" - institute and source"
,
" - parameter identifier"
,
" - horizontal grid size and number"
,
...
...
@@ -62,7 +64,7 @@ static char *SinfoHelp[] = {
static
char
*
DiffHelp
[]
=
{
"NAME"
,
" diff, diff
v
- Compare two datasets field by field"
,
" diff, diff
n
- Compare two datasets field by field"
,
""
,
"SYNOPSIS"
,
" <operator> ifile1 ifile2"
,
...
...
@@ -73,19 +75,19 @@ static char *DiffHelp[] = {
" the same header information and dimensions."
,
""
,
"OPERATORS"
,
" diff Compare two datasets listed by
code number
"
,
" diff Compare two datasets listed by
parameter id
"
,
" Provides statistics on differences between two datasets."
,
" For each pair of fields the operator prints one line with the following information:"
,
" - Date and Time"
,
" -
Code numb
er and Level"
,
" -
Parameter identifi
er and Level"
,
" - Size of the grid and number of Missing values"
,
" - Occurrence of coefficient pairs with different signs (S)"
,
" - Occurrence of zero values (Z)"
,
" - Maxima of absolute difference of coefficient pairs"
,
" - Maxima of relative difference of non-zero coefficient pairs with equal signs"
,
" diff
v
Compare two datasets listed by
v
ar
iable
name"
,
" The same as operator diff. Using the name instead of the
code number
"
,
"
to
identif
y
the
v
ar
iable
."
,
" diff
n
Compare two datasets listed by
p
ar
ameter
name"
,
" The same as operator diff. Using the name instead of the"
,
" identif
ier to label
the
p
ar
ameter
."
,
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