Commit f1b073d0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Docu update.

parent 9ee93611
......@@ -5,7 +5,7 @@
2017-03-09 Uwe Schulzweida
* New operator delindex - Delete grid cells by indices
* New operator delgridcell - Delete grid cells by indexes
2017-03-06 Uwe Schulzweida
......
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:
......
......@@ -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
......
......@@ -19,6 +19,7 @@ Selmulti Selection
Selvar Selection
Seltime Selection
Selbox Selection
Selgridcell Selection
Samplegrid Selection
Cond Conditional selection
Cond2 Conditional selection
......
......@@ -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/ outfile / \\texttt{outfile} /og;
$line =~ s/ infiles / \\texttt{infiles} /og;
$line =~ s/infiles/\\texttt{infiles}/og;
$line =~ s/infile1/\\texttt{infile1}/og;
$line =~ s/infile2/\\texttt{infile2}/og;
$line =~ s/infile/\\texttt{infile}/og;
$line =~ s/outfile/\\texttt{outfile}/og;
$line =~ s/\@math\{([^}]*)\}/\\begin{math}\1\\end{math}/og;
$line =~ s/\@file\{([^}]*)\}/\\texttt{\1}/og;
$line =~ s/\@var\{([^}]*)\}/\\textit{\1}/og;
......
@BeginModule
@NewPage
@Name = Samplegrid
@Title = Resample grid
@Section = Selection
......
@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
......@@ -306,7 +306,7 @@ cdo_SOURCES += Adisit.c \
Seaspctl.c \
Seasstat.c \
Selbox.c \
Selindex.c \
Selgridcell.c \
Select.c \
Selmulti.c \
Seloperator.c \
......
......@@ -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-Selindex.$(OBJEXT) cdo-Select.$(OBJEXT) \
cdo-Selgridcell.$(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 \
Selindex.c Select.c Selmulti.c Seloperator.c Selrec.c \
Selgridcell.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-Selindex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Selgridcell.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-Selindex.o: Selindex.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selindex.o -MD -MP -MF $(DEPDIR)/cdo-Selindex.Tpo -c -o cdo-Selindex.o `test -f 'Selindex.c' || echo '$(srcdir)/'`Selindex.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selindex.Tpo $(DEPDIR)/cdo-Selindex.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Selindex.c' object='cdo-Selindex.o' libtool=no @AMDEPBACKSLASH@
cdo-Selgridcell.o: Selgridcell.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selgridcell.o -MD -MP -MF $(DEPDIR)/cdo-Selgridcell.Tpo -c -o cdo-Selgridcell.o `test -f 'Selgridcell.c' || echo '$(srcdir)/'`Selgridcell.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selgridcell.Tpo $(DEPDIR)/cdo-Selgridcell.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Selgridcell.c' object='cdo-Selgridcell.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-Selindex.o `test -f 'Selindex.c' || echo '$(srcdir)/'`Selindex.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selgridcell.o `test -f 'Selgridcell.c' || echo '$(srcdir)/'`Selgridcell.c
 
cdo-Selindex.obj: Selindex.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selindex.obj -MD -MP -MF $(DEPDIR)/cdo-Selindex.Tpo -c -o cdo-Selindex.obj `if test -f 'Selindex.c'; then $(CYGPATH_W) 'Selindex.c'; else $(CYGPATH_W) '$(srcdir)/Selindex.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selindex.Tpo $(DEPDIR)/cdo-Selindex.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Selindex.c' object='cdo-Selindex.obj' libtool=no @AMDEPBACKSLASH@
cdo-Selgridcell.obj: Selgridcell.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Selgridcell.obj -MD -MP -MF $(DEPDIR)/cdo-Selgridcell.Tpo -c -o cdo-Selgridcell.obj `if test -f 'Selgridcell.c'; then $(CYGPATH_W) 'Selgridcell.c'; else $(CYGPATH_W) '$(srcdir)/Selgridcell.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Selgridcell.Tpo $(DEPDIR)/cdo-Selgridcell.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Selgridcell.c' object='cdo-Selgridcell.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-Selindex.obj `if test -f 'Selindex.c'; then $(CYGPATH_W) 'Selindex.c'; else $(CYGPATH_W) '$(srcdir)/Selindex.c'; fi`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Selgridcell.obj `if test -f 'Selgridcell.c'; then $(CYGPATH_W) 'Selgridcell.c'; else $(CYGPATH_W) '$(srcdir)/Selgridcell.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
......
......@@ -62,7 +62,7 @@ void sel_index(double *array1, double *array2, int nind, int *indarr)
}
void *Selindex(void *argument)
void *Selgridcell(void *argument)
{
int nrecs;
int varID, levelID;
......@@ -77,10 +77,10 @@ void *Selindex(void *argument)
cdoInitialize(argument);
int SELINDEX = cdoOperatorAdd("selindex", 0, 0, "grid cell indices (1-N)");
int DELINDEX = cdoOperatorAdd("delindex", 0, 0, "grid cell indices (1-N)");
int SELGRIDCELL = cdoOperatorAdd("selgridcell", 0, 0, "grid cell indices (1-N)");
int DELGRIDCELL = cdoOperatorAdd("delgridcell", 0, 0, "grid cell indices (1-N)");
UNUSED(SELINDEX);
UNUSED(SELGRIDCELL);
operatorInputArg(cdoOperatorEnter(0));
......@@ -124,7 +124,7 @@ void *Selindex(void *argument)
int ncells = nind;
int *cellidx = indarr;
if ( operatorID == DELINDEX )
if ( operatorID == DELGRIDCELL )
{
int gridsize = vlistGridsizeMax(vlistID1);
ncells = gridsize - nind;
......@@ -243,7 +243,7 @@ void *Selindex(void *argument)
lista_destroy(ilista);
if ( operatorID == DELINDEX ) Free(cellidx);
if ( operatorID == DELGRIDCELL ) Free(cellidx);
cdoFinish();
......
......@@ -148,7 +148,7 @@ void *Seascount(void *argument);
void *Seaspctl(void *argument);
void *Seasstat(void *argument);
void *Selbox(void *argument);
void *Selindex(void *argument);
void *Selgridcell(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 SelindexOperators {"selindex", "delindex"}
#define SelgridcellOperators {"selgridcell", "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 },
{ Selindex, NULL, SelindexOperators, 1, CDI_BOTH, 1, 1 },
{ Selgridcell, SelgridcellHelp, SelgridcellOperators, 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]));
......
......@@ -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",
......
Markdown is supported
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