Skip to content
GitLab
Menu
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
52c29d88
Commit
52c29d88
authored
Jan 10, 2011
by
Uwe Schulzweida
Browse files
Docu update
parent
3c16d90e
Changes
20
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
52c29d88
...
...
@@ -150,7 +150,6 @@ doc/tex/mod/Mastrfu -text
doc/tex/mod/Math -text
doc/tex/mod/Merge -text
doc/tex/mod/Mergegrid -text
doc/tex/mod/Mergetime -text
doc/tex/mod/Merstat -text
doc/tex/mod/Monarith -text
doc/tex/mod/Monpctl -text
...
...
@@ -170,6 +169,7 @@ doc/tex/mod/Runstat -text
doc/tex/mod/Seaspctl -text
doc/tex/mod/Seasstat -text
doc/tex/mod/Selbox -text
doc/tex/mod/Select -text
doc/tex/mod/Seltime -text
doc/tex/mod/Selvar -text
doc/tex/mod/Set -text
...
...
ChangeLog
View file @
52c29d88
2011-01-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Added operator delete - Delete fields
2011-01-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* remaplib: Changed remap weights from 2D to 1D array
...
...
OPERATORS
View file @
52c29d88
...
...
@@ -58,6 +58,8 @@ Operator catalog:
-------------------------------------------------------------
Selection
-------------------------------------------------------------
Select select Select fields
Select delete Delete fields
Selvar selcode Select variables by code number
Selvar delcode Delete variables by code number
Selvar selname Select variables by name
...
...
configure
View file @
52c29d88
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.66 for cdo 1.4.
7
.
# Generated by GNU Autoconf 2.66 for cdo 1.4.
8rc1
.
#
# Report bugs to <http://code.zmaw.de/projects/cdo>.
#
...
...
@@ -562,8 +562,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cdo'
PACKAGE_TARNAME='cdo'
PACKAGE_VERSION='1.4.
7
'
PACKAGE_STRING='cdo 1.4.
7
'
PACKAGE_VERSION='1.4.
8rc1
'
PACKAGE_STRING='cdo 1.4.
8rc1
'
PACKAGE_BUGREPORT='http://code.zmaw.de/projects/cdo'
PACKAGE_URL=''
...
...
@@ -1339,7 +1339,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures cdo 1.4.
7
to adapt to many kinds of systems.
\`configure' configures cdo 1.4.
8rc1
to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
...
...
@@ -1409,7 +1409,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cdo 1.4.
7
:";;
short | recursive ) echo "Configuration of cdo 1.4.
8rc1
:";;
esac
cat <<\_ACEOF
...
...
@@ -1545,7 +1545,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cdo configure 1.4.
7
cdo configure 1.4.
8rc1
generated by GNU Autoconf 2.66
Copyright (C) 2010 Free Software Foundation, Inc.
...
...
@@ -2092,7 +2092,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cdo $as_me 1.4.
7
, which was
It was created by cdo $as_me 1.4.
8rc1
, which was
generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
...
...
@@ -2987,7 +2987,7 @@ fi
# Define the identity of the package.
PACKAGE='cdo'
VERSION='1.4.
7
'
VERSION='1.4.
8rc1
'
cat >>confdefs.h <<_ACEOF
...
...
@@ -18562,7 +18562,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cdo $as_me 1.4.
7
, which was
This file was extended by cdo $as_me 1.4.
8rc1
, which was
generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
...
...
@@ -18628,7 +18628,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
cdo config.status 1.4.
7
cdo config.status 1.4.
8rc1
configured by $0, generated by GNU Autoconf 2.66,
with options \\"\$ac_cs_config\\"
...
...
configure.ac
View file @
52c29d88
# Process this file with autoconf to produce a configure script.
AC_INIT([cdo], [1.4.
7
], [http://code.zmaw.de/projects/cdo])
AC_INIT([cdo], [1.4.
8rc1
], [http://code.zmaw.de/projects/cdo])
CONFIG_ABORT=yes
AC_CONFIG_AUX_DIR(config)
...
...
doc/tex/Modules
View file @
52c29d88
...
...
@@ -10,6 +10,7 @@ Merge File operations
Split File operations
Splittime File operations
Splitsel File operations
Select Selection
Selvar Selection
Seltime Selection
Selbox Selection
...
...
doc/tex/mod/Copy
View file @
52c29d88
...
...
@@ -8,8 +8,9 @@
@Operators = copy cat
@BeginDescription
This module contains operators to copy or concatenate datasets. Each input
dataset is required to have the same variables with complete time steps.
This module contains operators to copy or concatenate datasets.
@file{ifiles} is an unlimited number of input files. All input files need to have
the same structure with the same variables on different time steps.
@EndDescription
@EndModule
...
...
doc/tex/mod/Ensstat
View file @
52c29d88
...
...
@@ -11,8 +11,9 @@
This module computes statistical values over an ensemble of input files.
Depending on the chosen operator the minimum, maximum, sum, average, variance,
standard deviation, a certain percentile over all input files or a skill score is written
to @file{ofile}. The date information of a time step in @file{ofile} is
the date of the first input file.
to @file{ofile}.
All input files need to have the same structure with the same variables.
The date information of a time step in @file{ofile} is the date of the first input file.
@EndDescription
@EndModule
...
...
doc/tex/mod/Info
View file @
52c29d88
...
...
@@ -9,8 +9,9 @@
@BeginDescription
This module writes information about the structure and contents
of all input datasets to standard output. The information displayed
depends on the chosen operator.
of all input files to standard output. All input files need to have
the same structure with the same variables on different time steps.
The information displayed depends on the chosen operator.
@EndDescription
@EndModule
...
...
doc/tex/mod/Merge
View file @
52c29d88
...
...
@@ -32,6 +32,8 @@ fields and the same number of time steps.
@BeginDescription
Merges all time steps of all input files sorted by date and time.
All input files need to have the same structure with the same variables
on different time steps.
After this operation every input time step is in @file{ofile} and
all time steps are sorted by date and time. Each input file is
required to have the same variables and different time steps.
...
...
doc/tex/mod/Mergetime
deleted
100644 → 0
View file @
3c16d90e
@BeginModule
@NewPage
@Name = Mergetime
@Title = Merge time
@Section = File operations
@Class = File operation
@Arguments = ifiles ofile
@Operators = mergetime
@EndModule
@BeginOperator_mergetime
@Title = Merge sorted by date and time
@BeginDescription
Merges all time steps of all input files sorted by date and time. After this
operation every input time step is in @file{ofile} and all time steps are sorted by
date and time. Each input file should have the same variables.
@EndDescription
@EndOperator
@BeginExample
@BeginVerbatim
cdo mergetime ifile1 ifile2 ifile3 ifile4 ofile
@EndVerbatim
@EndExample
doc/tex/mod/Output
View file @
52c29d88
...
...
@@ -8,8 +8,9 @@
@BeginDescription
This module prints all values of all input datasets to standard output.
All input fields need to have the same horizontal grid. The format of the
output depends on the chosen operator.
All input fields need to have the same horizontal grid. All input files
need to have the same structure with the same variables on different
time steps. The format of the output depends on the chosen operator.
@EndDescription
@EndModule
...
...
doc/tex/mod/Replace
View file @
52c29d88
@BeginModule
@NewPage
@Name = Replace
@Title = Replace variables
@Section = File operations
...
...
doc/tex/mod/Select
0 → 100644
View file @
52c29d88
@BeginModule
@NewPage
@Name = Select
@Title = Select fields
@Section = Selection
@Class = Selection
@Arguments = ifiles ofile
@Operators = select delete
@BeginDescription
This module selects some fields from @file{ifiles} and writes them to @file{ofile}.
@file{ifiles} is an unlimited number of input files. All input files need to have
the same structure with the same variables on different time steps.
The fields selected depends on the chosen operator and the parameters.
@EndDescription
@EndModule
@BeginOperator_select
@Title = Select fields
@Parameter = keys
@BeginDescription
Selects all fields with keys in a user given list.
@EndDescription
@EndOperator
@BeginOperator_delete
@Title = Delete fields
@Parameter = keys
@BeginDescription
Deletes all fields with keys in a user given list.
@EndDescription
@EndOperator
@BeginParameter
@Item = keys
STRING Comma separated list of keys
@EndParameter
doc/tex/mod/Selvar
View file @
52c29d88
...
...
@@ -9,7 +9,7 @@
@BeginDescription
This module selects some fields from @file{ifile} and writes them to @file{ofile}.
The fields selected depend on the chosen operator and the parameters.
The fields selected depend
s
on the chosen operator and the parameters.
@EndDescription
@EndModule
...
...
doc/tex/mod/Sinfo
View file @
52c29d88
...
...
@@ -8,8 +8,10 @@
@Operators = sinfo sinfov sinfop
@BeginDescription
This module writes information about the structure of all input datasets to
standard output. The information displayed depends on the chosen operator.
This module writes information about the structure of @file{ifiles} to standard output.
@file{ifiles} is an unlimited number of input files. All input files need to have
the same structure with the same variables on different time steps.
The information displayed depends on the chosen operator.
@EndDescription
@EndModule
...
...
doc/tex/usage.tex
View file @
52c29d88
...
...
@@ -130,6 +130,7 @@ without POSIX Threads support.
\subsection
{
Operator parameter
}
Some operators need one or more parameter.
A list of parameter is indicated by the seperator ','.
\begin{itemize}
\item
STRING
...
...
@@ -151,12 +152,12 @@ of all fields to missing value:
\item
INTEGER
A
list
of integer
s
can be specified by
{
\it
first
/
last[/inc
]
}
.
A
range
of integer
parameter
can be specified by
{
\it
first
}
/
{
\it
last
}
[/
{
\it
inc
}
]
.
To select the days 5, 6, 7, 8 and 9 use:
\begin{verbatim}
cdo selday,5/9 ifile ofile
\end{verbatim}
Th
is
is the same as:
Th
e result
is the same as:
\begin{verbatim}
cdo selday,5,6,7,8,9 ifile ofile
\end{verbatim}
...
...
src/Select.c
View file @
52c29d88
...
...
@@ -437,7 +437,7 @@ void par_check_word_flag(int npar, char **parlist, int *flaglist, const char *tx
void
*
Select
(
void
*
argument
)
{
int
SELECT
;
int
SELECT
,
DELETE
;
int
operatorID
;
int
streamID1
,
streamID2
=
CDI_UNDEFID
;
int
tsID1
,
tsID2
,
nrecs
;
...
...
@@ -453,6 +453,7 @@ void *Select(void *argument)
char
**
argnames
=
NULL
;
int
vlistID0
=
-
1
,
vlistID1
=
-
1
,
vlistID2
=
-
1
;
int
i
;
int
result
=
FALSE
;
int
lcopy
=
FALSE
;
int
gridsize
;
int
nmiss
;
...
...
@@ -478,6 +479,7 @@ void *Select(void *argument)
cdoInitialize
(
argument
);
SELECT
=
cdoOperatorAdd
(
"select"
,
0
,
0
,
"parameter list"
);
DELETE
=
cdoOperatorAdd
(
"delete"
,
0
,
0
,
"parameter list"
);
if
(
UNCHANGED_RECORD
)
lcopy
=
TRUE
;
...
...
@@ -531,11 +533,27 @@ void *Select(void *argument)
{
vlistClearFlag
(
vlistID1
);
nvars
=
vlistNvars
(
vlistID1
);
vars
=
(
int
*
)
malloc
(
nvars
*
sizeof
(
int
));
vars
=
(
int
*
)
malloc
(
nvars
*
sizeof
(
int
));
if
(
operatorID
==
DELETE
)
{
result
=
FALSE
;
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
zaxisID
=
vlistInqVarZaxis
(
vlistID1
,
varID
);
nlevs
=
zaxisInqSize
(
zaxisID
);
for
(
levID
=
0
;
levID
<
nlevs
;
levID
++
)
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
TRUE
);
}
}
else
{
result
=
TRUE
;
}
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
iparam
=
vlistInqVarParam
(
vlistID1
,
varID
);
iparam
=
vlistInqVarParam
(
vlistID1
,
varID
);
code
=
vlistInqVarCode
(
vlistID1
,
varID
);
vlistInqVarName
(
vlistID1
,
varID
,
varname
);
vlistInqVarStdname
(
vlistID1
,
varID
,
stdname
);
...
...
@@ -577,18 +595,18 @@ void *Select(void *argument)
if
(
nlevs
==
1
&&
IS_EQUAL
(
level
,
0
)
)
{
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
TRUE
);
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
result
);
}
else
{
if
(
npar_level
)
{
if
(
PAR_CHECK_FLT
(
level
)
)
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
TRUE
);
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
result
);
}
else
{
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
TRUE
);
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
result
);
}
}
}
...
...
@@ -608,7 +626,7 @@ void *Select(void *argument)
nlevs
=
zaxisInqSize
(
zaxisID
);
for
(
levID
=
0
;
levID
<
nlevs
;
levID
++
)
if
(
vlistInqFlag
(
vlistID1
,
varID
,
levID
)
==
TRUE
)
break
;
if
(
vlistInqFlag
(
vlistID1
,
varID
,
levID
)
==
result
)
break
;
if
(
levID
<
nlevs
)
npar
++
;
}
...
...
@@ -625,8 +643,7 @@ void *Select(void *argument)
zaxisID
=
vlistInqVarZaxis
(
vlistID1
,
varID
);
nlevs
=
zaxisInqSize
(
zaxisID
);
for
(
levID
=
0
;
levID
<
nlevs
;
levID
++
)
if
(
vlistInqFlag
(
vlistID1
,
varID
,
levID
)
==
TRUE
)
vlistDefFlag
(
vlistID0
,
varID
,
levID
,
TRUE
);
vlistDefFlag
(
vlistID0
,
varID
,
levID
,
vlistInqFlag
(
vlistID1
,
varID
,
levID
));
}
// if ( cdoVerbose ) vlistPrint(vlistID0);
...
...
src/modules.c
View file @
52c29d88
...
...
@@ -344,7 +344,7 @@ void *Wct(void *argument);
#define SeaspctlOperators {"seaspctl"}
#define SeasstatOperators {"seasmin", "seasmax", "seassum", "seasmean", "seasavg", "seasvar", "seasstd"}
#define SelboxOperators {"sellonlatbox", "selindexbox"}
#define SelectOperators {"select"}
#define SelectOperators {"select"
, "delete"
}
#define SelvarOperators {"selparam", "selcode", "selname", "selstdname", "sellevel", "sellevidx", "selgrid", \
"selzaxis", "seltabnum", "delparam", "delcode", "delname", "selltype"}
#define SeloperatorOperators {"seloperator"}
...
...
src/operator_help.h
View file @
52c29d88
...
...
@@ -9,8 +9,9 @@ static char *InfoHelp[] = {
""
,
"DESCRIPTION"
,
" This module writes information about the structure and contents "
,
" of all input datasets to standard output. The information displayed "
,
" depends on the chosen operator."
,
" of all input files to standard output. All input files need to have "
,
" the same structure with the same variables on different time steps."
,
" The information displayed depends on the chosen operator."
,
""
,
"OPERATORS"
,
" info Dataset information listed by code number"
,
...
...
@@ -38,8 +39,10 @@ static char *SinfoHelp[] = {
" <operator> ifiles"
,
""
,
"DESCRIPTION"
,
" This module writes information about the structure of all input datasets to "
,
" standard output. The information displayed depends on the chosen operator."
,
" This module writes information about the structure of ifiles to standard output."
,
" ifiles is an unlimited number of input files. All input files need to have "
,
" the same structure with the same variables on different time steps."
,
" The information displayed depends on the chosen operator."
,
""
,
"OPERATORS"
,
" sinfo Short dataset information listed by code number"
,
...
...
@@ -184,8 +187,9 @@ static char *CopyHelp[] = {
" <operator> ifiles ofile"
,
""
,
"DESCRIPTION"
,
" This module contains operators to copy or concatenate datasets. Each input"
,
" dataset is required to have the same variables with complete time steps."
,
" This module contains operators to copy or concatenate datasets."
,
" ifiles is an unlimited number of input files. All input files need to have "
,
" the same structure with the same variables on different time steps."
,
""
,
"OPERATORS"
,
" copy Copy datasets"
,
...
...
@@ -230,6 +234,8 @@ static char *MergeHelp[] = {
" fields and the same number of time steps."
,
" mergetime Merge datasets sorted by date and time"
,
" Merges all time steps of all input files sorted by date and time."
,
" All input files need to have the same structure with the same variables "
,
" on different time steps."
,
" After this operation every input time step is in ofile and"
,
" all time steps are sorted by date and time. Each input file is "
,
" required to have the same variables and different time steps."
,
...
...
@@ -341,6 +347,30 @@ static char *SplitselHelp[] = {
NULL
};
static
char
*
SelectHelp
[]
=
{
"NAME"
,
" select, delete - Select fields"
,
""
,
"SYNOPSIS"
,
" <operator>,keys ifiles ofile"
,
""
,
"DESCRIPTION"
,
" This module selects some fields from ifiles and writes them to ofile."
,
" ifiles is an unlimited number of input files. All input files need to have "
,
" the same structure with the same variables on different time steps."
,
" The fields selected depends on the chosen operator and the parameters."
,
""
,
"OPERATORS"
,
" select Select fields"
,
" Selects all fields with keys in a user given list."
,
" delete Delete fields"
,
" Deletes all fields with keys in a user given list."
,
""
,
"PARAMETER"
,
" keys STRING Comma separated list of keys"
,
NULL
};
static
char
*
SelvarHelp
[]
=
{
"NAME"
,
" selcode, delcode, selname, delname, selstdname, sellevel, sellevidx, selgrid, "
,
...
...
@@ -361,7 +391,7 @@ static char *SelvarHelp[] = {
""
,
"DESCRIPTION"
,
" This module selects some fields from ifile and writes them to ofile."
,
" The fields selected depend on the chosen operator and the parameters."
,
" The fields selected depend
s
on the chosen operator and the parameters."
,
""
,
"OPERATORS"
,
" selcode Select variables by code number"
,
...
...
@@ -1325,8 +1355,9 @@ static char *EnsstatHelp[] = {
" This module computes statistical values over an ensemble of input files."
,
" Depending on the chosen operator the minimum, maximum, sum, average, variance,"
,
" standard deviation, a certain percentile over all input files or a skill score is written"
,
" to ofile. The date information of a time step in ofile is"
,
" the date of the first input file."
,
" to ofile."
,
" All input files need to have the same structure with the same variables."
,
" The date information of a time step in ofile is the date of the first input file."
,
""
,
"OPERATORS"
,
" ensmin Ensemble minimum"
,
...
...
@@ -3331,8 +3362,9 @@ static char *OutputHelp[] = {
""
,
"DESCRIPTION"
,
" This module prints all values of all input datasets to standard output."
,
" All input fields need to have the same horizontal grid. The format of the "
,
" output depends on the chosen operator."
,
" All input fields need to have the same horizontal grid. All input files "
,
" need to have the same structure with the same variables on different "
,
" time steps. The format of the output depends on the chosen operator."
,
""
,
"OPERATORS"
,
" output ASCII output"
,
...
...
Write
Preview
Supports
Markdown
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