modules.cc 76.4 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
/*
  This file is part of CDO. CDO is a collection of Operators to
  manipulate and analyse Climate model Data.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
5
  Copyright (C) 2003-2017 Uwe Schulzweida, <uwe.schulzweida AT mpimet.mpg.de>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
6
7
8
9
10
11
12
13
14
15
16
17
  See COPYING file for copying and redistribution conditions.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; version 2 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
*/

Uwe Schulzweida's avatar
Uwe Schulzweida committed
18
#if defined(HAVE_CONFIG_H)
19
#include "config.h"
Ralf Mueller's avatar
Ralf Mueller committed
20
21
#endif

22
#include "cdo_int.h"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
23
#include "error.h"
24
25
26
#include "modules.h"
#include "operator_help.h"
#include <cdi.h>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27

28
29
30
31
32
33
34
35
#include <dirent.h>
#include <dlfcn.h>
#include <regex>
#include <set>
#include <string>
#include <vector>
// for std::sort()
#include <algorithm>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
36
37


38
/* \cond */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
39
void *Adisit(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
40
void *Afterburner(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41
42
43
void *Arith(void *argument);
void *Arithc(void *argument);
void *Arithdays(void *argument);
44
void *Arithlat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45
void *Cat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
46
void *CDItest(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
47
void *CDIread(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
48
void *CDIwrite(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
49
void *Change(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
50
void *Change_e5slm(void *argument);
51
void *Cloudlayer(void *argument);
52
void *CMOR(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
53
void *CMOR_lite(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
54
void *CMOR_table(void *argument);
55
void *Collgrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
56
void *Command(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
58
void *Comp(void *argument);
void *Compc(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
59
void *Complextorect(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
60
61
62
void *Cond(void *argument);
void *Cond2(void *argument);
void *Condc(void *argument);
Ralf Mueller's avatar
Ralf Mueller committed
63
void *Consecstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
64
void *Copy(void *argument);
65
void *Deltat(void *argument);
66
void *Deltime(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
67
void *Derivepar(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
68
69
void *Detrend(void *argument);
void *Diff(void *argument);
70
void *Distgrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
71
void *Duplicate(void *argument);
72
void *Echam5ini(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
73
void *Enlarge(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
74
void *Enlargegrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
75
void *Ensstat(void *argument);
76
void *Ensstat3(void *argument);
77
void *Ensval(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
78
void *Eofcoeff(void *argument);
79
void *Eofcoeff3d(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
80
void *EOFs(void *argument);
81
void *EOF3d(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
82
void *Expr(void *argument);
83
void *FC(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
84
85
void *Filedes(void *argument);
void *Fillmiss(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
86
void *Filter(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
87
88
void *Fldrms(void *argument);
void *Fldstat(void *argument);
89
void *Fldstat2(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
void *Fourier(void *argument);
91
void *Gengrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
92
void *Gradsdes(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
93
void *Gridboxstat(void *argument);
94
void *Gridcell(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
95
void *Gridsearch(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
96
void *Harmonic(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
97
void *Histogram(void *argument);
98
void *Importamsr(void *argument);
99
void *Importbinary(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
100
101
void *Importcmsaf(void *argument);
void *Importobs(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
102
103
104
105
void *Info(void *argument);
void *Input(void *argument);
void *Intgrid(void *argument);
void *Intgridtraj(void *argument);
106
void *Intlevel(void *argument);
107
void *Intlevel3d(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
108
void *Inttime(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
109
void *Intntime(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
110
111
void *Intyear(void *argument);
void *Invert(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
112
void *Invertlev(void *argument);
113
void *Isosurface(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
114
void *Log(void *argument);
115
void *MapReduce(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
116
117
118
119
120
void *Maskbox(void *argument);
void *Mastrfu(void *argument);
void *Math(void *argument);
void *Merge(void *argument);
void *Mergegrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
121
void *Mergetime(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
122
void *Merstat(void *argument);
123
void *Monarith(void *argument);
124
void *Mrotuv(void *argument);
125
void *Mrotuvb(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
126
void *Ninfo(void *argument);
127
void *Nmldump(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
128
129
void *Output(void *argument);
void *Outputgmt(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
130
void *Pack(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
131
void *Pardup(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
132
void *Pinfo(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
133
void *Pressure(void *argument);
134
void *Regres(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
135
void *Remap(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
136
void *Remapeta(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
137
void *Replace(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
138
void *Replacevalues(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
139
void *Rotuv(void *argument);
140
void *Rhopot(void *argument);
141
void *Runpctl(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
142
void *Runstat(void *argument);
143
void *Samplegridicon(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
144
void *Seascount(void *argument);
145
void *Seaspctl(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
146
147
void *Seasstat(void *argument);
void *Selbox(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
148
void *Selgridcell(void *argument);
149
void *Select(void *argument);
150
void *Selvar(void *argument);
151
void *Seloperator(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
152
153
154
void *Selrec(void *argument);
void *Seltime(void *argument);
void *Set(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
155
void *Setattribute(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
156
void *Setbox(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
157
158
159
160
void *Setgatt(void *argument);
void *Setgrid(void *argument);
void *Sethalo(void *argument);
void *Setmiss(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
161
void *Setpartab(void *argument);
162
void *Setrcaname(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
163
164
void *Settime(void *argument);
void *Setzaxis(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
165
void *Shiftxy(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
166
167
void *Showinfo(void *argument);
void *Sinfo(void *argument);
168
void *Smooth(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
169
void *Sort(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
170
void *Sorttimestamp(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
171
172
void *Specinfo(void *argument);
void *Spectral(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
void *Spectrum(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
174
175
void *Split(void *argument);
void *Splitrec(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
176
void *Splitsel(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
177
178
179
void *Splittime(void *argument);
void *Splityear(void *argument);
void *Subtrend(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
180
void *Tee(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
181
182
183
184
void *Template1(void *argument);
void *Template2(void *argument);
void *Test(void *argument);
void *Test2(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
185
void *Testdata(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
186
void *Tests(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
187
void *Timsort(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
188
void *Timcount(void *argument);
189
void *Timcumsum(void *argument);
190
void *Timpctl(void *argument);
191
192
void *Timselpctl(void *argument);
void *Timselstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
193
void *XTimstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
194
void *Timstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
195
void *Timstat2(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
196
void *Timstat3(void *argument);
197
void *Tinfo(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
198
void *Tocomplex(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
199
void *Transpose(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
201
void *Trend(void *argument);
void *Trms(void *argument);
202
void *Tstepcount(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
203
204
void *Vargen(void *argument);
void *Varrms(void *argument);
205
void *Vertintml(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
206
void *Vertintap(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
207
void *Vertstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
208
void *Vertcum(void *argument);
209
void *Vertwind(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
210
void *Verifygrid(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
211
void *Wind(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
212
213
void *Writegrid(void *argument);
void *Writerandom(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
214
void *YAR(void *argument);
215
void *Yearmonstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
216
void *Ydayarith(void *argument);
217
void *Ydaypctl(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
218
void *Ydaystat(void *argument);
219
220
void *Ydrunpctl(void *argument);
void *Ydrunstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
221
222
void *Yhourarith(void *argument);
void *Yhourstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
223
void *Ymonarith(void *argument);
224
void *Ymonpctl(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
225
void *Ymonstat(void *argument);
226
void *Yseaspctl(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
227
228
void *Yseasstat(void *argument);
void *Zonstat(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
229

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
void *EcaCfd(void *argument);
void *EcaCsu(void *argument);
void *EcaCwdi(void *argument);
void *EcaCwfi(void *argument);
void *EcaEtr(void *argument);
void *EcaFd(void *argument);
void *EcaGsl(void *argument);
void *EcaHd(void *argument);
void *EcaHwdi(void *argument);
void *EcaHwfi(void *argument);
void *EcaId(void *argument);
void *EcaSu(void *argument);
void *EcaTr(void *argument);
void *EcaTg10p(void *argument);
void *EcaTg90p(void *argument);
void *EcaTn10p(void *argument);
void *EcaTn90p(void *argument);
void *EcaTx10p(void *argument);
void *EcaTx90p(void *argument);

void *EcaCdd(void *argument);
void *EcaCwd(void *argument);
void *EcaRr1(void *argument);
253
void *EcaPd(void *argument);
254
255
256
257
258
259
260
261
262
263
264
265
void *EcaR75p(void *argument);
void *EcaR75ptot(void *argument);
void *EcaR90p(void *argument);
void *EcaR90ptot(void *argument);
void *EcaR95p(void *argument);
void *EcaR95ptot(void *argument);
void *EcaR99p(void *argument);
void *EcaR99ptot(void *argument);
void *EcaRx1day(void *argument);
void *EcaRx5day(void *argument);
void *EcaSdii(void *argument);

Uwe Schulzweida's avatar
Uwe Schulzweida committed
266
267
268
269
270
void *Fdns(void *argument);
void *Strwin(void *argument);
void *Strbre(void *argument);
void *Strgal(void *argument);
void *Hurr(void *argument);
271

272
// void *Hi(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
273
void *Wct(void *argument);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
274

275
276
277
278
void *Magplot(void *argument);
void *Magvector(void *argument);
void *Maggraph(void *argument);

279
280
281
// HIRLAM_EXTENSIONS
void *Selmulti(void *argument);   // "selmulti", "delmulti"
void *WindTrans(void *argument);  // "uvDestag", "rotuvN", "rotuvNorth", "projuvLatLon"
282
void *Samplegrid(void *argument); // "samplegrid", "subgrid"
283

Uwe Schulzweida's avatar
Uwe Schulzweida committed
284

285
/* clang-format off */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
286
#define  AdisitOperators        {"adisit", "adipot"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
287
#define  AfterburnerOperators   {"after"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
288
#define  ArithOperators         {"add",  "sub",  "mul",  "div", "min", "max", "atan2"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
289
#define  ArithcOperators        {"addc", "subc", "mulc", "divc", "mod"}
290
#define  ArithdaysOperators     {"muldpm", "divdpm", "muldpy", "divdpy", "muldoy"}
291
#define  ArithlatOperators      {"mulcoslat", "divcoslat"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
292
#define  CatOperators           {"cat"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
293
#define  CDItestOperators       {"ncopy"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
294
#define  CDIreadOperators       {"cdiread"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
295
#define  CDIwriteOperators      {"cdiwrite"}
296
#define  ChangeOperators        {"chcode", "chtabnum", "chparam", "chname", "chunit", "chlevel", "chlevelc", "chlevelv", "chltype"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
297
#define  Change_e5slmOperators  {"change_e5slm", "change_e5lsm", "change_e5mask"}
298
#define  CloudlayerOperators    {"cloudlayer"}
299
#define  CMOROperators          {"cmor"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
300
#define  CMORliteOperators      {"cmorlite"}
301
#define  CMORtableOperators     {"dump_cmor_table", "conv_cmor_table"}
302
#define  CollgridOperators      {"collgrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
303
#define  CommandOperators       {"command", "com", "cmd"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
304
305
#define  CompOperators          {"eq",  "ne",  "le",  "lt",  "ge",  "gt"}
#define  CompcOperators         {"eqc", "nec", "lec", "ltc", "gec", "gtc"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
306
#define  ComplextorectOperators {"complextorect"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
307
308
309
#define  CondOperators          {"ifthen",  "ifnotthen"}
#define  Cond2Operators         {"ifthenelse"}
#define  CondcOperators         {"ifthenc", "ifnotthenc"}
Ralf Mueller's avatar
Ralf Mueller committed
310
#define  ConsecstatOperators    {"consects", "consecsum"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
311
#define  CopyOperators          {"copy", "selall", "szip"}
312
#define  DeltatOperators        {"deltat"}
313
#define  DeltimeOperators       {"delday", "del29feb"}
314
#define  DeriveparOperators     {"gheight", "sealevelpressure"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
315
#define  DetrendOperators       {"detrend"}
316
#define  DiffOperators          {"diff", "diffp", "diffn", "diffc"}
317
#define  DistgridOperators      {"distgrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
318
#define  DuplicateOperators     {"duplicate"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
319
#define  Echam5iniOperators     {"import_e5ml", "import_e5res", "export_e5ml", "export_e5res"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
320
#define  EnlargeOperators       {"enlarge"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
321
#define  EnlargegridOperators   {"enlargegrid"}
322
#define  EnsstatOperators       {"ensmin", "ensmax", "enssum", "ensmean", "ensavg", "ensvar", "ensvar1", "ensstd", "ensstd1", "enspctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
323
324
#define  Ensstat3Operators      {"ensrkhistspace", "ensrkhisttime", "ensroc"}
#define  EnsvalOperators        {"enscrps", "ensbrs"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
325
#define  EofcoeffOperators      {"eofcoeff"}
326
#define  Eofcoeff3dOperators    {"eofcoeff3d"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
327
#define  EOFsOperators          {"eof", "eofspatial", "eoftime"}
328
#define  EOF3dOperators         {"eof3d","eof3dspatial","eof3dtime"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
329
#define  ExprOperators          {"expr", "exprf", "aexpr", "aexprf"}
330
#define  FCOperators            {"fc2sp", "sp2fc", "fc2gp", "gp2fc"}
331
#define  FiledesOperators       {"filedes", "griddes", "griddes2", "zaxisdes", "vct", "vct2", "codetab", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
332
                                 "vlist", "partab", "partab2", "spartab"}
333
#define  FillmissOperators      {"fillmiss", "fillmiss2"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
334
#define  FilterOperators        {"bandpass", "highpass", "lowpass"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
335
#define  FldrmsOperators        {"fldrms"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
336
#define  FldstatOperators       {"fldrange", "fldmin", "fldmax", "fldsum", "fldmean", "fldavg", "fldstd", "fldstd1", "fldvar", "fldvar1", "fldpctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
337
338
#define  FldcorOperators        {"fldcor"}
#define  FldcovarOperators      {"fldcovar"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
339
#define  FourierOperators       {"fourier"}
340
#define  GengridOperators       {"gengrid"}
341
#define  GradsdesOperators      {"gradsdes", "dumpmap"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
342
#define  GridboxstatOperators   {"gridboxrange", "gridboxmin", "gridboxmax", "gridboxsum", "gridboxmean", "gridboxavg", "gridboxstd", "gridboxstd1", "gridboxvar", "gridboxvar1"}
343
#define  GridcellOperators      {"gridarea", "gridweights", "gridmask", "griddx", "griddy"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
344
#define  GridsearchOperators    {"testpointsearch", "testcellsearch"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
345
#define  HarmonicOperators      {"harmonic"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
346
#define  HistogramOperators     {"histcount", "histsum", "histmean", "histfreq"}
347
#define  ImportamsrOperators    {"import_amsr"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
348
#define  ImportbinaryOperators  {"import_binary"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
349
350
#define  ImportcmsafOperators   {"import_cmsaf"}
#define  ImportobsOperators     {"import_obs"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
351
#define  InfoOperators          {"info", "infop", "infon", "infoc", "xinfon", "map"}
352
#define  InputOperators         {"input", "inputsrv", "inputext"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
353
#define  IntgridOperators       {"intgridbil", "intpoint", "interpolate", "boxavg", "thinout"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
354
#define  IntgridtrajOperators   {"intgridtraj"}
355
#define  IntlevelOperators      {"intlevel", "intlevelx"}
356
#define  Intlevel3dOperators    {"intlevel3d", "intlevelx3d"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
357
#define  InttimeOperators       {"inttime"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
358
#define  IntntimeOperators      {"intntime"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
359
#define  IntyearOperators       {"intyear"}
360
#define  InvertOperators        {"invertlat", "invertlon", "invertlatdes", "invertlondes", "invertlatdata", "invertlondata"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
361
#define  InvertlevOperators     {"invertlev"}
362
#define  IsosurfaceOperators    {"isosurface"}
363
#define  LogOperators           {"dumplogs", "daylogs", "monlogs", "dumplogo", "snamelogo", "scalllogo", "smemlogo", "stimelogo", "sperclogo"}
364
#define  MapReduceOperators     {"reducegrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
365
#define  MaskboxOperators       {"masklonlatbox", "maskindexbox"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
366
#define  MaskregionOperators    {"maskregion"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
367
#define  MastrfuOperators       {"mastrfu"}
368
#define  MathOperators          {"abs", "int", "nint", "sqr", "sqrt", "exp", "ln", "log10", "sin", \
369
                                 "cos", "tan", "asin", "acos", "atan", "pow", "reci"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
370
371
#define  MergeOperators         {"merge"}
#define  MergegridOperators     {"mergegrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
372
#define  MergetimeOperators     {"mergetime"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
373
#define  MerstatOperators       {"merrange", "mermin", "mermax", "mersum", "mermean", "meravg", "merstd", "merstd1", "mervar", "mervar1", "merpctl"}
374
#define  MonarithOperators      {"monadd", "monsub", "monmul", "mondiv"}
375
376
#define  MrotuvOperators        {"mrotuv"}
#define  MrotuvbOperators       {"mrotuvb"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
377
#define  NinfoOperators         {"nyear", "nmon", "ndate", "ntime", "ncode", "npar", "nlevel", "ngridpoints", "ngrids"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
378
#define  NmldumpOperators       {"nmldump", "kvldump"}
379
#define  OutputOperators        {"output", "outputint", "outputsrv", "outputext", "outputf", "outputts", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
380
381
                                 "outputfld", "outputarr", "outputxyz"}
#define  OutputtabOperators     {"outputtab"}
382
#define  OutputgmtOperators     {"gmtxyz", "gmtcells", "outputcenter2", "outputcentercpt", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
383
                                 "outputboundscpt", "outputvector", "outputtri", "outputvrml"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
384
#define  PackOperators          {"pack"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
385
#define  PardupOperators        {"pardup", "parmul"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
386
#define  PinfoOperators         {"pinfo", "pinfov"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
387
#define  PressureOperators      {"pressure_fl", "pressure_hl", "deltap"}
388
#define  RegresOperators        {"regres"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
389
#define  RemapOperators         {"remap"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
390
#define  RemapbilOperators      {"remapbil", "genbil"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
391
#define  RemapbicOperators      {"remapbic", "genbic"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
392
#define  RemapnnOperators       {"remapnn", "gennn"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
393
#define  RemapdisOperators      {"remapdis", "gendis"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
394
395
#define  RemapyconOperators     {"remapycon", "genycon"}
#define  RemapconOperators      {"remapcon", "gencon"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
396
#define  Remapcon2Operators     {"remapcon2", "gencon2"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
397
398
#define  RemaplafOperators      {"remaplaf", "genlaf"}
#define    RemapgridOperators   {"remapsum"}
399
#define  RemapetaOperators      {"remapeta", "remapeta_s", "remapeta_z"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
400
#define  ReplaceOperators       {"replace"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
401
#define  ReplacevaluesOperators {"setvals", "setrtoc", "setrtoc2"}
402
#define  RhopotOperators        {"rhopot"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
403
#define  RotuvOperators         {"rotuvb"}
404
#define  RunpctlOperators       {"runpctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
405
#define  RunstatOperators       {"runrange", "runmin", "runmax", "runsum", "runmean", "runavg", "runstd", "runstd1", "runvar", "runvar1"}
406
#define  SamplegridiconOperators {"samplegridicon"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
407
#define  SeascountOperators     {"seascount"}
408
#define  SeaspctlOperators      {"seaspctl"}
409
#define  SeasstatOperators      {"seasrange", "seasmin", "seasmax", "seassum", "seasmean", "seasavg", "seasstd", "seasstd1", "seasvar", "seasvar1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
410
#define  SelboxOperators        {"sellonlatbox", "selindexbox"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
411
#define  SelgridcellOperators   {"selgridcell", "delgridcell"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
412
#define  SelectOperators        {"select", "delete"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
413
#define  SelvarOperators        {"selparam", "selcode", "selname", "selstdname", "sellevel", "sellevidx", "selgrid", \
414
                                 "selzaxis", "selzaxisname", "seltabnum", "delparam", "delcode", "delname", "selltype"}
415
#define  SeloperatorOperators   {"seloperator"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
416
#define  SelrecOperators        {"selrec"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
417
#define  SeltimeOperators       {"seltimestep", "selyear", "selseason", "selmonth", "selday", "selhour", "seldate", \
418
                                 "seltime", "selsmon"}
419
#define  SetOperators           {"setcode", "setparam", "setname", "setunit", "setlevel", "setltype", "settabnum"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
420
#define  SetattributeOperators  {"setattribute"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
421
#define  SetboxOperators        {"setclonlatbox", "setcindexbox"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
422
#define  SetgattOperators       {"setgatt", "setgatts"}
423
#define  SetgridOperators       {"setgrid", "setgridtype", "setgridarea", "setgridmask", "unsetgridmask", "setgridnumber", "setgriduri", "usegridnumber"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
424
#define  SethaloOperators       {"sethalo", "tpnhalo"}
425
#define  SetmissOperators       {"setmissval", "setctomiss", "setmisstoc", "setrtomiss", "setvrange"}
426
#define  SetmisstonnOperators   {"setmisstonn", "setmisstodis"}
427
#define  SetcodetabOperators    {"setcodetab"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
428
#define  SetpartabOperators     {"setpartabc", "setpartabp", "setpartabn"}
429
#define  SetrcanameOperators    {"setrcaname"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
430
#define  SettimeOperators       {"setyear", "setmon", "setday", "setdate", "settime", "settunits", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
431
                                 "settaxis", "settbounds", "setreftime", "setcalendar", "shifttime"}
432
#define  SetzaxisOperators      {"setzaxis", "genlevelbounds"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
433
#define  ShiftxyOperators       {"shiftx", "shifty"}
Ralf Mueller's avatar
Ralf Mueller committed
434
#define  ShowinfoOperators      {"showyear", "showmon", "showdate", "showtime", "showtimestamp", "showcode", "showunit", \
435
                                 "showparam", "showname", "showstdname", "showlevel", "showltype", "showformat", "showgrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
436
#define  SinfoOperators         {"sinfo", "sinfop", "sinfon", "sinfoc", "seinfo", "seinfop", "seinfon", "seinfoc"}
437
#define  SmoothOperators        {"smooth", "smooth9"}
438
#define  SortOperators          {"sortcode", "sortparam", "sortname", "sortlevel"}
439
#define  SorttimestampOperators {"sorttimestamp", "sorttaxis"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
440
441
#define  SpecinfoOperators      {"specinfo"}
#define  SpectralOperators      {"gp2sp", "gp2spl", "sp2gp", "sp2gpl", "sp2sp", "spcut"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
442
#define  SpectrumOperators      {"spectrum"}
443
#define  SplitOperators         {"splitcode", "splitparam", "splitname", "splitlevel", "splitgrid", "splitzaxis", "splittabnum"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
444
#define  SplitrecOperators      {"splitrec"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
445
#define  SplitselOperators      {"splitsel"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
446
#define  SplittimeOperators     {"splithour", "splitday", "splitmon", "splitseas"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
447
#define  SplityearOperators     {"splityear", "splityearmon"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
448
#define  SubtrendOperators      {"subtrend"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
449
#define  TeeOperators           {"tee"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
450
451
452
453
#define  Template1Operators     {"template1"}
#define  Template2Operators     {"template2"}
#define  TestOperators          {"test"}
#define  Test2Operators         {"test2"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
454
#define  TestdataOperators      {"testdata"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
455
#define  TestsOperators         {"normal", "studentt", "chisquare", "beta", "fisher"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
456
#define  TimsortOperators       {"timsort"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
457
458
459
460
461
#define  TimcountOperators      {"timcount"}
#define    YearcountOperators   {"yearcount"}
#define    MoncountOperators    {"moncount"}
#define    DaycountOperators    {"daycount"}
#define    HourcountOperators   {"hourcount"}
462
#define  TimcumsumOperators     {"timcumsum"}
463
464
465
466
467
#define  TimpctlOperators       {"timpctl"}
#define    YearpctlOperators    {"yearpctl"}
#define    MonpctlOperators     {"monpctl"}
#define    DaypctlOperators     {"daypctl"}
#define    HourpctlOperators    {"hourpctl"}
468
#define  TimselpctlOperators    {"timselpctl"}
469
#define  TimselstatOperators    {"timselrange", "timselmin", "timselmax", "timselsum", "timselmean", "timselavg", "timselvar", "timselvar1", "timselstd", "timselstd1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
470
#define  XTimstatOperators      {"xtimmin",  "xtimmax",  "xtimsum",  "xtimmean",  "xtimavg",  "xtimvar",  "xtimvar1",  "xtimstd",  "xtimstd1", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
471
                                 "xyearmin", "xyearmax", "xyearsum", "xyearmean", "xyearavg", "xyearvar", "xyearvar1", "xyearstd", "xyearstd1", \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
472
                                 "xmonmin",  "xmonmax",  "xmonsum",  "xmonmean",  "xmonavg",  "xmonvar",  "xmonvar1",  "xmonstd",  "xmonstd1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
473
474
475
476
477
#define  TimstatOperators       {"timrange",  "timmin",  "timmax",  "timsum",  "timmean",  "timavg",  "timvar",  "timvar1",  "timstd",  "timstd1"}
#define    YearstatOperators    {"yearrange", "yearmin", "yearmax", "yearsum", "yearmean", "yearavg", "yearvar", "yearvar1", "yearstd", "yearstd1"}
#define    MonstatOperators     {"monrange",  "monmin",  "monmax",  "monsum",  "monmean",  "monavg",  "monvar",  "monvar1",  "monstd",  "monstd1"}
#define    DaystatOperators     {"dayrange",  "daymin",  "daymax",  "daysum",  "daymean",  "dayavg",  "dayvar",  "dayvar1",  "daystd",  "daystd1"}
#define    HourstatOperators    {"hourrange", "hourmin", "hourmax", "hoursum", "hourmean", "houravg", "hourvar", "hourvar1", "hourstd", "hourstd1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
478
479
#define  TimcorOperators        {"timcor"}
#define  TimcovarOperators      {"timcovar"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
480
#define  Timstat3Operators      {"meandiff2test", "varquot2test"}
481
#define  TinfoOperators         {"tinfo"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
482
#define  TocomplexOperators     {"retocomplex", "imtocomplex"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
483
#define  TransposeOperators     {"transxy"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
484
485
#define  TrendOperators         {"trend"}
#define  TrmsOperators          {"trms"}
486
#define  TstepcountOperators    {"tstepcount"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
487
#define  VargenOperators        {"random", "const", "sincos", "coshill", "for", "topo", "temp", "mask", "stdatm"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
488
#define  VarrmsOperators        {"varrms"}
489
#define  VertintmlOperators     {"ml2pl", "ml2hl", "ml2plx", "ml2hlx", "ml2pl_lp", "ml2hl_lp", "ml2plx_lp", "ml2hlx_lp"}
490
#define  VertintapOperators     {"ap2pl", "ap2plx", "ap2pl_lp", "ap2plx_lp", "ap2hl", "ap2hlx"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
491
#define  VertstatOperators      {"vertrange", "vertmin", "vertmax", "vertsum", "vertint", "vertmean", "vertavg", "vertstd", "vertstd1", "vertvar", "vertvar1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
492
#define  VertcumOperators       {"vertcum", "vertcumhl"}
493
#define  VertwindOperators      {"vertwind"}
494
#define  VerifygridOperators    {"verifygrid"}
Uwe Schulzweida's avatar
update    
Uwe Schulzweida committed
495
#define  WindOperators          {"uv2dv", "uv2dvl", "dv2uv", "dv2uvl", "dv2ps"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
496
#define  WritegridOperators     {"writegrid"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
497
#define  WriterandomOperators   {"writerandom"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
498
#define  YAROperators           {"yarbil", "yarnn", "yarcon"}
499
#define  YearmonstatOperators   {"yearmonmean", "yearmonavg"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
500
#define  YdayarithOperators     {"ydayadd", "ydaysub", "ydaymul", "ydaydiv"}
501
#define  YdaypctlOperators      {"ydaypctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
502
#define  YdaystatOperators      {"ydayrange", "ydaymin", "ydaymax", "ydaysum", "ydaymean", "ydayavg", "ydaystd", "ydaystd1", "ydayvar", "ydayvar1"}
503
#define  YdrunpctlOperators     {"ydrunpctl"}
504
#define  YdrunstatOperators     {"ydrunmin", "ydrunmax", "ydrunsum", "ydrunmean", "ydrunavg", "ydrunstd", "ydrunstd1", "ydrunvar", "ydrunvar1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
505
#define  YhourarithOperators    {"yhouradd", "yhoursub", "yhourmul", "yhourdiv"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
506
#define  YhourstatOperators     {"yhourrange", "yhourmin", "yhourmax", "yhoursum", "yhourmean", "yhouravg", "yhourstd", "yhourstd1", "yhourvar", "yhourvar1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
507
508
#define  YmonarithOperators     {"ymonadd", "ymonsub", "ymonmul", "ymondiv"}
#define  YseasarithOperators    {"yseasadd", "yseassub", "yseasmul", "yseasdiv"}
509
#define  YmonpctlOperators      {"ymonpctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
510
#define  YmonstatOperators      {"ymonrange", "ymonmin", "ymonmax", "ymonsum", "ymonmean", "ymonavg", "ymonstd", "ymonstd1", "ymonvar", "ymonvar1"}
511
#define  YseaspctlOperators     {"yseaspctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
512
#define  YseasstatOperators     {"yseasrange", "yseasmin", "yseasmax", "yseassum", "yseasmean", "yseasavg", "yseasstd", "yseasstd1", "yseasvar", "yseasvar1"}
513
#define  ZonstatOperators       {"zonrange", "zonmin", "zonmax", "zonsum", "zonmean", "zonavg", "zonstd", "zonstd1", "zonvar", "zonvar1", "zonpctl"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
514

515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
#define  EcaCfdOperators        {"eca_cfd"}
#define  EcaCsuOperators        {"eca_csu"}
#define  EcaCwfiOperators       {"eca_cwfi"}
#define  EcaHwdiOperators       {"eca_hwdi"}
#define  EcaEtrOperators        {"eca_etr"}
#define  EcaFdOperators         {"eca_fd"}
#define  EcaGslOperators        {"eca_gsl"}
#define  EcaHdOperators         {"eca_hd"}
#define  EcaCwdiOperators       {"eca_cwdi"}
#define  EcaHwfiOperators       {"eca_hwfi"}
#define  EcaIdOperators         {"eca_id"}
#define  EcaSuOperators         {"eca_su"}
#define  EcaTrOperators         {"eca_tr"}
#define  EcaTg10pOperators      {"eca_tg10p"}
#define  EcaTg90pOperators      {"eca_tg90p"}
#define  EcaTn10pOperators      {"eca_tn10p"}
#define  EcaTn90pOperators      {"eca_tn90p"}
#define  EcaTx10pOperators      {"eca_tx10p"}
#define  EcaTx90pOperators      {"eca_tx90p"}

#define  EcaCddOperators        {"eca_cdd"}
#define  EcaCwdOperators        {"eca_cwd"}
#define  EcaRr1Operators        {"eca_rr1"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
538
/*
539
540
#define  EcaR10mmOperators      {"eca_r10mm"}
#define  EcaR20mmOperators      {"eca_r20mm"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
541
542
*/
#define  EcaPdOperators         {"eca_pd", "eca_r10mm", "eca_r20mm"}
543
544
545
546
547
548
549
550
551
552
553
554
#define  EcaR75pOperators       {"eca_r75p"}
#define  EcaR75ptotOperators    {"eca_r75ptot"}
#define  EcaR90pOperators       {"eca_r90p"}
#define  EcaR90ptotOperators    {"eca_r90ptot"}
#define  EcaR95pOperators       {"eca_r95p"}
#define  EcaR95ptotOperators    {"eca_r95ptot"}
#define  EcaR99pOperators       {"eca_r99p"}
#define  EcaR99ptotOperators    {"eca_r99ptot"}
#define  EcaRx1dayOperators     {"eca_rx1day"}
#define  EcaRx5dayOperators     {"eca_rx5day"}
#define  EcaSdiiOperators       {"eca_sdii"}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
555
#define  FdnsOperators          {"fdns"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
556

Uwe Schulzweida's avatar
Uwe Schulzweida committed
557
558
559
560
#define  StrwinOperators        {"strwin"}
#define  StrbreOperators        {"strbre"}
#define  StrgalOperators        {"strgal"}
#define  HurrOperators          {"hurr"}
561
562

#define  HiOperators            {"hi"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
563
#define  WctOperators           {"wct"}
564

565
#define  MagplotOperators       {"contour", "shaded", "grfill"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
566
#define  MagvectorOperators     {"vector"}
567
#define  MaggraphOperators      {"graph"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
568

569
570
// HIRLAM_EXTENSIONS
#define  SelmultiOperators      {"selmulti", "delmulti", "changemulti"}
571
#define  WindTransOperators     {"uvDestag", "rotuvN", "rotuvNorth", "projuvLatLon"}
572
#define  SamplegridOperators    {"samplegrid", "subgrid"}
573
574


575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
/* clang-format on */
/* \endcond */

/**
 * @param a pointer to a string/substring
 * @param b pointer to a string/substring
 * @param alen length of string a
 * @param blen lenght of string b
 * @retval true if a is similar to b
 * @retval false if a is not similar to b
 *
 * Recursive function for finding substrings of a operator name that match other
 * operators.
 */

static bool similar(const char *a, const char *b, unsigned long alen, unsigned long blen) {
    if (alen > 2 && blen > 2 && strstr(b, a))
        return true;

    while (*a && *b && *a == *b) {
        a++;
        b++;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
597
    }
598
599
600
601
602
603
604
605
606
607
608
609
    if (!*a && !*b)
        return true;
    /*
      printf("%d %d %s %s\n", alen, blen, a, b);
    */
    if (alen >= 2 && blen >= 1 && *a && similar(a + 1, b, alen - 2, blen - 1))
        return true;

    if (alen >= 1 && blen >= 2 && *b && similar(a, b + 1, alen - 1, blen - 2))
        return true;

    return false;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
610
611
}

612
613
614
615
616
617
618
619
620
621
622
/**
 * @param original string tested for similarity to \p other
 * @param other string that \p original will be compared to
 * @retval true if original and other are similar
 * @retval false if not
 *
 * Wrapper function for #similar() to parse c++ strings to c strings
 */
static bool similar(std::string original, std::string other) {
    return (similar(original.c_str(), other.c_str(), original.size(), other.size()));
}
623

624
625
626
627
628
629
630
631
/**
 * @param operatorName operator name
 * @retval true if #modules_map contains \p operatorName
 * @retval false if not
 */
bool operator_name_exists(std::string operatorName) {
    if (modules_map.find(operatorName) != modules_map.end()) {
        return true;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
632
    }
633
634
    if (aliases.find(operatorName) != aliases.end()) {
        return true;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
635
    }
636
    return false;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
637
638
}

639
640
641
642
643
644
645
646
647
648
/**
 * @param moduleName module name
 * @retval true if #modules contains \a moduleName
 * @retval false if not
 */
bool module_map_contains(std::string moduleName) {
    if (modules.find(moduleName) != modules.end()) {
        return true;
    } else {
        Error("Module %s not found", moduleName.c_str());
Uwe Schulzweida's avatar
Uwe Schulzweida committed
649
    }
650
651
    return false;
}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
652

653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
/***
 * function for finding similar operator names for the given string
 * @param operatorName operator name to find similar operators for
 * @returns A string with all found names. The string is seqmented into lines
 * with a max lenght of 75 characters
 */
std::string find_similar(std::string operatorName) {
    std::string found_similar_operators = "";
    unsigned long lines = 1;
    unsigned long line_length = 75;
    if (operatorName != "") {
        // Searching for simlar operator names in operator to module map
        for (auto str : modules_map) {
            if (similar(string2lower(operatorName), str.first)) {
                if (found_similar_operators.size() + str.first.size() > lines * line_length) {
                    found_similar_operators += "\n";
                    lines++;
670
                }
671
672
                found_similar_operators += str.first;
                found_similar_operators += " ";
673
674
            }
        }
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
        // Searching for similar operator names in aliases to original map
        for (auto str : aliases) {
            if (similar(string2lower(operatorName), str.first)) {
                if (found_similar_operators.size() + str.first.size() > lines * line_length) {
                    found_similar_operators += "\n";
                    lines++;
                }
                found_similar_operators += str.first;
                found_similar_operators += " ";
            }
        }
    }
    return found_similar_operators;
}
/**
 * @param operatorName operator name.
 * @retval true if \p operatorName exists.
 * @retval false if \p operatorName is not in #modules_map
 *
 * Checks if given \p operatorName is in #modules_map. Else returns false.

 * Checks if \p operatorName is not a file.

 * If no matching operator is found checks for similar operators using
 find_similar().
 *
 *  \note If \p operatorName is a file name the program will exit.
 */
bool check_operator(std::string operatorName) {
    if (operator_name_exists(operatorName)) {
        return true;
    } else if (operatorName == "")
        Error("Operator name missing!");

    else {
        // Checking if the operatorname is an existing file name
        FILE *fp = fopen(operatorName.c_str(), "r");
        if (fp) {
            fclose(fp);
            fprintf(stderr, "Use commandline option -h for help.");
            Error("Operator missing, %s is a file on disk!", operatorName.c_str());

            // Operator is no filename
            // Checking for similar operators
            fprintf(stderr, "Operator >%s< not found!\n", operatorName.c_str());
            fprintf(stderr, "Similar operators are:\n");
            std::string found_similar_operators = find_similar(operatorName);

            if (found_similar_operators.size() > 0) {
                std::cerr << found_similar_operators << std::endl;
            } else {
                fprintf(stderr, "(not found)\n");
            }
            exit(EXIT_FAILURE);
        }
    }
    return false;
}
733

734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
/***
 * Adds a module and its operators to cdo.
 * Adds the module to modules
 * Adds the operators of modules to modules_map
 * @param new_module newly constructed module
 * @note: if an error happens while adding the new module cdo will exit.
 */
void add_module(std::string module_name, modules_t new_module) {
    if (modules.find(module_name) == modules.end()) {
        modules[module_name] = new_module;
        for (std::string operatorName : new_module.operators) {
            // if the operator name is not already in the map or in the aliases
            if (!operator_name_exists(operatorName)) {
                modules_map[operatorName] = module_name;
            } else {
                Error("Tried to add operator but the operator name already exists");
            }
        }
    } else {
        Error("Module %s name already exists", module_name.c_str());
    }
}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
756

757
758
759
760
761
762
763
764
765
766
767
768
769
/**
 * adds an key value pair to #modules_map with alias as key and originals name
 * as value
 * @param alias new alias to be added
 * @param original original operator name
 */
int add_alias(std::string alias, std::string original) {
    auto iter_original = modules_map.find(original);
    auto iter_alias = aliases.find(alias);

    if (iter_alias != aliases.end()) {
        Warning("alias %s could not be added: it already exists", alias.c_str());
        return -1;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
770
771
    }

772
773
774
775
776
777
    if (iter_original == modules_map.end()) {
        Error("alias %s could not be added: operator %s does not exist", alias.c_str(),
              original.c_str());
        return -2;
    }
    if (modules_map.find(alias) != modules_map.end()) {
778
      Error("alias %s could not be added: alias name already exists as an operator", alias.c_str());
779
780
    }
    aliases[alias] = original;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
781

782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
    return 0;
}
/* clang-format off */
// stream in  -1 means: unlimited number of input streams
// stream out -1 means: usage of obase
/***
 * Initializes all hardcoded modules.
 */
void init_modules()
{
/*                             function        help function      operator names          mode number     num streams
                                                                                                  type       in out      */
  add_module("Adisit"        , {Adisit        , AdisitHelp        , AdisitOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Afterburner"   , {Afterburner   , AfterburnerHelp   , AfterburnerOperators   , 1 , CDI_REAL , -1 , 1  });
  add_module("Arith"         , {Arith         , ArithHelp         , ArithOperators         , 1 , CDI_REAL , 2  , 1  });
  add_module("Arithc"        , {Arithc        , ArithcHelp        , ArithcOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Arithdays"     , {Arithdays     , ArithdaysHelp     , ArithdaysOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Arithlat"      , {Arithlat      , {}                , ArithlatOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Cat"           , {Cat           , CopyHelp          , CatOperators           , 1 , CDI_REAL , -1 , 1  });
  add_module("CDItest"       , {CDItest       , {}                , CDItestOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("CDIread"       , {CDIread       , {}                , CDIreadOperators       , 1 , CDI_REAL , 1  , 0  });
  add_module("CDIwrite"      , {CDIwrite      , {}                , CDIwriteOperators      , 1 , CDI_REAL , 0  , 1  });
  add_module("Change"        , {Change        , ChangeHelp        , ChangeOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Change_e5slm"  , {Change_e5slm  , {}                , Change_e5slmOperators  , 0 , CDI_REAL , 1  , 1  });
  add_module("Cloudlayer"    , {Cloudlayer    , {}                , CloudlayerOperators    , 1 , CDI_REAL , 1  , 1  });
  add_module("CMOR_lite"     , {CMOR_lite     , CMORliteHelp      , CMORliteOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("CMOR_table"    , {CMOR_table    , {}                , CMORtableOperators     , 1 , CDI_REAL , 0  , 0  });
  add_module("Collgrid"      , {Collgrid      , CollgridHelp      , CollgridOperators      , 1 , CDI_REAL , -1 , 1  });
  add_module("Command"       , {Command       , {}                , CommandOperators       , 0 , CDI_REAL , 1  , 0  });
  add_module("Comp"          , {Comp          , CompHelp          , CompOperators          , 1 , CDI_REAL , 2  , 1  });
  add_module("Compc"         , {Compc         , CompcHelp         , CompcOperators         , 1 , CDI_REAL , 1  , 1  });
  add_module("Complextorect" , {Complextorect , {}                , ComplextorectOperators , 1 , CDI_COMP , 1  , 2  });
  add_module("Cond"          , {Cond          , CondHelp          , CondOperators          , 1 , CDI_REAL , 2  , 1  });
  add_module("Cond2"         , {Cond2         , Cond2Help         , Cond2Operators         , 1 , CDI_REAL , 3  , 1  });
  add_module("Condc"         , {Condc         , CondcHelp         , CondcOperators         , 1 , CDI_REAL , 1  , 1  });
  add_module("Consecstat"    , {Consecstat    , ConsecstatHelp    , ConsecstatOperators    , 1 , CDI_REAL , 1  , 1  });
  add_module("Copy"          , {Copy          , CopyHelp          , CopyOperators          , 1 , CDI_REAL , -1 , 1  });
  add_module("Deltat"        , {Deltat        , {}                , DeltatOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Deltime"       , {Deltime       , {}                , DeltimeOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Derivepar"     , {Derivepar     , DeriveparHelp     , DeriveparOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Detrend"       , {Detrend       , DetrendHelp       , DetrendOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Diff"          , {Diff          , DiffHelp          , DiffOperators          , 1 , CDI_REAL , 2  , 0  });
  add_module("Distgrid"      , {Distgrid      , DistgridHelp      , DistgridOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Duplicate"     , {Duplicate     , DuplicateHelp     , DuplicateOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Echam5ini"     , {Echam5ini     , {}                , Echam5iniOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Enlarge"       , {Enlarge       , EnlargeHelp       , EnlargeOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Enlargegrid"   , {Enlargegrid   , {}                , EnlargegridOperators   , 0 , CDI_REAL , 1  , 1  });
  add_module("Ensstat"       , {Ensstat       , EnsstatHelp       , EnsstatOperators       , 1 , CDI_REAL , -1 , 1  });
  add_module("Ensstat3"      , {Ensstat3      , Ensstat2Help      , Ensstat3Operators      , 1 , CDI_REAL , -1 , 1  });
  add_module("Ensval"        , {Ensval        , EnsvalHelp        , EnsvalOperators        , 1 , CDI_REAL , -1 , 1  });
  add_module("Eofcoeff"      , {Eofcoeff      , EofcoeffHelp      , EofcoeffOperators      , 1 , CDI_REAL , 2  , -1 });
  add_module("Eofcoeff3d"    , {Eofcoeff3d    , EofcoeffHelp      , Eofcoeff3dOperators    , 1 , CDI_REAL , 2  , -1 });
  add_module("EOFs"          , {EOFs          , EOFsHelp          , EOFsOperators          , 1 , CDI_REAL , 1  , 2  });
  add_module("EOF3d"         , {EOF3d         , EOFsHelp          , EOF3dOperators         , 1 , CDI_REAL , 1  , 2  });
  add_module("Expr"          , {Expr          , ExprHelp          , ExprOperators          , 1 , CDI_REAL , 1  , 1  });
  add_module("FC"            , {FC            , {}                , FCOperators            , 1 , CDI_REAL , 1  , 1  });
  add_module("Filedes"       , {Filedes       , FiledesHelp       , FiledesOperators       , 1 , CDI_BOTH , 1  , 0  });
  add_module("Fillmiss"      , {Fillmiss      , {}                , FillmissOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Filter"        , {Filter        , FilterHelp        , FilterOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Fldrms"        , {Fldrms        , {}                , FldrmsOperators        , 1 , CDI_REAL , 2  , 1  });
  add_module("Fldstat"       , {Fldstat       , FldstatHelp       , FldstatOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Fldstatcor"    , {Fldstat2      , FldcorHelp        , FldcorOperators        , 1 , CDI_REAL , 2  , 1  });
  add_module("Fldstatvar"    , {Fldstat2      , FldcovarHelp      , FldcovarOperators      , 1 , CDI_REAL , 2  , 1  });
  add_module("Fourier"       , {Fourier       , {}                , FourierOperators       , 1 , CDI_COMP , 1  , 1  });
  add_module("Gengrid"       , {Gengrid       , {}                , GengridOperators       , 1 , CDI_REAL , 2  , 1  });
  add_module("Gradsdes"      , {Gradsdes      , GradsdesHelp      , GradsdesOperators      , 1 , CDI_REAL , 1  , 0  });
  add_module("Gridboxstat"   , {Gridboxstat   , GridboxstatHelp   , GridboxstatOperators   , 1 , CDI_REAL , 1  , 1  });
  add_module("Gridcell"      , {Gridcell      , GridcellHelp      , GridcellOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Gridsearch"    , {Gridsearch    , {}                , GridsearchOperators    , 0 , CDI_REAL , 0  , 0  });
  add_module("Harmonic"      , {Harmonic      , {}                , HarmonicOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Histogram"     , {Histogram     , HistogramHelp     , HistogramOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Importamsr"    , {Importamsr    , ImportamsrHelp    , ImportamsrOperators    , 1 , CDI_REAL , 1  , 1  });
  add_module("Importbinary"  , {Importbinary  , ImportbinaryHelp  , ImportbinaryOperators  , 1 , CDI_REAL , 1  , 1  });
  add_module("Importcmsaf"   , {Importcmsaf   , ImportcmsafHelp   , ImportcmsafOperators   , 1 , CDI_REAL , 1  , 1  });
  add_module("Importobs"     , {Importobs     , {}                , ImportobsOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Info"          , {Info          , InfoHelp          , InfoOperators          , 1 , CDI_BOTH , -1 , 0  });
  add_module("Input"         , {Input         , InputHelp         , InputOperators         , 1 , CDI_REAL , 0  , 1  });
  add_module("Intgrid"       , {Intgrid       , {}                , IntgridOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Intgridtraj"   , {Intgridtraj   , {}                , IntgridtrajOperators   , 1 , CDI_REAL , 1  , 1  });
  add_module("Intlevel"      , {Intlevel      , IntlevelHelp      , IntlevelOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Intlevel3d"    , {Intlevel3d    , Intlevel3dHelp    , Intlevel3dOperators    , 1 , CDI_REAL , 2  , 1  });
  add_module("Inttime"       , {Inttime       , InttimeHelp       , InttimeOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Intntime"      , {Intntime      , InttimeHelp       , IntntimeOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Intyear"       , {Intyear       , IntyearHelp       , IntyearOperators       , 1 , CDI_REAL , 2  , -1 });
  add_module("Invert"        , {Invert        , InvertHelp        , InvertOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Invertlev"     , {Invertlev     , InvertlevHelp     , InvertlevOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Isosurface"    , {Isosurface    , {}                , IsosurfaceOperators    , 1 , CDI_REAL , 1  , 1  });
  add_module("Log"           , {Log           , {}                , LogOperators           , 0 , CDI_REAL , 1  , 0  });
  add_module("MapReduce"     , {MapReduce     , MapReduceHelp     , MapReduceOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Maskbox"       , {Maskbox       , MaskboxHelp       , MaskboxOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Maskregion"    , {Maskbox       , MaskregionHelp    , MaskregionOperators    , 1 , CDI_REAL , 1  , 1  });
  add_module("Mastrfu"       , {Mastrfu       , MastrfuHelp       , MastrfuOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Math"          , {Math          , MathHelp          , MathOperators          , 1 , CDI_BOTH , 1  , 1  });
  add_module("Merge"         , {Merge         , MergeHelp         , MergeOperators         , 1 , CDI_REAL , -1 , 1  });
  add_module("Mergetime"     , {Mergetime     , MergeHelp         , MergetimeOperators     , 1 , CDI_REAL , -1 , 1  });
  add_module("Mergegrid"     , {Mergegrid     , MergegridHelp     , MergegridOperators     , 1 , CDI_REAL , 2  , 1  });
  add_module("Merstat"       , {Merstat       , MerstatHelp       , MerstatOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Monarith"      , {Monarith      , MonarithHelp      , MonarithOperators      , 1 , CDI_REAL , 2  , 1  });
  add_module("Mrotuv"        , {Mrotuv        , {}                , MrotuvOperators        , 1 , CDI_REAL , 1  , 2  });
  add_module("Mrotuvb"       , {Mrotuvb       , {}                , MrotuvbOperators       , 1 , CDI_REAL , 2  , 1  });
  add_module("Ninfo"         , {Ninfo         , NinfoHelp         , NinfoOperators         , 1 , CDI_BOTH , 1  , 0  });
  add_module("Nmldump"       , {Nmldump       , {}                , NmldumpOperators       , 0 , CDI_REAL , 0  , 0  });
  add_module("Output"        , {Output        , OutputHelp        , OutputOperators        , 1 , CDI_REAL , -1 , 0  });
  add_module("Outputtab"     , {Output        , OutputtabHelp     , OutputtabOperators     , 1 , CDI_REAL , -1 , 0  });
  add_module("Outputgmt"     , {Outputgmt     , OutputgmtHelp     , OutputgmtOperators     , 1 , CDI_REAL , 1  , 0  });
  add_module("Pack"          , {Pack          , {}                , PackOperators          , 1 , CDI_REAL , 1  , 1  });
  add_module("Pardup"        , {Pardup        , {}                , PardupOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Pinfo"         , {Pinfo         , {}                , PinfoOperators         , 1 , CDI_REAL , 1  , 1  });
  add_module("Pressure"      , {Pressure      , {}                , PressureOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Regres"        , {Regres        , RegresHelp        , RegresOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Remap"         , {Remap         , RemapHelp         , RemapOperators         , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapbil"      , {Remap         , RemapbilHelp      , RemapbilOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapbic"      , {Remap         , RemapbicHelp      , RemapbicOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapnn"       , {Remap         , RemapnnHelp       , RemapnnOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapdis"      , {Remap         , RemapdisHelp      , RemapdisOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapycon"     , {Remap         , RemapyconHelp     , RemapyconOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapcon"      , {Remap         , RemapconHelp      , RemapconOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapcon2"     , {Remap         , Remapcon2Help     , Remapcon2Operators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Remaplaf"      , {Remap         , RemaplafHelp      , RemaplafOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapgrid"     , {Remap         , {}                , RemapgridOperators     , 1 , CDI_REAL , 1  , 1  });
  add_module("Remapeta"      , {Remapeta      , RemapetaHelp      , RemapetaOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Replace"       , {Replace       , ReplaceHelp       , ReplaceOperators       , 1 , CDI_REAL , 2  , 1  });
  add_module("Replacevalues" , {Replacevalues , ReplacevaluesHelp , ReplacevaluesOperators , 1 , CDI_REAL , 1  , 1  });
  add_module("Rhopot"        , {Rhopot        , RhopotHelp        , RhopotOperators        , 1 , CDI_REAL , 1  , 1  });
  add_module("Rotuv"         , {Rotuv         , RotuvbHelp        , RotuvOperators         , 1 , CDI_REAL , 1  , 1  });
  add_module("Runpctl"       , {Runpctl       , RunpctlHelp       , RunpctlOperators       , 1 , CDI_REAL , 1  , 1  });
  add_module("Runstat"       , {Runstat       , RunstatHelp       , RunstatOperators       , 1 , CDI_REAL , 1  , 1  });
Uwe Schulzweida's avatar
Uwe Schulzweida committed
909
  add_module("Samplegridicon", {Samplegridicon, {}                , SamplegridiconOperators, 1,  CDI_REAL,  1  , 2  });
910
911
912
913
  add_module("Seascount"     , {Seascount     , {}                , SeascountOperators     , 1 , CDI_BOTH , 1  , 1  });
  add_module("Seaspctl"      , {Seaspctl      , SeaspctlHelp      , SeaspctlOperators      , 1 , CDI_REAL , 3  , 1  });
  add_module("Seasstat"      , {Seasstat      , SeasstatHelp      , SeasstatOperators      , 1 , CDI_REAL , 1  , 1  });
  add_module("Selbox"        , {Selbox        , SelboxHelp        , SelboxOperators        , 1 , CDI_BOTH , 1  , 1  });
Uwe Schulzweida's avatar
Uwe Schulzweida committed
914
  add_module("Selgridcell"   , {Selgridcell   , {}                , SelgridcellOperators   , 1 , CDI_BOTH , 1  , 1  });
915
916
917
918
919
920
  add_module("Select"        , {Select        , SelectHelp        , SelectOperators        , 1 , CDI_BOTH , -1 , 1  });
  add_module("Selvar"        , {Selvar        , SelvarHelp        , SelvarOperators        , 1 , CDI_BOTH , 1  , 1  });
  add_module("Selrec"        , {Selrec        , SelvarHelp        , SelrecOperators        , 1 , CDI_BOTH , 1  , 1  });
  add_module("Seloperator"   , {Seloperator   , {}                , SeloperatorOperators   , 1 , CDI_REAL , 1  , 1  });
  add_module("Seltime"       , {Seltime       , SeltimeHelp       , SeltimeOperators       , 1 , CDI_BOTH , 1  , 1  });
  add_module("Set"           , {Set           , SetHelp           , SetOperators           , 1 , CDI_BOTH , 1  , 1  });
Uwe Schulzweida's avatar
Uwe Schulzweida committed
921
  add_module("Setattribute"  , {Setattribute  , SetattributeHelp  , SetattributeOperators  , 1 , CDI_REAL , 1  , 1  });
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959