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

New operator: select - select fields from an unlimited number of input files

parent 183c4506
......@@ -3,6 +3,10 @@
* using CDI library version 1.6.0
* Version 1.6.0 released
2013-01-21 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* New operator: select - select fields from an unlimited number of input files
2013-01-17 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* diff: print only records that differ
......
......@@ -6,6 +6,7 @@ Version 1.6.0 (?? March 2013):
* setcalendar: changed CDO calendar names to CF calendar names (Feature #3123)
(standard, proleptic_gregorian, 360_day, 365_day, 366_day)
New operators:
* select: select fields from an unlimited number of input files
* mergegrid: merge horizontal grids
Changed operators:
* diff: print only records that differ
......
......@@ -60,6 +60,8 @@ Operator catalog:
-------------------------------------------------------------
Selection
-------------------------------------------------------------
Select select Select fields
Select delete Delete fields
Selvar selparam Select parameters by identifier
Selvar delparam Delete parameters by identifier
Selvar selcode Select parameters by code number
......
No preview for this file type
......@@ -11,6 +11,7 @@ Merge File operations
Split File operations
Splittime File operations
Splitsel File operations
Select Selection
Selvar Selection
Seltime Selection
Selbox Selection
......
......@@ -11,31 +11,60 @@
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 timesteps.
The fields selected depends on the chosen operator and the parameters.
The fields selected depends on the chosen parameters. Parameter is a comma
separated list of key-value pairs.
@EndDescription
@EndModule
@BeginOperator_select
@Title = Select fields
@Parameter = keys
@Parameter = params
@BeginDescription
Selects all fields with keys in a user given list.
Selects all fields with parameters in a user given list.
@EndDescription
@EndOperator
@BeginOperator_delete
@Title = Delete fields
@Parameter = keys
@Parameter = params
@BeginDescription
Deletes all fields with keys in a user given list.
Deletes all fields with parameters in a user given list.
@EndDescription
@EndOperator
@BeginParameter
@Item = keys
STRING Comma separated list of keys
@Item = name
STRING Comma separated list of variable names
@Item = param
STRING Comma separated list of parameter identifiers
@Item = code
INTEGER Comma separated list of code numbers
@Item = ltype
INTEGER Comma separated list of GRIB level types
@Item = levidx
INTEGER Comma separated list of index of levels
@Item = level
FLOAT Comma separated list of vertical levels
@Item = day
INTEGER Comma separated list of days
@Item = month
INTEGER Comma separated list of months
@Item = year
INTEGER Comma separated list of years
@Item = timestep
INTEGER Comma separated list of timesteps
@EndParameter
@BeginExample
Assume you have 3 inputfiles. Each inputfile contains the same variables for a different time period.
To select the variable T,U and V on the levels 200,500 and 850 from all 3 input files, use:
@BeginVerbatim
cdo select,name=T,U,V,level=200,500,850 ifile1 ifile2 ifile3 ofile
@EndVerbatim
@EndExample
......@@ -185,7 +185,7 @@ STRING Comma separated list of variable names
@Item = stdnames
STRING Comma separated list of standard names
@Item = levels
FLOAT Comma separated list of levels
FLOAT Comma separated list of vertical levels
@Item = levidx
INTEGER Comma separated list of index of levels
@Item = ltypes
......
......@@ -637,7 +637,7 @@ static modules_t Modules[] =
{ Seaspctl, SeaspctlHelp, SeaspctlOperators, CDI_REAL, 3, 1 },
{ Seasstat, SeasstatHelp, SeasstatOperators, CDI_REAL, 1, 1 },
{ Selbox, SelboxHelp, SelboxOperators, CDI_BOTH, 1, 1 },
{ Select, NULL, SelectOperators, CDI_BOTH, -1, 1 },
{ Select, SelectHelp, SelectOperators, CDI_BOTH, -1, 1 },
{ Selvar, SelvarHelp, SelvarOperators, CDI_BOTH, 1, 1 },
{ Selrec, SelvarHelp, SelrecOperators, CDI_BOTH, 1, 1 },
{ Seloperator, NULL, SeloperatorOperators, CDI_REAL, 1, 1 },
......
......@@ -378,6 +378,40 @@ static char *SplitselHelp[] = {
NULL
};
static char *SelectHelp[] = {
"NAME",
" select, delete - Select fields",
"",
"SYNOPSIS",
" <operator>,params 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 timesteps.",
" The fields selected depends on the chosen parameters. Parameter is a comma",
" separated list of key-value pairs.",
"",
"OPERATORS",
" select Select fields",
" Selects all fields with parameters in a user given list.",
" delete Delete fields",
" Deletes all fields with parameters in a user given list.",
"",
"PARAMETER",
" name STRING Comma separated list of variable names",
" param STRING Comma separated list of parameter identifiers",
" code INTEGER Comma separated list of code numbers",
" ltype INTEGER Comma separated list of GRIB level types",
" levidx INTEGER Comma separated list of index of levels",
" level FLOAT Comma separated list of vertical levels",
" day INTEGER Comma separated list of days",
" month INTEGER Comma separated list of months",
" year INTEGER Comma separated list of years",
" timestep INTEGER Comma separated list of timesteps",
NULL
};
static char *SelvarHelp[] = {
"NAME",
" selparam, delparam, selcode, delcode, selname, delname, selstdname, sellevel, ",
......@@ -435,7 +469,7 @@ static char *SelvarHelp[] = {
" codes INTEGER Comma separated list of code numbers",
" names STRING Comma separated list of variable names",
" stdnames STRING Comma separated list of standard names",
" levels FLOAT Comma separated list of levels",
" levels FLOAT Comma separated list of vertical levels",
" levidx INTEGER Comma separated list of index of levels",
" ltypes INTEGER Comma separated list of GRIB level types",
" grids STRING Comma separated list of grid names or numbers",
......@@ -3774,15 +3808,12 @@ static char *VargenHelp[] = {
" stdatm,levels ofile",
"",
"DESCRIPTION",
" Generates a dataset with one or more fields. The field size",
" is specified by the user given grid description.",
" According to the chosen operator all field elements",
" are constant or filled with random numbers.",
" Generates a dataset with one or more fields. The field size is specified by the user given grid description.",
" According to the chosen operator all field elements are constant or filled with random numbers.",
"",
"OPERATORS",
" const Create a constant field",
" Creates a constant field. All field elements of the grid",
" have the same value.",
" Creates a constant field. All field elements of the grid have the same value.",
" random Create a field with random numbers",
" Creates a field with rectangularly distrubuted random numbers in the interval [0,1].",
" stdatm Create values for pressure and temperature for hydrostatic atmosphere",
......
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