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
int NumModules;
int NumAliases;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
39

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

232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
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);
255
void *EcaPd(void *argument);
256
257
258
259
260
261
262
263
264
265
266
267
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
268
269
270
271
272
void *Fdns(void *argument);
void *Strwin(void *argument);
void *Strbre(void *argument);
void *Strgal(void *argument);
void *Hurr(void *argument);
273

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

277
278
279
280
void *Magplot(void *argument);
void *Magvector(void *argument);
void *Maggraph(void *argument);

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

Uwe Schulzweida's avatar
Uwe Schulzweida committed
286

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

517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
#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
540
/*
541
542
#define  EcaR10mmOperators      {"eca_r10mm"}
#define  EcaR20mmOperators      {"eca_r20mm"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
543
544
*/
#define  EcaPdOperators         {"eca_pd", "eca_r10mm", "eca_r20mm"}
545
546
547
548
549
550
551
552
553
554
555
556
#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
557
#define  FdnsOperators          {"fdns"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
558

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

#define  HiOperators            {"hi"}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
565
#define  WctOperators           {"wct"}
566

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

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


577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
/* 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
599
    }
600
601
602
603
604
605
606
607
608
609
610
611
    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
612
613
}

614
615
616
617
618
619
620
621
622
623
624
/**
 * @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()));
}
625

626
627
628
629
630
631
632
633
/**
 * @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
634
    }
635
636
    if (aliases.find(operatorName) != aliases.end()) {
        return true;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
637
    }
638
    return false;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
639
640
}

641
642
643
644
645
646
647
648
649
650
/**
 * @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
651
    }
652
653
    return false;
}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
654

655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
/***
 * 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++;
672
                }
673
674
                found_similar_operators += str.first;
                found_similar_operators += " ";
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
733
734
        // 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;
}
735

736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
/***
 * 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;
                NumModules++;
            } 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
759

760
761
762
763
764
765
766
767
768
769
770
771
772
/**
 * 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
773
774
    }

775
776
777
778
779
780
    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()) {
781
      Error("alias %s could not be added: alias name already exists as an operator", alias.c_str());
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
909
910
911
    }
    aliases[alias] = original;
    NumAliases++;
    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
912
  add_module("Samplegridicon", {Samplegridicon, {}                , SamplegridiconOperators, 1,  CDI_REAL,  1  , 2  });
913
914
915
916
  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
917
  add_module("Selgridcell"   , {Selgridcell   , {}                , SelgridcellOperators   , 1 , CDI_BOTH , 1  , 1  });
918
919
920
921
922
923
  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
924
  add_module("Setattribute"  , {Setattribute  , SetattributeHelp  , SetattributeOperators  , 1 , CDI_REAL , 1  , 1  });
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
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999