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
f1b073d0
Commit
f1b073d0
authored
Mar 10, 2017
by
Uwe Schulzweida
Browse files
Docu update.
parent
9ee93611
Changes
12
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f1b073d0
...
...
@@ -5,7 +5,7 @@
2017-03-09 Uwe Schulzweida
* New operator del
index
- Delete grid cells by ind
ic
es
* New operator del
gridcell
- Delete grid cells by ind
ex
es
2017-03-06 Uwe Schulzweida
...
...
NEWS
View file @
f1b073d0
CDO NEWS
--------
Version 1.8.1 (24 March 2017):
New operators:
* selgridcell - Select grid cells
* delgridcell - Delete grid cells
Version 1.8.0 (26 October 2016):
New features:
...
...
OPERATORS
View file @
f1b073d0
...
...
@@ -97,6 +97,8 @@ Operator catalog:
Seltime selsmon Select single month
Selbox sellonlatbox Select a longitude/latitude box
Selbox selindexbox Select an index box
Selgridcell selgridcell Select grid cells
Selgridcell delgridcell Delete grid cells
Samplegrid samplegrid Resample grid
-------------------------------------------------------------
Conditional selection
...
...
doc/tex/Modules
View file @
f1b073d0
...
...
@@ -19,6 +19,7 @@ Selmulti Selection
Selvar Selection
Seltime Selection
Selbox Selection
Selgridcell Selection
Samplegrid Selection
Cond Conditional selection
Cond2 Conditional selection
...
...
doc/tex/makedoc
View file @
f1b073d0
...
...
@@ -1208,11 +1208,11 @@ sub print_description {
# $line =~ s/CDO_PCTL_NBINS/CDO\\_PCTL\\_NBINS/og;
$line
=~
s/_/\\_/og
;
$line
=~
s/\@newline/ \\\\/og
;
$line
=~
s/
infile
/
\\texttt{infile}
/og
;
$line
=~
s/
infile1
/
\\texttt{infile1}
/og
;
$line
=~
s/
infile2
/
\\texttt{infile2}
/og
;
$line
=~
s/
out
file
/
\\texttt{
out
file}
/og
;
$line
=~
s/
in
file
s /
\\texttt{
in
file
s}
/og
;
$line
=~
s/infile
s/
\\texttt{infile
s
}/og
;
$line
=~
s/infile1
/
\\texttt{infile1}/og
;
$line
=~
s/infile2
/
\\texttt{infile2}/og
;
$line
=~
s/
in
file
/
\\texttt{
in
file}/og
;
$line
=~
s/
out
file
/
\\texttt{
out
file
}
/og
;
$line
=~
s/\@math\{([^}]*)\}/\\begin{math}\1\\end{math}/og
;
$line
=~
s/\@file\{([^}]*)\}/\\texttt{\1}/og
;
$line
=~
s/\@var\{([^}]*)\}/\\textit{\1}/og
;
...
...
doc/tex/mod/Samplegrid
View file @
f1b073d0
@BeginModule
@NewPage
@Name = Samplegrid
@Title = Resample grid
@Section = Selection
...
...
doc/tex/mod/Selgridcell
0 → 100644
View file @
f1b073d0
@BeginModule
@NewPage
@Name = Selgridcell
@Title = Select grid cells
@Section = Selection
@Class = Selection
@Arguments = infile outfile
@Operators = selgridcell delgridcell
@BeginDescription
Selects grid cells of all fields from infile. The user has to give the indexes of each
grid cell. The resulting grid in outfile is unstructured.
@EndDescription
@EndModule
@BeginOperator_selgridcell
@Title = Select grid cells
@Parameter = indexes
@BeginDescription
@EndDescription
@EndOperator
@BeginOperator_delgridcell
@Title = Delete grid cells
@Parameter = indexes
@BeginDescription
@EndDescription
@EndOperator
@BeginParameter
@Item = indexes
INTEGER Comma separated list of indexes
@EndParameter
src/Makefile.am
View file @
f1b073d0
...
...
@@ -306,7 +306,7 @@ cdo_SOURCES += Adisit.c \
Seaspctl.c
\
Seasstat.c
\
Selbox.c
\
Sel
index.c
\
Sel
gridcell.c
\
Select.c
\
Selmulti.c
\
Seloperator.c
\
...
...
src/Makefile.in
View file @
f1b073d0
...
...
@@ -219,7 +219,7 @@ am_cdo_OBJECTS = cdo-cdo.$(OBJEXT) cdo-Adisit.$(OBJEXT) \
cdo-Runstat.$(OBJEXT) cdo-Samplegrid.$(OBJEXT) \
cdo-Seascount.$(OBJEXT) cdo-Seaspctl.$(OBJEXT) \
cdo-Seasstat.$(OBJEXT) cdo-Selbox.$(OBJEXT) \
cdo-Sel
index
.$(OBJEXT) cdo-Select.$(OBJEXT) \
cdo-Sel
gridcell
.$(OBJEXT) cdo-Select.$(OBJEXT) \
cdo-Selmulti.$(OBJEXT) cdo-Seloperator.$(OBJEXT) \
cdo-Selrec.$(OBJEXT) cdo-Seltime.$(OBJEXT) \
cdo-Selvar.$(OBJEXT) cdo-Set.$(OBJEXT) \
...
...
@@ -584,7 +584,7 @@ cdo_SOURCES = cdo.c Adisit.c Afterburner.c Arith.c Arithc.c \
Pack.c Pardup.c Pinfo.c Pressure.c Regres.c Remap.c Remapeta.c \
Replace.c Replacevalues.c Rhopot.c Rotuv.c Runpctl.c Runstat.c \
Samplegrid.c Seascount.c Seaspctl.c Seasstat.c Selbox.c \
Sel
index
.c Select.c Selmulti.c Seloperator.c Selrec.c \
Sel
gridcell
.c Select.c Selmulti.c Seloperator.c Selrec.c \
Seltime.c Selvar.c Set.c Setattribute.c Setbox.c Setgatt.c \
Setgrid.c Sethalo.c Setmiss.c Setpartab.c Setrcaname.c \
Settime.c Setzaxis.c Shiftxy.c Showinfo.c Sinfo.c Smooth.c \
...
...
@@ -926,7 +926,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Seasstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Selbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Select.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Sel
index
.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Sel
gridcell
.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Selmulti.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Seloperator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Selrec.Po@am__quote@
...
...
@@ -3485,19 +3485,19 @@ cdo-Selbox.obj: Selbox.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selbox.obj `if test -f 'Selbox.c'; then $(CYGPATH_W) 'Selbox.c'; else $(CYGPATH_W) '$(srcdir)/Selbox.c'; fi`
cdo-Sel
index.o: Selindex
.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sel
index
.o -MD -MP -MF $(DEPDIR)/cdo-Sel
index
.Tpo -c -o cdo-Sel
index
.o `test -f 'Sel
index
.c' || echo '$(srcdir)/'`Sel
index
.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sel
index
.Tpo $(DEPDIR)/cdo-Sel
index
.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sel
index
.c' object='cdo-Sel
index
.o' libtool=no @AMDEPBACKSLASH@
cdo-Sel
gridcell.o: Selgridcell
.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sel
gridcell
.o -MD -MP -MF $(DEPDIR)/cdo-Sel
gridcell
.Tpo -c -o cdo-Sel
gridcell
.o `test -f 'Sel
gridcell
.c' || echo '$(srcdir)/'`Sel
gridcell
.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sel
gridcell
.Tpo $(DEPDIR)/cdo-Sel
gridcell
.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sel
gridcell
.c' object='cdo-Sel
gridcell
.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sel
index
.o `test -f 'Sel
index
.c' || echo '$(srcdir)/'`Sel
index
.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sel
gridcell
.o `test -f 'Sel
gridcell
.c' || echo '$(srcdir)/'`Sel
gridcell
.c
cdo-Sel
index
.obj: Sel
index
.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sel
index
.obj -MD -MP -MF $(DEPDIR)/cdo-Sel
index
.Tpo -c -o cdo-Sel
index
.obj `if test -f 'Sel
index
.c'; then $(CYGPATH_W) 'Sel
index
.c'; else $(CYGPATH_W) '$(srcdir)/Sel
index
.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sel
index
.Tpo $(DEPDIR)/cdo-Sel
index
.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sel
index
.c' object='cdo-Sel
index
.obj' libtool=no @AMDEPBACKSLASH@
cdo-Sel
gridcell
.obj: Sel
gridcell
.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sel
gridcell
.obj -MD -MP -MF $(DEPDIR)/cdo-Sel
gridcell
.Tpo -c -o cdo-Sel
gridcell
.obj `if test -f 'Sel
gridcell
.c'; then $(CYGPATH_W) 'Sel
gridcell
.c'; else $(CYGPATH_W) '$(srcdir)/Sel
gridcell
.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sel
gridcell
.Tpo $(DEPDIR)/cdo-Sel
gridcell
.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sel
gridcell
.c' object='cdo-Sel
gridcell
.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sel
index
.obj `if test -f 'Sel
index
.c'; then $(CYGPATH_W) 'Sel
index
.c'; else $(CYGPATH_W) '$(srcdir)/Sel
index
.c'; fi`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sel
gridcell
.obj `if test -f 'Sel
gridcell
.c'; then $(CYGPATH_W) 'Sel
gridcell
.c'; else $(CYGPATH_W) '$(srcdir)/Sel
gridcell
.c'; fi`
cdo-Select.o: Select.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Select.o -MD -MP -MF $(DEPDIR)/cdo-Select.Tpo -c -o cdo-Select.o `test -f 'Select.c' || echo '$(srcdir)/'`Select.c
...
...
src/Sel
index
.c
→
src/Sel
gridcell
.c
View file @
f1b073d0
...
...
@@ -62,7 +62,7 @@ void sel_index(double *array1, double *array2, int nind, int *indarr)
}
void
*
Sel
index
(
void
*
argument
)
void
*
Sel
gridcell
(
void
*
argument
)
{
int
nrecs
;
int
varID
,
levelID
;
...
...
@@ -77,10 +77,10 @@ void *Selindex(void *argument)
cdoInitialize
(
argument
);
int
SEL
INDEX
=
cdoOperatorAdd
(
"sel
index
"
,
0
,
0
,
"grid cell indices (1-N)"
);
int
DEL
INDEX
=
cdoOperatorAdd
(
"del
index
"
,
0
,
0
,
"grid cell indices (1-N)"
);
int
SEL
GRIDCELL
=
cdoOperatorAdd
(
"sel
gridcell
"
,
0
,
0
,
"grid cell indices (1-N)"
);
int
DEL
GRIDCELL
=
cdoOperatorAdd
(
"del
gridcell
"
,
0
,
0
,
"grid cell indices (1-N)"
);
UNUSED
(
SEL
INDEX
);
UNUSED
(
SEL
GRIDCELL
);
operatorInputArg
(
cdoOperatorEnter
(
0
));
...
...
@@ -124,7 +124,7 @@ void *Selindex(void *argument)
int
ncells
=
nind
;
int
*
cellidx
=
indarr
;
if
(
operatorID
==
DEL
INDEX
)
if
(
operatorID
==
DEL
GRIDCELL
)
{
int
gridsize
=
vlistGridsizeMax
(
vlistID1
);
ncells
=
gridsize
-
nind
;
...
...
@@ -243,7 +243,7 @@ void *Selindex(void *argument)
lista_destroy
(
ilista
);
if
(
operatorID
==
DEL
INDEX
)
Free
(
cellidx
);
if
(
operatorID
==
DEL
GRIDCELL
)
Free
(
cellidx
);
cdoFinish
();
...
...
src/modules.c
View file @
f1b073d0
...
...
@@ -148,7 +148,7 @@ void *Seascount(void *argument);
void
*
Seaspctl
(
void
*
argument
);
void
*
Seasstat
(
void
*
argument
);
void
*
Selbox
(
void
*
argument
);
void
*
Sel
index
(
void
*
argument
);
void
*
Sel
gridcell
(
void
*
argument
);
void
*
Select
(
void
*
argument
);
void
*
Selvar
(
void
*
argument
);
void
*
Seloperator
(
void
*
argument
);
...
...
@@ -409,7 +409,7 @@ void *Samplegrid(void *argument); // "samplegrid", "subgrid"
#define SeaspctlOperators {"seaspctl"}
#define SeasstatOperators {"seasmin", "seasmax", "seassum", "seasmean", "seasavg", "seasstd", "seasstd1", "seasvar", "seasvar1"}
#define SelboxOperators {"sellonlatbox", "selindexbox"}
#define Sel
index
Operators
{"sel
index", "delindex
"}
#define Sel
gridcell
Operators {"sel
gridcell", "delgridcell
"}
#define SelectOperators {"select", "delete"}
#define SelvarOperators {"selparam", "selcode", "selname", "selstdname", "sellevel", "sellevidx", "selgrid", \
"selzaxis", "selzaxisname", "seltabnum", "delparam", "delcode", "delname", "selltype"}
...
...
@@ -701,7 +701,7 @@ static modules_t Modules[] =
{
Seaspctl
,
SeaspctlHelp
,
SeaspctlOperators
,
1
,
CDI_REAL
,
3
,
1
},
{
Seasstat
,
SeasstatHelp
,
SeasstatOperators
,
1
,
CDI_REAL
,
1
,
1
},
{
Selbox
,
SelboxHelp
,
SelboxOperators
,
1
,
CDI_BOTH
,
1
,
1
},
{
Sel
index
,
NULL
,
Selindex
Operators
,
1
,
CDI_BOTH
,
1
,
1
},
{
Sel
gridcell
,
SelgridcellHelp
,
Selgridcell
Operators
,
1
,
CDI_BOTH
,
1
,
1
},
{
Select
,
SelectHelp
,
SelectOperators
,
1
,
CDI_BOTH
,
-
1
,
1
},
{
Selvar
,
SelvarHelp
,
SelvarOperators
,
1
,
CDI_BOTH
,
1
,
1
},
{
Selrec
,
SelvarHelp
,
SelrecOperators
,
1
,
CDI_BOTH
,
1
,
1
},
...
...
@@ -860,8 +860,6 @@ static const char *opalias[][2] =
{
"covar0r"
,
"fldcovar"
},
{
"gather"
,
"collgrid"
},
{
"geopotheight"
,
"gheight"
},
{
"ggstat"
,
"info"
},
{
"ggstats"
,
"sinfo"
},
{
"globavg"
,
"fldavg"
},
{
"import_grads"
,
"import_binary"
},
{
"infos"
,
"sinfo"
},
...
...
@@ -903,6 +901,8 @@ static const char *opalias[][2] =
{
"outputbounds"
,
"gmtcells"
},
{
"selseas"
,
"selseason"
},
{
"selmon"
,
"selmonth"
},
{
"selindex"
,
"selgridcell"
},
{
"delindex"
,
"delgridcell"
},
};
static
int
nopalias
=
sizeof
(
opalias
)
/
(
2
*
sizeof
(
opalias
[
0
][
0
]));
...
...
src/operator_help.h
View file @
f1b073d0
...
...
@@ -719,6 +719,26 @@ static const char *SelboxHelp[] = {
NULL
};
static
const
char
*
SelgridcellHelp
[]
=
{
"NAME"
,
" selgridcell, delgridcell - Select grid cells"
,
""
,
"SYNOPSIS"
,
" <operator>,indexes infile outfile"
,
""
,
"DESCRIPTION"
,
" Selects grid cells of all fields from infile. The user has to give the indexes of each"
,
" grid cell. The resulting grid in outfile is unstructured."
,
""
,
"OPERATORS"
,
" selgridcell Select grid cells"
,
" delgridcell Delete grid cells"
,
""
,
"PARAMETER"
,
" indexes INTEGER Comma separated list of indexes"
,
NULL
};
static
const
char
*
SamplegridHelp
[]
=
{
"NAME"
,
" samplegrid - Resample grid"
,
...
...
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