cdi.inc 98.9 KB
Newer Older
1
! This file was automatically generated, don't edit!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
3
! Fortran interface for CDI library version 1.8.1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
4
5
6
!
! Author:
! -------
Uwe Schulzweida's avatar
Uwe Schulzweida committed
7
! Uwe Schulzweida, MPI-MET, Hamburg,   April 2017
Uwe Schulzweida's avatar
Uwe Schulzweida committed
8
9
!

10
      INTEGER    CDI_MAX_NAME
Uwe Schulzweida's avatar
Uwe Schulzweida committed
11
      PARAMETER (CDI_MAX_NAME           = 256)
12
      INTEGER    CDI_UNDEFID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
13
      PARAMETER (CDI_UNDEFID            = -1)
14
      INTEGER    CDI_GLOBAL
Uwe Schulzweida's avatar
Uwe Schulzweida committed
15
16
17
18
      PARAMETER (CDI_GLOBAL             = -1)
!
!  Byte order
!
19
      INTEGER    CDI_BIGENDIAN
Uwe Schulzweida's avatar
Uwe Schulzweida committed
20
      PARAMETER (CDI_BIGENDIAN          =  0)
21
      INTEGER    CDI_LITTLEENDIAN
Uwe Schulzweida's avatar
Uwe Schulzweida committed
22
      PARAMETER (CDI_LITTLEENDIAN       =  1)
23
      INTEGER    CDI_PDPENDIAN
24
      PARAMETER (CDI_PDPENDIAN          =  2)
25
      INTEGER    CDI_REAL
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26
      PARAMETER (CDI_REAL               =  1)
27
      INTEGER    CDI_COMP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
      PARAMETER (CDI_COMP               =  2)
29
      INTEGER    CDI_BOTH
Uwe Schulzweida's avatar
Uwe Schulzweida committed
30
31
32
33
      PARAMETER (CDI_BOTH               =  3)
!
!  Error identifier
!
34
      INTEGER    CDI_NOERR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
35
      PARAMETER (CDI_NOERR              =  0)
36
      INTEGER    CDI_EEOF
Uwe Schulzweida's avatar
Uwe Schulzweida committed
37
      PARAMETER (CDI_EEOF               = -1)
38
      INTEGER    CDI_ESYSTEM
Uwe Schulzweida's avatar
Uwe Schulzweida committed
39
      PARAMETER (CDI_ESYSTEM            = -10)
40
      INTEGER    CDI_EINVAL
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41
      PARAMETER (CDI_EINVAL             = -20)
42
      INTEGER    CDI_EUFTYPE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
      PARAMETER (CDI_EUFTYPE            = -21)
44
      INTEGER    CDI_ELIBNAVAIL
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45
      PARAMETER (CDI_ELIBNAVAIL         = -22)
46
      INTEGER    CDI_EUFSTRUCT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
47
      PARAMETER (CDI_EUFSTRUCT          = -23)
48
      INTEGER    CDI_EUNC4
Uwe Schulzweida's avatar
Uwe Schulzweida committed
49
      PARAMETER (CDI_EUNC4              = -24)
50
      INTEGER    CDI_ELIMIT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
51
52
53
54
      PARAMETER (CDI_ELIMIT             = -99)
!
!  File types
!
55
      INTEGER    CDI_FILETYPE_GRB
56
      PARAMETER (CDI_FILETYPE_GRB       =  1)
57
      INTEGER    CDI_FILETYPE_GRB2
58
      PARAMETER (CDI_FILETYPE_GRB2      =  2)
59
      INTEGER    CDI_FILETYPE_NC
60
      PARAMETER (CDI_FILETYPE_NC        =  3)
61
      INTEGER    CDI_FILETYPE_NC2
62
      PARAMETER (CDI_FILETYPE_NC2       =  4)
63
      INTEGER    CDI_FILETYPE_NC4
64
      PARAMETER (CDI_FILETYPE_NC4       =  5)
65
      INTEGER    CDI_FILETYPE_NC4C
66
      PARAMETER (CDI_FILETYPE_NC4C      =  6)
67
      INTEGER    CDI_FILETYPE_SRV
68
      PARAMETER (CDI_FILETYPE_SRV       =  7)
69
      INTEGER    CDI_FILETYPE_EXT
70
      PARAMETER (CDI_FILETYPE_EXT       =  8)
71
      INTEGER    CDI_FILETYPE_IEG
72
      PARAMETER (CDI_FILETYPE_IEG       =  9)
73
      INTEGER    FILETYPE_GRB
74
      PARAMETER (FILETYPE_GRB           =  1)
75
      INTEGER    FILETYPE_GRB2
76
      PARAMETER (FILETYPE_GRB2          =  2)
77
      INTEGER    FILETYPE_NC
78
      PARAMETER (FILETYPE_NC            =  3)
79
      INTEGER    FILETYPE_NC2
80
      PARAMETER (FILETYPE_NC2           =  4)
81
      INTEGER    FILETYPE_NC4
82
      PARAMETER (FILETYPE_NC4           =  5)
83
      INTEGER    FILETYPE_NC4C
84
      PARAMETER (FILETYPE_NC4C          =  6)
85
      INTEGER    FILETYPE_SRV
86
      PARAMETER (FILETYPE_SRV           =  7)
87
      INTEGER    FILETYPE_EXT
88
      PARAMETER (FILETYPE_EXT           =  8)
89
      INTEGER    FILETYPE_IEG
90
      PARAMETER (FILETYPE_IEG           =  9)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
91
92
93
!
!  Compress types
!
94
      INTEGER    CDI_COMPRESS_NONE
95
      PARAMETER (CDI_COMPRESS_NONE      =  0)
96
      INTEGER    CDI_COMPRESS_SZIP
97
      PARAMETER (CDI_COMPRESS_SZIP      =  1)
98
      INTEGER    CDI_COMPRESS_GZIP
99
      PARAMETER (CDI_COMPRESS_GZIP      =  2)
100
      INTEGER    CDI_COMPRESS_BZIP2
101
      PARAMETER (CDI_COMPRESS_BZIP2     =  3)
102
      INTEGER    CDI_COMPRESS_ZIP
103
      PARAMETER (CDI_COMPRESS_ZIP       =  4)
104
      INTEGER    CDI_COMPRESS_JPEG
105
      PARAMETER (CDI_COMPRESS_JPEG      =  5)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
106
107
108
!
!  external data types
!
109
      INTEGER    CDI_DATATYPE_PACK
110
      PARAMETER (CDI_DATATYPE_PACK      =  0)
111
      INTEGER    CDI_DATATYPE_PACK1
112
      PARAMETER (CDI_DATATYPE_PACK1     =  1)
113
      INTEGER    CDI_DATATYPE_PACK2
114
      PARAMETER (CDI_DATATYPE_PACK2     =  2)
115
      INTEGER    CDI_DATATYPE_PACK3
116
      PARAMETER (CDI_DATATYPE_PACK3     =  3)
117
      INTEGER    CDI_DATATYPE_PACK4
118
      PARAMETER (CDI_DATATYPE_PACK4     =  4)
119
      INTEGER    CDI_DATATYPE_PACK5
120
      PARAMETER (CDI_DATATYPE_PACK5     =  5)
121
      INTEGER    CDI_DATATYPE_PACK6
122
      PARAMETER (CDI_DATATYPE_PACK6     =  6)
123
      INTEGER    CDI_DATATYPE_PACK7
124
      PARAMETER (CDI_DATATYPE_PACK7     =  7)
125
      INTEGER    CDI_DATATYPE_PACK8
126
      PARAMETER (CDI_DATATYPE_PACK8     =  8)
127
      INTEGER    CDI_DATATYPE_PACK9
128
      PARAMETER (CDI_DATATYPE_PACK9     =  9)
129
      INTEGER    CDI_DATATYPE_PACK10
130
      PARAMETER (CDI_DATATYPE_PACK10    = 10)
131
      INTEGER    CDI_DATATYPE_PACK11
132
      PARAMETER (CDI_DATATYPE_PACK11    = 11)
133
      INTEGER    CDI_DATATYPE_PACK12
134
      PARAMETER (CDI_DATATYPE_PACK12    = 12)
135
      INTEGER    CDI_DATATYPE_PACK13
136
      PARAMETER (CDI_DATATYPE_PACK13    = 13)
137
      INTEGER    CDI_DATATYPE_PACK14
138
      PARAMETER (CDI_DATATYPE_PACK14    = 14)
139
      INTEGER    CDI_DATATYPE_PACK15
140
      PARAMETER (CDI_DATATYPE_PACK15    = 15)
141
      INTEGER    CDI_DATATYPE_PACK16
142
      PARAMETER (CDI_DATATYPE_PACK16    = 16)
143
      INTEGER    CDI_DATATYPE_PACK17
144
      PARAMETER (CDI_DATATYPE_PACK17    = 17)
145
      INTEGER    CDI_DATATYPE_PACK18
146
      PARAMETER (CDI_DATATYPE_PACK18    = 18)
147
      INTEGER    CDI_DATATYPE_PACK19
148
      PARAMETER (CDI_DATATYPE_PACK19    = 19)
149
      INTEGER    CDI_DATATYPE_PACK20
150
      PARAMETER (CDI_DATATYPE_PACK20    = 20)
151
      INTEGER    CDI_DATATYPE_PACK21
152
      PARAMETER (CDI_DATATYPE_PACK21    = 21)
153
      INTEGER    CDI_DATATYPE_PACK22
154
      PARAMETER (CDI_DATATYPE_PACK22    = 22)
155
      INTEGER    CDI_DATATYPE_PACK23
156
      PARAMETER (CDI_DATATYPE_PACK23    = 23)
157
      INTEGER    CDI_DATATYPE_PACK24
158
      PARAMETER (CDI_DATATYPE_PACK24    = 24)
159
      INTEGER    CDI_DATATYPE_PACK25
160
      PARAMETER (CDI_DATATYPE_PACK25    = 25)
161
      INTEGER    CDI_DATATYPE_PACK26
162
      PARAMETER (CDI_DATATYPE_PACK26    = 26)
163
      INTEGER    CDI_DATATYPE_PACK27
164
      PARAMETER (CDI_DATATYPE_PACK27    = 27)
165
      INTEGER    CDI_DATATYPE_PACK28
166
      PARAMETER (CDI_DATATYPE_PACK28    = 28)
167
      INTEGER    CDI_DATATYPE_PACK29
168
      PARAMETER (CDI_DATATYPE_PACK29    = 29)
169
      INTEGER    CDI_DATATYPE_PACK30
170
      PARAMETER (CDI_DATATYPE_PACK30    = 30)
171
      INTEGER    CDI_DATATYPE_PACK31
172
      PARAMETER (CDI_DATATYPE_PACK31    = 31)
173
      INTEGER    CDI_DATATYPE_PACK32
174
      PARAMETER (CDI_DATATYPE_PACK32    = 32)
175
      INTEGER    CDI_DATATYPE_CPX32
176
      PARAMETER (CDI_DATATYPE_CPX32     = 64)
177
      INTEGER    CDI_DATATYPE_CPX64
178
      PARAMETER (CDI_DATATYPE_CPX64     = 128)
179
      INTEGER    CDI_DATATYPE_FLT32
180
      PARAMETER (CDI_DATATYPE_FLT32     = 132)
181
      INTEGER    CDI_DATATYPE_FLT64
182
      PARAMETER (CDI_DATATYPE_FLT64     = 164)
183
      INTEGER    CDI_DATATYPE_INT8
184
      PARAMETER (CDI_DATATYPE_INT8      = 208)
185
      INTEGER    CDI_DATATYPE_INT16
186
      PARAMETER (CDI_DATATYPE_INT16     = 216)
187
      INTEGER    CDI_DATATYPE_INT32
188
      PARAMETER (CDI_DATATYPE_INT32     = 232)
189
      INTEGER    CDI_DATATYPE_UINT8
190
      PARAMETER (CDI_DATATYPE_UINT8     = 308)
191
      INTEGER    CDI_DATATYPE_UINT16
192
      PARAMETER (CDI_DATATYPE_UINT16    = 316)
193
      INTEGER    CDI_DATATYPE_UINT32
194
      PARAMETER (CDI_DATATYPE_UINT32    = 332)
195
      INTEGER    DATATYPE_PACK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
196
      PARAMETER (DATATYPE_PACK          =  0)
197
      INTEGER    DATATYPE_PACK8
Uwe Schulzweida's avatar
Uwe Schulzweida committed
198
      PARAMETER (DATATYPE_PACK8         =  8)
199
      INTEGER    DATATYPE_PACK16
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
      PARAMETER (DATATYPE_PACK16        = 16)
201
      INTEGER    DATATYPE_PACK24
Uwe Schulzweida's avatar
Uwe Schulzweida committed
202
      PARAMETER (DATATYPE_PACK24        = 24)
203
      INTEGER    DATATYPE_FLT32
Uwe Schulzweida's avatar
Uwe Schulzweida committed
204
      PARAMETER (DATATYPE_FLT32         = 132)
205
      INTEGER    DATATYPE_FLT64
Uwe Schulzweida's avatar
Uwe Schulzweida committed
206
      PARAMETER (DATATYPE_FLT64         = 164)
207
      INTEGER    DATATYPE_INT32
Uwe Schulzweida's avatar
Uwe Schulzweida committed
208
209
210
211
      PARAMETER (DATATYPE_INT32         = 232)
!
!  internal data types
!
212
      INTEGER    CDI_DATATYPE_INT
213
      PARAMETER (CDI_DATATYPE_INT       = 251)
214
      INTEGER    CDI_DATATYPE_FLT
215
      PARAMETER (CDI_DATATYPE_FLT       = 252)
216
      INTEGER    CDI_DATATYPE_TXT
217
      PARAMETER (CDI_DATATYPE_TXT       = 253)
218
      INTEGER    CDI_DATATYPE_CPX
219
      PARAMETER (CDI_DATATYPE_CPX       = 254)
220
      INTEGER    CDI_DATATYPE_UCHAR
221
      PARAMETER (CDI_DATATYPE_UCHAR     = 255)
222
      INTEGER    CDI_DATATYPE_LONG
223
      PARAMETER (CDI_DATATYPE_LONG      = 256)
224
      INTEGER    DATATYPE_INT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
225
      PARAMETER (DATATYPE_INT           = 251)
226
      INTEGER    DATATYPE_FLT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
227
      PARAMETER (DATATYPE_FLT           = 252)
228
      INTEGER    DATATYPE_TXT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
229
      PARAMETER (DATATYPE_TXT           = 253)
230
      INTEGER    DATATYPE_CPX
Uwe Schulzweida's avatar
Uwe Schulzweida committed
231
      PARAMETER (DATATYPE_CPX           = 254)
232
      INTEGER    DATATYPE_UCHAR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
233
      PARAMETER (DATATYPE_UCHAR         = 255)
234
      INTEGER    DATATYPE_LONG
Uwe Schulzweida's avatar
Uwe Schulzweida committed
235
236
237
238
      PARAMETER (DATATYPE_LONG          = 256)
!
!  Chunks
!
239
      INTEGER    CDI_CHUNK_AUTO
240
      PARAMETER (CDI_CHUNK_AUTO         =  1)
241
      INTEGER    CDI_CHUNK_GRID
242
      PARAMETER (CDI_CHUNK_GRID         =  2)
243
      INTEGER    CDI_CHUNK_LINES
244
      PARAMETER (CDI_CHUNK_LINES        =  3)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
245
246
247
!
!  GRID types
!
248
      INTEGER    GRID_GENERIC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
249
      PARAMETER (GRID_GENERIC           =  1)
250
      INTEGER    GRID_GAUSSIAN
Uwe Schulzweida's avatar
Uwe Schulzweida committed
251
      PARAMETER (GRID_GAUSSIAN          =  2)
252
      INTEGER    GRID_GAUSSIAN_REDUCED
Uwe Schulzweida's avatar
Uwe Schulzweida committed
253
      PARAMETER (GRID_GAUSSIAN_REDUCED  =  3)
254
      INTEGER    GRID_LONLAT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
255
      PARAMETER (GRID_LONLAT            =  4)
256
      INTEGER    GRID_SPECTRAL
Uwe Schulzweida's avatar
Uwe Schulzweida committed
257
      PARAMETER (GRID_SPECTRAL          =  5)
258
      INTEGER    GRID_FOURIER
Uwe Schulzweida's avatar
Uwe Schulzweida committed
259
      PARAMETER (GRID_FOURIER           =  6)
260
      INTEGER    GRID_GME
Uwe Schulzweida's avatar
Uwe Schulzweida committed
261
      PARAMETER (GRID_GME               =  7)
262
      INTEGER    GRID_TRAJECTORY
Uwe Schulzweida's avatar
Uwe Schulzweida committed
263
      PARAMETER (GRID_TRAJECTORY        =  8)
264
      INTEGER    GRID_UNSTRUCTURED
Uwe Schulzweida's avatar
Uwe Schulzweida committed
265
      PARAMETER (GRID_UNSTRUCTURED      =  9)
266
      INTEGER    GRID_CURVILINEAR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
267
      PARAMETER (GRID_CURVILINEAR       = 10)
268
      INTEGER    GRID_LCC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
269
      PARAMETER (GRID_LCC               = 11)
270
      INTEGER    GRID_PROJECTION
Uwe Schulzweida's avatar
Uwe Schulzweida committed
271
      PARAMETER (GRID_PROJECTION        = 12)
272
      INTEGER    CDI_PROJ_RLL
273
      PARAMETER (CDI_PROJ_RLL           = 21)
274
      INTEGER    CDI_PROJ_LCC
275
      PARAMETER (CDI_PROJ_LCC           = 22)
276
      INTEGER    CDI_PROJ_LAEA
277
      PARAMETER (CDI_PROJ_LAEA          = 23)
278
      INTEGER    CDI_PROJ_SINU
279
      PARAMETER (CDI_PROJ_SINU          = 24)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
280
281
282
!
!  ZAXIS types
!
283
      INTEGER    ZAXIS_SURFACE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
284
      PARAMETER (ZAXIS_SURFACE          =  0)
285
      INTEGER    ZAXIS_GENERIC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
286
      PARAMETER (ZAXIS_GENERIC          =  1)
287
      INTEGER    ZAXIS_HYBRID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
288
      PARAMETER (ZAXIS_HYBRID           =  2)
289
      INTEGER    ZAXIS_HYBRID_HALF
Uwe Schulzweida's avatar
Uwe Schulzweida committed
290
      PARAMETER (ZAXIS_HYBRID_HALF      =  3)
291
      INTEGER    ZAXIS_PRESSURE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
292
      PARAMETER (ZAXIS_PRESSURE         =  4)
293
      INTEGER    ZAXIS_HEIGHT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
294
      PARAMETER (ZAXIS_HEIGHT           =  5)
295
      INTEGER    ZAXIS_DEPTH_BELOW_SEA
Uwe Schulzweida's avatar
Uwe Schulzweida committed
296
297
298
      PARAMETER (ZAXIS_DEPTH_BELOW_SEA  =  6)
      INTEGER    ZAXIS_DEPTH_BELOW_LAND
      PARAMETER (ZAXIS_DEPTH_BELOW_LAND =  7)
299
      INTEGER    ZAXIS_ISENTROPIC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
300
      PARAMETER (ZAXIS_ISENTROPIC       =  8)
301
      INTEGER    ZAXIS_TRAJECTORY
Uwe Schulzweida's avatar
Uwe Schulzweida committed
302
      PARAMETER (ZAXIS_TRAJECTORY       =  9)
303
      INTEGER    ZAXIS_ALTITUDE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
304
      PARAMETER (ZAXIS_ALTITUDE         = 10)
305
      INTEGER    ZAXIS_SIGMA
Uwe Schulzweida's avatar
Uwe Schulzweida committed
306
      PARAMETER (ZAXIS_SIGMA            = 11)
307
      INTEGER    ZAXIS_MEANSEA
Uwe Schulzweida's avatar
Uwe Schulzweida committed
308
      PARAMETER (ZAXIS_MEANSEA          = 12)
309
      INTEGER    ZAXIS_TOA
Uwe Schulzweida's avatar
Uwe Schulzweida committed
310
      PARAMETER (ZAXIS_TOA              = 13)
311
      INTEGER    ZAXIS_SEA_BOTTOM
Uwe Schulzweida's avatar
Uwe Schulzweida committed
312
      PARAMETER (ZAXIS_SEA_BOTTOM       = 14)
313
      INTEGER    ZAXIS_ATMOSPHERE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
314
      PARAMETER (ZAXIS_ATMOSPHERE       = 15)
315
      INTEGER    ZAXIS_CLOUD_BASE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
316
      PARAMETER (ZAXIS_CLOUD_BASE       = 16)
317
      INTEGER    ZAXIS_CLOUD_TOP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
318
      PARAMETER (ZAXIS_CLOUD_TOP        = 17)
319
      INTEGER    ZAXIS_ISOTHERM_ZERO
Uwe Schulzweida's avatar
Uwe Schulzweida committed
320
      PARAMETER (ZAXIS_ISOTHERM_ZERO    = 18)
321
      INTEGER    ZAXIS_SNOW
Uwe Schulzweida's avatar
Uwe Schulzweida committed
322
      PARAMETER (ZAXIS_SNOW             = 19)
323
      INTEGER    ZAXIS_LAKE_BOTTOM
Uwe Schulzweida's avatar
Uwe Schulzweida committed
324
      PARAMETER (ZAXIS_LAKE_BOTTOM      = 20)
325
      INTEGER    ZAXIS_SEDIMENT_BOTTOM
Uwe Schulzweida's avatar
Uwe Schulzweida committed
326
327
328
329
330
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM  = 21)
      INTEGER    ZAXIS_SEDIMENT_BOTTOM_TA
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TA = 22)
      INTEGER    ZAXIS_SEDIMENT_BOTTOM_TW
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TW = 23)
331
      INTEGER    ZAXIS_MIX_LAYER
Uwe Schulzweida's avatar
Uwe Schulzweida committed
332
      PARAMETER (ZAXIS_MIX_LAYER        = 24)
333
      INTEGER    ZAXIS_REFERENCE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
334
335
336
337
      PARAMETER (ZAXIS_REFERENCE        = 25)
!
!  SUBTYPE types
!
338
      INTEGER    MAX_KV_PAIRS_MATCH
Uwe Schulzweida's avatar
Uwe Schulzweida committed
339
340
341
342
343
344
345
346
347
348
      PARAMETER (MAX_KV_PAIRS_MATCH     = 10)
!
!  Data structure defining a key-value search, possibly with multiple
!  key-value pairs in combination.
!  
!  Currently, only multiple pairs combined by AND are supported.
!
!
!  TIME types
!
349
      INTEGER    TIME_CONSTANT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
350
      PARAMETER (TIME_CONSTANT          =  0)
351
      INTEGER    TIME_VARIABLE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
352
353
354
355
      PARAMETER (TIME_VARIABLE          =  1)
!
!  TSTEP types
!
356
      INTEGER    TSTEP_CONSTANT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
357
      PARAMETER (TSTEP_CONSTANT         =  0)
358
      INTEGER    TSTEP_INSTANT
Uwe Schulzweida's avatar
Uwe Schulzweida committed
359
      PARAMETER (TSTEP_INSTANT          =  1)
360
      INTEGER    TSTEP_AVG
Uwe Schulzweida's avatar
Uwe Schulzweida committed
361
      PARAMETER (TSTEP_AVG              =  2)
362
      INTEGER    TSTEP_ACCUM
Uwe Schulzweida's avatar
Uwe Schulzweida committed
363
      PARAMETER (TSTEP_ACCUM            =  3)
364
      INTEGER    TSTEP_MAX
Uwe Schulzweida's avatar
Uwe Schulzweida committed
365
      PARAMETER (TSTEP_MAX              =  4)
366
      INTEGER    TSTEP_MIN
Uwe Schulzweida's avatar
Uwe Schulzweida committed
367
      PARAMETER (TSTEP_MIN              =  5)
368
      INTEGER    TSTEP_DIFF
Uwe Schulzweida's avatar
Uwe Schulzweida committed
369
      PARAMETER (TSTEP_DIFF             =  6)
370
      INTEGER    TSTEP_RMS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
371
      PARAMETER (TSTEP_RMS              =  7)
372
      INTEGER    TSTEP_SD
Uwe Schulzweida's avatar
Uwe Schulzweida committed
373
      PARAMETER (TSTEP_SD               =  8)
374
      INTEGER    TSTEP_COV
Uwe Schulzweida's avatar
Uwe Schulzweida committed
375
      PARAMETER (TSTEP_COV              =  9)
376
      INTEGER    TSTEP_RATIO
Uwe Schulzweida's avatar
Uwe Schulzweida committed
377
      PARAMETER (TSTEP_RATIO            = 10)
378
      INTEGER    TSTEP_RANGE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
379
      PARAMETER (TSTEP_RANGE            = 11)
380
      INTEGER    TSTEP_INSTANT2
Uwe Schulzweida's avatar
Uwe Schulzweida committed
381
      PARAMETER (TSTEP_INSTANT2         = 12)
382
      INTEGER    TSTEP_INSTANT3
Uwe Schulzweida's avatar
Uwe Schulzweida committed
383
384
385
386
      PARAMETER (TSTEP_INSTANT3         = 13)
!
!  TAXIS types
!
387
      INTEGER    TAXIS_ABSOLUTE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
388
      PARAMETER (TAXIS_ABSOLUTE         =  1)
389
      INTEGER    TAXIS_RELATIVE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
390
      PARAMETER (TAXIS_RELATIVE         =  2)
391
      INTEGER    TAXIS_FORECAST
Uwe Schulzweida's avatar
Uwe Schulzweida committed
392
393
394
395
      PARAMETER (TAXIS_FORECAST         =  3)
!
!  TUNIT types
!
396
      INTEGER    TUNIT_SECOND
Uwe Schulzweida's avatar
Uwe Schulzweida committed
397
      PARAMETER (TUNIT_SECOND           =  1)
398
      INTEGER    TUNIT_MINUTE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
399
      PARAMETER (TUNIT_MINUTE           =  2)
400
      INTEGER    TUNIT_QUARTER
Uwe Schulzweida's avatar
Uwe Schulzweida committed
401
      PARAMETER (TUNIT_QUARTER          =  3)
402
      INTEGER    TUNIT_30MINUTES
Uwe Schulzweida's avatar
Uwe Schulzweida committed
403
      PARAMETER (TUNIT_30MINUTES        =  4)
404
      INTEGER    TUNIT_HOUR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
405
      PARAMETER (TUNIT_HOUR             =  5)
406
      INTEGER    TUNIT_3HOURS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
407
      PARAMETER (TUNIT_3HOURS           =  6)
408
      INTEGER    TUNIT_6HOURS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
409
      PARAMETER (TUNIT_6HOURS           =  7)
410
      INTEGER    TUNIT_12HOURS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
411
      PARAMETER (TUNIT_12HOURS          =  8)
412
      INTEGER    TUNIT_DAY
Uwe Schulzweida's avatar
Uwe Schulzweida committed
413
      PARAMETER (TUNIT_DAY              =  9)
414
      INTEGER    TUNIT_MONTH
Uwe Schulzweida's avatar
Uwe Schulzweida committed
415
      PARAMETER (TUNIT_MONTH            = 10)
416
      INTEGER    TUNIT_YEAR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
417
418
419
420
      PARAMETER (TUNIT_YEAR             = 11)
!
!  CALENDAR types
!
421
      INTEGER    CALENDAR_STANDARD
Uwe Schulzweida's avatar
Uwe Schulzweida committed
422
      PARAMETER (CALENDAR_STANDARD      =  0)
423
      INTEGER    CALENDAR_PROLEPTIC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
424
      PARAMETER (CALENDAR_PROLEPTIC     =  1)
425
      INTEGER    CALENDAR_360DAYS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
426
      PARAMETER (CALENDAR_360DAYS       =  2)
427
      INTEGER    CALENDAR_365DAYS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
428
      PARAMETER (CALENDAR_365DAYS       =  3)
429
      INTEGER    CALENDAR_366DAYS
Uwe Schulzweida's avatar
Uwe Schulzweida committed
430
      PARAMETER (CALENDAR_366DAYS       =  4)
431
      INTEGER    CALENDAR_NONE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
432
433
434
435
      PARAMETER (CALENDAR_NONE          =  5)
!
!  number of unsigned char needed to store UUID
!
436
      INTEGER    CDI_UUID_SIZE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
      PARAMETER (CDI_UUID_SIZE          = 16)
!
!  Structs that are used to return data to the user
!
!
!  Opaque types
!
!
!  CDI control routines
!
!                     cdiReset
      EXTERNAL        cdiReset

      CHARACTER(80)   cdiStringError
!                                    (INTEGER         cdiErrno)
      EXTERNAL        cdiStringError

!                     cdiDebug
!                                    (INTEGER         debug)
      EXTERNAL        cdiDebug

      CHARACTER(80)   cdiLibraryVersion
      EXTERNAL        cdiLibraryVersion

!                     cdiPrintVersion
      EXTERNAL        cdiPrintVersion

      INTEGER         cdiHaveFiletype
!                                    (INTEGER         filetype)
      EXTERNAL        cdiHaveFiletype

!                     cdiDefMissval
!                                    (DOUBLEPRECISION missval)
      EXTERNAL        cdiDefMissval

      DOUBLEPRECISION cdiInqMissval
      EXTERNAL        cdiInqMissval

!                     cdiDefGlobal
!                                    (CHARACTER*(*)   string,
!                                     INTEGER         val)
      EXTERNAL        cdiDefGlobal

      INTEGER         namespaceNew
      EXTERNAL        namespaceNew

!                     namespaceSetActive
!                                    (INTEGER         namespaceID)
      EXTERNAL        namespaceSetActive

487
488
489
      INTEGER         namespaceGetActive
      EXTERNAL        namespaceGetActive

Uwe Schulzweida's avatar
Uwe Schulzweida committed
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
!                     namespaceDelete
!                                    (INTEGER         namespaceID)
      EXTERNAL        namespaceDelete

!
!  CDI converter routines
!
!
!  parameter
!
!                     cdiParamToString
!                                    (INTEGER         param,
!                                     CHARACTER*(*)   paramstr,
!                                     INTEGER         maxlen)
      EXTERNAL        cdiParamToString

!                     cdiDecodeParam
!                                    (INTEGER         param,
!                                     INTEGER         pnum,
!                                     INTEGER         pcat,
!                                     INTEGER         pdis)
      EXTERNAL        cdiDecodeParam

      INTEGER         cdiEncodeParam
!                                    (INTEGER         pnum,
!                                     INTEGER         pcat,
!                                     INTEGER         pdis)
      EXTERNAL        cdiEncodeParam

!
!  date format:  YYYYMMDD
!
!
!  time format:    hhmmss
!
!                     cdiDecodeDate
!                                    (INTEGER         date,
!                                     INTEGER         year,
!                                     INTEGER         month,
!                                     INTEGER         day)
      EXTERNAL        cdiDecodeDate

      INTEGER         cdiEncodeDate
!                                    (INTEGER         year,
!                                     INTEGER         month,
!                                     INTEGER         day)
      EXTERNAL        cdiEncodeDate

!                     cdiDecodeTime
!                                    (INTEGER         time,
!                                     INTEGER         hour,
!                                     INTEGER         minute,
!                                     INTEGER         second)
      EXTERNAL        cdiDecodeTime

      INTEGER         cdiEncodeTime
!                                    (INTEGER         hour,
!                                     INTEGER         minute,
!                                     INTEGER         second)
      EXTERNAL        cdiEncodeTime

!
!  STREAM control routines
!
      INTEGER         cdiGetFiletype
!                                    (CHARACTER*(*)   path,
!                                     INTEGER         byteorder)
      EXTERNAL        cdiGetFiletype

      INTEGER         streamOpenRead
!                                    (CHARACTER*(*)   path)
      EXTERNAL        streamOpenRead

      INTEGER         streamOpenWrite
!                                    (CHARACTER*(*)   path,
!                                     INTEGER         filetype)
      EXTERNAL        streamOpenWrite

      INTEGER         streamOpenAppend
!                                    (CHARACTER*(*)   path)
      EXTERNAL        streamOpenAppend

!                     streamClose
!                                    (INTEGER         streamID)
      EXTERNAL        streamClose

!                     streamSync
!                                    (INTEGER         streamID)
      EXTERNAL        streamSync

!                     streamDefVlist
!                                    (INTEGER         streamID,
!                                     INTEGER         vlistID)
      EXTERNAL        streamDefVlist

      INTEGER         streamInqVlist
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqVlist

      INTEGER         streamInqFiletype
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqFiletype

!                     streamDefByteorder
!                                    (INTEGER         streamID,
!                                     INTEGER         byteorder)
      EXTERNAL        streamDefByteorder

      INTEGER         streamInqByteorder
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqByteorder

!                     streamDefCompType
!                                    (INTEGER         streamID,
!                                     INTEGER         comptype)
      EXTERNAL        streamDefCompType

      INTEGER         streamInqCompType
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCompType

!                     streamDefCompLevel
!                                    (INTEGER         streamID,
!                                     INTEGER         complevel)
      EXTERNAL        streamDefCompLevel

      INTEGER         streamInqCompLevel
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCompLevel

      INTEGER         streamDefTimestep
!                                    (INTEGER         streamID,
!                                     INTEGER         tsID)
      EXTERNAL        streamDefTimestep

      INTEGER         streamInqTimestep
!                                    (INTEGER         streamID,
!                                     INTEGER         tsID)
      EXTERNAL        streamInqTimestep

      INTEGER         streamInqCurTimestepID
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCurTimestepID

      CHARACTER(80)   streamFilename
!                                    (INTEGER         streamID)
      EXTERNAL        streamFilename

      CHARACTER(80)   streamFilesuffix
!                                    (INTEGER         filetype)
      EXTERNAL        streamFilesuffix

      INTEGER         streamInqNvars
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqNvars

!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
647
!  STREAM var I/O routines (random access)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
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
!
!                     streamWriteVar
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVar

!                     streamWriteVarF
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVarF

!                     streamReadVar
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVar

!                     streamReadVarF
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVarF

!                     streamWriteVarSlice
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVarSlice

!                     streamWriteVarSliceF
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVarSliceF

!                     streamReadVarSlice
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVarSlice

!                     streamReadVarSliceF
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVarSliceF

!                     streamWriteVarChunk
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
712
!                                     INTEGER         rect(2,3),
Uwe Schulzweida's avatar
Uwe Schulzweida committed
713
714
715
716
717
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVarChunk

!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
718
!  STREAM record I/O routines (sequential access)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
!
!                     streamDefRecord
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID)
      EXTERNAL        streamDefRecord

!                     streamInqRecord
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID)
      EXTERNAL        streamInqRecord

!                     streamWriteRecord
!                                    (INTEGER         streamID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteRecord

!                     streamWriteRecordF
!                                    (INTEGER         streamID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteRecordF

!                     streamReadRecord
!                                    (INTEGER         streamID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadRecord

Thomas Jahns's avatar
Thomas Jahns committed
750
751
752
753
754
755
!                     streamReadRecordF
!                                    (INTEGER         streamID,
!                                     REAL            data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadRecordF

Uwe Schulzweida's avatar
Uwe Schulzweida committed
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
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
909
910
911
912
913
914
915
916
917
918
919
920
921
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
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
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
!                     streamCopyRecord
!                                    (INTEGER         streamIDdest,
!                                     INTEGER         streamIDsrc)
      EXTERNAL        streamCopyRecord

!
!  File driven I/O (may yield better performance than using the streamXXX functions)
!
!
!  VLIST routines
!
      INTEGER         vlistCreate
      EXTERNAL        vlistCreate

!                     vlistDestroy
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistDestroy

      INTEGER         vlistDuplicate
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistDuplicate

!                     vlistCopy
!                                    (INTEGER         vlistID2,
!                                     INTEGER         vlistID1)
      EXTERNAL        vlistCopy

!                     vlistCopyFlag
!                                    (INTEGER         vlistID2,
!                                     INTEGER         vlistID1)
      EXTERNAL        vlistCopyFlag

!                     vlistClearFlag
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistClearFlag

!                     vlistCat
!                                    (INTEGER         vlistID2,
!                                     INTEGER         vlistID1)
      EXTERNAL        vlistCat

!                     vlistMerge
!                                    (INTEGER         vlistID2,
!                                     INTEGER         vlistID1)
      EXTERNAL        vlistMerge

!                     vlistPrint
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistPrint

      INTEGER         vlistNumber
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNumber

      INTEGER         vlistNvars
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNvars

      INTEGER         vlistNgrids
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNgrids

      INTEGER         vlistNzaxis
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNzaxis

      INTEGER         vlistNsubtypes
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNsubtypes

!                     vlistDefNtsteps
!                                    (INTEGER         vlistID,
!                                     INTEGER         nts)
      EXTERNAL        vlistDefNtsteps

      INTEGER         vlistNtsteps
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNtsteps

      INTEGER         vlistGridsizeMax
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistGridsizeMax

      INTEGER         vlistGrid
!                                    (INTEGER         vlistID,
!                                     INTEGER         index)
      EXTERNAL        vlistGrid

      INTEGER         vlistGridIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         gridID)
      EXTERNAL        vlistGridIndex

!                     vlistChangeGridIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         index,
!                                     INTEGER         gridID)
      EXTERNAL        vlistChangeGridIndex

!                     vlistChangeGrid
!                                    (INTEGER         vlistID,
!                                     INTEGER         gridID1,
!                                     INTEGER         gridID2)
      EXTERNAL        vlistChangeGrid

      INTEGER         vlistZaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         index)
      EXTERNAL        vlistZaxis

      INTEGER         vlistZaxisIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         zaxisID)
      EXTERNAL        vlistZaxisIndex

!                     vlistChangeZaxisIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         index,
!                                     INTEGER         zaxisID)
      EXTERNAL        vlistChangeZaxisIndex

!                     vlistChangeZaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         zaxisID1,
!                                     INTEGER         zaxisID2)
      EXTERNAL        vlistChangeZaxis

      INTEGER         vlistNrecs
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNrecs

      INTEGER         vlistSubtype
!                                    (INTEGER         vlistID,
!                                     INTEGER         index)
      EXTERNAL        vlistSubtype

      INTEGER         vlistSubtypeIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         subtypeID)
      EXTERNAL        vlistSubtypeIndex

!                     vlistDefTaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         taxisID)
      EXTERNAL        vlistDefTaxis

      INTEGER         vlistInqTaxis
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqTaxis

!                     vlistDefTable
!                                    (INTEGER         vlistID,
!                                     INTEGER         tableID)
      EXTERNAL        vlistDefTable

      INTEGER         vlistInqTable
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqTable

!                     vlistDefInstitut
!                                    (INTEGER         vlistID,
!                                     INTEGER         instID)
      EXTERNAL        vlistDefInstitut

      INTEGER         vlistInqInstitut
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqInstitut

!                     vlistDefModel
!                                    (INTEGER         vlistID,
!                                     INTEGER         modelID)
      EXTERNAL        vlistDefModel

      INTEGER         vlistInqModel
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqModel

!
!  VLIST VAR routines
!
      INTEGER         vlistDefVarTiles
!                                    (INTEGER         vlistID,
!                                     INTEGER         gridID,
!                                     INTEGER         zaxisID,
!                                     INTEGER         tsteptype,
!                                     INTEGER         tilesetID)
      EXTERNAL        vlistDefVarTiles

      INTEGER         vlistDefVar
!                                    (INTEGER         vlistID,
!                                     INTEGER         gridID,
!                                     INTEGER         zaxisID,
!                                     INTEGER         tsteptype)
      EXTERNAL        vlistDefVar

!                     vlistChangeVarGrid
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         gridID)
      EXTERNAL        vlistChangeVarGrid

!                     vlistChangeVarZaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         zaxisID)
      EXTERNAL        vlistChangeVarZaxis

!                     vlistInqVar
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         gridID,
!                                     INTEGER         zaxisID,
!                                     INTEGER         tsteptype)
      EXTERNAL        vlistInqVar

      INTEGER         vlistInqVarGrid
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarGrid

      INTEGER         vlistInqVarZaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarZaxis

!
!  used in MPIOM
!
      INTEGER         vlistInqVarID
!                                    (INTEGER         vlistID,
!                                     INTEGER         code)
      EXTERNAL        vlistInqVarID

!                     vlistDefVarTsteptype
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         tsteptype)
      EXTERNAL        vlistDefVarTsteptype

      INTEGER         vlistInqVarTsteptype
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarTsteptype

!                     vlistDefVarCompType
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         comptype)
      EXTERNAL        vlistDefVarCompType

      INTEGER         vlistInqVarCompType
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarCompType

!                     vlistDefVarCompLevel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         complevel)
      EXTERNAL        vlistDefVarCompLevel

      INTEGER         vlistInqVarCompLevel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarCompLevel

!                     vlistDefVarParam
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         param)
      EXTERNAL        vlistDefVarParam

      INTEGER         vlistInqVarParam
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarParam

!                     vlistDefVarCode
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         code)
      EXTERNAL        vlistDefVarCode

      INTEGER         vlistInqVarCode
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarCode

!                     vlistDefVarDatatype
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         datatype)
      EXTERNAL        vlistDefVarDatatype

      INTEGER         vlistInqVarDatatype
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarDatatype

!                     vlistDefVarChunkType
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         chunktype)
      EXTERNAL        vlistDefVarChunkType

      INTEGER         vlistInqVarChunkType
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarChunkType

!                     vlistDefVarXYZ
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         xyz)
      EXTERNAL        vlistDefVarXYZ

      INTEGER         vlistInqVarXYZ
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarXYZ

      INTEGER         vlistInqVarNumber
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarNumber

!                     vlistDefVarInstitut
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         instID)
      EXTERNAL        vlistDefVarInstitut

      INTEGER         vlistInqVarInstitut
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarInstitut

!                     vlistDefVarModel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         modelID)
      EXTERNAL        vlistDefVarModel

      INTEGER         vlistInqVarModel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarModel

!                     vlistDefVarTable
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         tableID)
      EXTERNAL        vlistDefVarTable

      INTEGER         vlistInqVarTable
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarTable

!                     vlistDefVarName
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name)
      EXTERNAL        vlistDefVarName

!                     vlistInqVarName
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name)
      EXTERNAL        vlistInqVarName

      CHARACTER(80)   vlistCopyVarName
!                                    (INTEGER         vlistId,
!                                     INTEGER         varId)
      EXTERNAL        vlistCopyVarName

!                     vlistDefVarStdname
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   stdname)
      EXTERNAL        vlistDefVarStdname

!                     vlistInqVarStdname
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   stdname)
      EXTERNAL        vlistInqVarStdname

!                     vlistDefVarLongname
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   longname)
      EXTERNAL        vlistDefVarLongname

!                     vlistInqVarLongname
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   longname)
      EXTERNAL        vlistInqVarLongname

!                     vlistDefVarUnits
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   units)
      EXTERNAL        vlistDefVarUnits

!                     vlistInqVarUnits
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   units)
      EXTERNAL        vlistInqVarUnits

!                     vlistDefVarMissval
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION missval)
      EXTERNAL        vlistDefVarMissval

      DOUBLEPRECISION vlistInqVarMissval
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarMissval

!                     vlistDefVarExtra
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   extra)
      EXTERNAL        vlistDefVarExtra

!                     vlistInqVarExtra
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   extra)
      EXTERNAL        vlistInqVarExtra

!                     vlistDefVarScalefactor
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,