mo_cdi.f90 122 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
5
6
7
8

module mo_cdi
      use, intrinsic :: iso_c_binding

      implicit none

      private
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
      integer :: CDI_MAX_NAME = 256
Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
11
12
13
      integer :: CDI_UNDEFID = -1
      integer :: CDI_GLOBAL = -1
      integer :: CDI_BIGENDIAN = 0
      integer :: CDI_LITTLEENDIAN = 1
14
15
16
      integer :: CDI_REAL = 1
      integer :: CDI_COMP = 2
      integer :: CDI_BOTH = 3
Uwe Schulzweida's avatar
Uwe Schulzweida committed
17
18
19
20
21
22
      integer :: CDI_ESYSTEM = -10
      integer :: CDI_EINVAL = -20
      integer :: CDI_EUFTYPE = -21
      integer :: CDI_ELIBNAVAIL = -22
      integer :: CDI_EUFSTRUCT = -23
      integer :: CDI_EUNC4 = -24
23
      integer :: CDI_ELIMIT = -99
Uwe Schulzweida's avatar
Uwe Schulzweida committed
24
25
26
27
28
      integer :: FILETYPE_GRB = 1
      integer :: FILETYPE_GRB2 = 2
      integer :: FILETYPE_NC = 3
      integer :: FILETYPE_NC2 = 4
      integer :: FILETYPE_NC4 = 5
Uwe Schulzweida's avatar
Uwe Schulzweida committed
29
30
31
32
      integer :: FILETYPE_NC4C = 6
      integer :: FILETYPE_SRV = 7
      integer :: FILETYPE_EXT = 8
      integer :: FILETYPE_IEG = 9
Uwe Schulzweida's avatar
Uwe Schulzweida committed
33
34
35
36
37
      integer :: COMPRESS_NONE = 0
      integer :: COMPRESS_SZIP = 1
      integer :: COMPRESS_GZIP = 2
      integer :: COMPRESS_BZIP2 = 3
      integer :: COMPRESS_ZIP = 4
38
      integer :: COMPRESS_JPEG = 5
Uwe Schulzweida's avatar
Uwe Schulzweida committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
      integer :: DATATYPE_PACK = 0
      integer :: DATATYPE_PACK1 = 1
      integer :: DATATYPE_PACK2 = 2
      integer :: DATATYPE_PACK3 = 3
      integer :: DATATYPE_PACK4 = 4
      integer :: DATATYPE_PACK5 = 5
      integer :: DATATYPE_PACK6 = 6
      integer :: DATATYPE_PACK7 = 7
      integer :: DATATYPE_PACK8 = 8
      integer :: DATATYPE_PACK9 = 9
      integer :: DATATYPE_PACK10 = 10
      integer :: DATATYPE_PACK11 = 11
      integer :: DATATYPE_PACK12 = 12
      integer :: DATATYPE_PACK13 = 13
      integer :: DATATYPE_PACK14 = 14
      integer :: DATATYPE_PACK15 = 15
      integer :: DATATYPE_PACK16 = 16
      integer :: DATATYPE_PACK17 = 17
      integer :: DATATYPE_PACK18 = 18
      integer :: DATATYPE_PACK19 = 19
      integer :: DATATYPE_PACK20 = 20
      integer :: DATATYPE_PACK21 = 21
      integer :: DATATYPE_PACK22 = 22
      integer :: DATATYPE_PACK23 = 23
      integer :: DATATYPE_PACK24 = 24
      integer :: DATATYPE_PACK25 = 25
      integer :: DATATYPE_PACK26 = 26
      integer :: DATATYPE_PACK27 = 27
      integer :: DATATYPE_PACK28 = 28
      integer :: DATATYPE_PACK29 = 29
      integer :: DATATYPE_PACK30 = 30
      integer :: DATATYPE_PACK31 = 31
      integer :: DATATYPE_PACK32 = 32
72
73
      integer :: DATATYPE_CPX32 = 64
      integer :: DATATYPE_CPX64 = 128
Uwe Schulzweida's avatar
Uwe Schulzweida committed
74
75
76
77
78
79
80
81
82
83
84
      integer :: DATATYPE_FLT32 = 132
      integer :: DATATYPE_FLT64 = 164
      integer :: DATATYPE_INT8 = 208
      integer :: DATATYPE_INT16 = 216
      integer :: DATATYPE_INT32 = 232
      integer :: DATATYPE_UINT8 = 308
      integer :: DATATYPE_UINT16 = 316
      integer :: DATATYPE_UINT32 = 332
      integer :: DATATYPE_INT = 251
      integer :: DATATYPE_FLT = 252
      integer :: DATATYPE_TXT = 253
85
      integer :: DATATYPE_CPX = 254
Uwe Schulzweida's avatar
Uwe Schulzweida committed
86
87
88
89
      integer :: DATATYPE_UCHAR = 255
      integer :: CHUNK_AUTO = 1
      integer :: CHUNK_GRID = 2
      integer :: CHUNK_LINES = 3
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
91
92
93
94
95
96
97
      integer :: GRID_GENERIC = 1
      integer :: GRID_GAUSSIAN = 2
      integer :: GRID_GAUSSIAN_REDUCED = 3
      integer :: GRID_LONLAT = 4
      integer :: GRID_SPECTRAL = 5
      integer :: GRID_FOURIER = 6
      integer :: GRID_GME = 7
      integer :: GRID_TRAJECTORY = 8
98
      integer :: GRID_UNSTRUCTURED = 9
Uwe Schulzweida's avatar
Uwe Schulzweida committed
99
100
101
102
103
      integer :: GRID_CURVILINEAR = 10
      integer :: GRID_LCC = 11
      integer :: GRID_LCC2 = 12
      integer :: GRID_LAEA = 13
      integer :: GRID_SINUSOIDAL = 14
Uwe Schulzweida's avatar
Uwe Schulzweida committed
104
      integer :: GRID_PROJECTION = 15
Uwe Schulzweida's avatar
Uwe Schulzweida committed
105
106
107
108
109
110
111
112
113
114
115
116
117
      integer :: ZAXIS_SURFACE = 0
      integer :: ZAXIS_GENERIC = 1
      integer :: ZAXIS_HYBRID = 2
      integer :: ZAXIS_HYBRID_HALF = 3
      integer :: ZAXIS_PRESSURE = 4
      integer :: ZAXIS_HEIGHT = 5
      integer :: ZAXIS_DEPTH_BELOW_SEA = 6
      integer :: ZAXIS_DEPTH_BELOW_LAND = 7
      integer :: ZAXIS_ISENTROPIC = 8
      integer :: ZAXIS_TRAJECTORY = 9
      integer :: ZAXIS_ALTITUDE = 10
      integer :: ZAXIS_SIGMA = 11
      integer :: ZAXIS_MEANSEA = 12
Uwe Schulzweida's avatar
Uwe Schulzweida committed
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
      integer :: ZAXIS_TOA = 13
      integer :: ZAXIS_SEA_BOTTOM = 14
      integer :: ZAXIS_ATMOSPHERE = 15
      integer :: ZAXIS_CLOUD_BASE = 16
      integer :: ZAXIS_CLOUD_TOP = 17
      integer :: ZAXIS_ISOTHERM_ZERO = 18
      integer :: ZAXIS_SNOW = 19
      integer :: ZAXIS_LAKE_BOTTOM = 20
      integer :: ZAXIS_SEDIMENT_BOTTOM = 21
      integer :: ZAXIS_SEDIMENT_BOTTOM_TA = 22
      integer :: ZAXIS_SEDIMENT_BOTTOM_TW = 23
      integer :: ZAXIS_MIX_LAYER = 24
      integer :: ZAXIS_REFERENCE = 25
      integer :: TIME_CONSTANT = 0
      integer :: TIME_VARIABLE = 1
      integer :: TSTEP_CONSTANT = 0
      integer :: TSTEP_INSTANT = 1
      integer :: TSTEP_AVG = 2
      integer :: TSTEP_ACCUM = 3
      integer :: TSTEP_MAX = 4
      integer :: TSTEP_MIN = 5
      integer :: TSTEP_DIFF = 6
      integer :: TSTEP_RMS = 7
      integer :: TSTEP_SD = 8
      integer :: TSTEP_COV = 9
      integer :: TSTEP_RATIO = 10
      integer :: TSTEP_RANGE = 11
      integer :: TSTEP_INSTANT2 = 12
      integer :: TSTEP_INSTANT3 = 13
Uwe Schulzweida's avatar
Uwe Schulzweida committed
147
148
149
150
151
152
153
154
155
      integer :: TAXIS_ABSOLUTE = 1
      integer :: TAXIS_RELATIVE = 2
      integer :: TUNIT_SECOND = 1
      integer :: TUNIT_MINUTE = 2
      integer :: TUNIT_HOUR = 3
      integer :: TUNIT_DAY = 4
      integer :: TUNIT_MONTH = 5
      integer :: TUNIT_YEAR = 6
      integer :: TUNIT_QUARTER = 7
156
157
158
      integer :: TUNIT_3HOURS = 8
      integer :: TUNIT_6HOURS = 9
      integer :: TUNIT_12HOURS = 10
Uwe Schulzweida's avatar
Uwe Schulzweida committed
159
160
161
162
163
164
165
      integer :: CALENDAR_STANDARD = 0
      integer :: CALENDAR_PROLEPTIC = 1
      integer :: CALENDAR_360DAYS = 2
      integer :: CALENDAR_365DAYS = 3
      integer :: CALENDAR_366DAYS = 4
      integer :: CALENDAR_NONE = 5

Uwe Schulzweida's avatar
Uwe Schulzweida committed
166
167
168
169
170
      interface
        subroutine cdiReset() bind(c,name='cdiReset')
       end subroutine cdiReset
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
      interface
        character(c_char) function cdiStringError(cdiErrno) bind(c,name='cdiStringError')
          import :: c_int,c_char
          integer(c_int), value :: cdiErrno
       end function cdiStringError
      end interface
  
      interface
        subroutine cdiDebug(debug) bind(c,name='cdiDebug')
          import :: c_int
          integer(c_int), value :: debug
       end subroutine cdiDebug
      end interface
  
      interface
        character(c_char) function cdiLibraryVersion() bind(c,name='cdiLibraryVersion')
          import :: c_char
       end function cdiLibraryVersion
      end interface
  
      interface
        subroutine cdiPrintVersion() bind(c,name='cdiPrintVersion')
       end subroutine cdiPrintVersion
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
196
197
198
199
200
201
202
      interface
        integer(c_int) function cdiHaveFiletype(filetype) bind(c,name='cdiHaveFiletype')
          import :: c_int
          integer(c_int), value :: filetype
       end function cdiHaveFiletype
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
      interface
        subroutine cdiDefMissval(missval) bind(c,name='cdiDefMissval')
          import :: c_double
          real(c_double), value :: missval
       end subroutine cdiDefMissval
      end interface
  
      interface
        real(c_double) function cdiInqMissval() bind(c,name='cdiInqMissval')
          import :: c_double
       end function cdiInqMissval
      end interface
  
      interface
        subroutine cdiDefGlobal(string,val) bind(c,name='cdiDefGlobal')
          import :: c_char,c_int
          character(c_char), dimension(*) :: string
          integer(c_int), value :: val
       end subroutine cdiDefGlobal
      end interface
  
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
      interface
        integer(c_int) function namespaceNew() bind(c,name='namespaceNew')
          import :: c_int
       end function namespaceNew
      end interface
  
      interface
        subroutine namespaceSetActive(namespaceID) bind(c,name='namespaceSetActive')
          import :: c_int
          integer(c_int), value :: namespaceID
       end subroutine namespaceSetActive
      end interface
  
      interface
        subroutine namespaceDelete(namespaceID) bind(c,name='namespaceDelete')
          import :: c_int
          integer(c_int), value :: namespaceID
       end subroutine namespaceDelete
      end interface
  
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
      interface
        subroutine cdiParamToString(param,paramstr,maxlen) bind(c,name='cdiParamToString')
          import :: c_int,c_char
          integer(c_int), value :: param
          character(c_char), dimension(*) :: paramstr
          integer(c_int), value :: maxlen
       end subroutine cdiParamToString
      end interface
  
      interface
        subroutine cdiDecodeParam(param,pnum,pcat,pdis) bind(c,name='cdiDecodeParam')
          import :: c_int
          integer(c_int), value :: param
          integer(c_int), intent(out) :: pnum
          integer(c_int), intent(out) :: pcat
          integer(c_int), intent(out) :: pdis
       end subroutine cdiDecodeParam
      end interface
  
      interface
        integer(c_int) function cdiEncodeParam(pnum,pcat,pdis) bind(c,name='cdiEncodeParam')
          import :: c_int
          integer(c_int), value :: pnum
          integer(c_int), value :: pcat
          integer(c_int), value :: pdis
       end function cdiEncodeParam
      end interface
  
      interface
        subroutine cdiDecodeDate(date,year,month,day) bind(c,name='cdiDecodeDate')
          import :: c_int
          integer(c_int), value :: date
          integer(c_int), intent(out) :: year
          integer(c_int), intent(out) :: month
          integer(c_int), intent(out) :: day
       end subroutine cdiDecodeDate
      end interface
  
      interface
        integer(c_int) function cdiEncodeDate(year,month,day) bind(c,name='cdiEncodeDate')
          import :: c_int
          integer(c_int), value :: year
          integer(c_int), value :: month
          integer(c_int), value :: day
       end function cdiEncodeDate
      end interface
  
      interface
        subroutine cdiDecodeTime(time,hour,minute,second) bind(c,name='cdiDecodeTime')
          import :: c_int
          integer(c_int), value :: time
          integer(c_int), intent(out) :: hour
          integer(c_int), intent(out) :: minute
          integer(c_int), intent(out) :: second
       end subroutine cdiDecodeTime
      end interface
  
      interface
        integer(c_int) function cdiEncodeTime(hour,minute,second) bind(c,name='cdiEncodeTime')
          import :: c_int
          integer(c_int), value :: hour
          integer(c_int), value :: minute
          integer(c_int), value :: second
       end function cdiEncodeTime
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
      interface
        integer(c_int) function streamOpenRead(path) bind(c,name='streamOpenRead')
          import :: c_char,c_int
          character(c_char), dimension(*) :: path
       end function streamOpenRead
      end interface
  
      interface
        integer(c_int) function streamOpenWrite(path,filetype) bind(c,name='streamOpenWrite')
          import :: c_char,c_int
          character(c_char), dimension(*) :: path
          integer(c_int), value :: filetype
       end function streamOpenWrite
      end interface
  
      interface
        integer(c_int) function streamOpenAppend(path) bind(c,name='streamOpenAppend')
          import :: c_char,c_int
          character(c_char), dimension(*) :: path
       end function streamOpenAppend
      end interface
  
      interface
        subroutine streamClose(streamID) bind(c,name='streamClose')
          import :: c_int
          integer(c_int), value :: streamID
       end subroutine streamClose
      end interface
  
      interface
        subroutine streamSync(streamID) bind(c,name='streamSync')
          import :: c_int
          integer(c_int), value :: streamID
       end subroutine streamSync
      end interface
  
      interface
        subroutine streamDefVlist(streamID,vlistID) bind(c,name='streamDefVlist')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), value :: vlistID
       end subroutine streamDefVlist
      end interface
  
      interface
        integer(c_int) function streamInqVlist(streamID) bind(c,name='streamInqVlist')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamInqVlist
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
361
362
363
364
365
366
367
      interface
        integer(c_int) function streamInqVlistIDorig(streamID) bind(c,name='streamInqVlistIDorig')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamInqVlistIDorig
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
      interface
        integer(c_int) function streamInqFiletype(streamID) bind(c,name='streamInqFiletype')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamInqFiletype
      end interface
  
      interface
        subroutine streamDefByteorder(streamID,byteorder) bind(c,name='streamDefByteorder')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), value :: byteorder
       end subroutine streamDefByteorder
      end interface
  
      interface
        integer(c_int) function streamInqByteorder(streamID) bind(c,name='streamInqByteorder')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamInqByteorder
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
391
        subroutine streamDefCompType(streamID,comptype) bind(c,name='streamDefCompType')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
392
393
          import :: c_int
          integer(c_int), value :: streamID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
394
395
          integer(c_int), value :: comptype
       end subroutine streamDefCompType
Uwe Schulzweida's avatar
Uwe Schulzweida committed
396
397
398
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
399
        subroutine streamDefCompLevel(streamID,complevel) bind(c,name='streamDefCompLevel')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
400
401
          import :: c_int
          integer(c_int), value :: streamID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
402
403
          integer(c_int), value :: complevel
       end subroutine streamDefCompLevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
404
405
406
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
407
        integer(c_int) function streamInqCompType(streamID) bind(c,name='streamInqCompType')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
408
409
          import :: c_int
          integer(c_int), value :: streamID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
410
       end function streamInqCompType
Uwe Schulzweida's avatar
Uwe Schulzweida committed
411
412
413
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
414
        integer(c_int) function streamInqCompLevel(streamID) bind(c,name='streamInqCompLevel')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
415
416
          import :: c_int
          integer(c_int), value :: streamID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
417
       end function streamInqCompLevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
418
419
420
421
422
423
424
425
426
427
      end interface
  
      interface
        integer(c_int) function streamDefTimestep(streamID,tsID) bind(c,name='streamDefTimestep')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), value :: tsID
       end function streamDefTimestep
      end interface
  
428
429
430
431
432
433
434
      interface
        integer(c_int) function streamInqCurTimestepID(streamID) bind(c,name='streamInqCurTimestepID')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamInqCurTimestepID
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
435
436
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
      interface
        integer(c_int) function streamInqTimestep(streamID,tsID) bind(c,name='streamInqTimestep')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), value :: tsID
       end function streamInqTimestep
      end interface
  
      interface
        character(c_char) function streamFilename(streamID) bind(c,name='streamFilename')
          import :: c_int,c_char
          integer(c_int), value :: streamID
       end function streamFilename
      end interface
  
      interface
        character(c_char) function streamFilesuffix(filetype) bind(c,name='streamFilesuffix')
          import :: c_int,c_char
          integer(c_int), value :: filetype
       end function streamFilesuffix
      end interface
  
      interface
        integer(c_int) function streamNtsteps(streamID) bind(c,name='streamNtsteps')
          import :: c_int
          integer(c_int), value :: streamID
       end function streamNtsteps
      end interface
  
      interface
465
        subroutine streamReadVar(streamID,varID,data_vec,nmiss) bind(c,name='streamReadVar')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
466
467
468
          import :: c_int,c_double
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
469
          real(c_double), intent(out),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
470
471
472
473
474
          integer(c_int), intent(out) :: nmiss
       end subroutine streamReadVar
      end interface
  
      interface
475
        subroutine streamWriteVar(streamID,varID,data_vec,nmiss) bind(c,name='streamWriteVar')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
476
477
478
          import :: c_int,c_double
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
479
          real(c_double), intent(in),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
480
481
482
483
          integer(c_int), value :: nmiss
       end subroutine streamWriteVar
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
484
485
486
487
488
489
490
491
492
493
      interface
        subroutine streamWriteVarF(streamID,varID,data_vec,nmiss) bind(c,name='streamWriteVarF')
          import :: c_int,c_float
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
          real(c_float), intent(in),dimension(*) :: data_vec
          integer(c_int), value :: nmiss
       end subroutine streamWriteVarF
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
494
      interface
495
        subroutine streamReadVarSlice(streamID,varID,levelID,data_vec,nmiss) bind(c,name='streamReadVarSlice')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
496
497
498
499
          import :: c_int,c_double
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
          integer(c_int), value :: levelID
500
          real(c_double), intent(out),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
501
502
503
504
505
          integer(c_int), intent(out) :: nmiss
       end subroutine streamReadVarSlice
      end interface
  
      interface
506
        subroutine streamWriteVarSlice(streamID,varID,levelID,data_vec,nmiss) bind(c,name='streamWriteVarSlice')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
507
508
509
510
          import :: c_int,c_double
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
          integer(c_int), value :: levelID
511
          real(c_double), intent(in),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
512
513
514
515
          integer(c_int), value :: nmiss
       end subroutine streamWriteVarSlice
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
516
517
518
519
520
521
522
523
524
525
526
      interface
        subroutine streamWriteVarSliceF(streamID,varID,levelID,data_vec,nmiss) bind(c,name='streamWriteVarSliceF')
          import :: c_int,c_float
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
          integer(c_int), value :: levelID
          real(c_float), intent(in),dimension(*) :: data_vec
          integer(c_int), value :: nmiss
       end subroutine streamWriteVarSliceF
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
      interface
        subroutine streamInqRecord(streamID,varID,levelID) bind(c,name='streamInqRecord')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), intent(out) :: varID
          integer(c_int), intent(out) :: levelID
       end subroutine streamInqRecord
      end interface
  
      interface
        subroutine streamDefRecord(streamID,varID,levelID) bind(c,name='streamDefRecord')
          import :: c_int
          integer(c_int), value :: streamID
          integer(c_int), value :: varID
          integer(c_int), value :: levelID
       end subroutine streamDefRecord
      end interface
  
      interface
546
        subroutine streamReadRecord(streamID,data_vec,nmiss) bind(c,name='streamReadRecord')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
547
548
          import :: c_int,c_double
          integer(c_int), value :: streamID
549
          real(c_double), intent(out),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
550
551
552
553
554
          integer(c_int), intent(out) :: nmiss
       end subroutine streamReadRecord
      end interface
  
      interface
555
        subroutine streamWriteRecord(streamID,data_vec,nmiss) bind(c,name='streamWriteRecord')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
556
557
          import :: c_int,c_double
          integer(c_int), value :: streamID
558
          real(c_double), intent(in),dimension(*) :: data_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
559
560
561
562
          integer(c_int), value :: nmiss
       end subroutine streamWriteRecord
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
563
564
565
566
567
568
569
570
571
      interface
        subroutine streamWriteRecordF(streamID,data_vec,nmiss) bind(c,name='streamWriteRecordF')
          import :: c_int,c_float
          integer(c_int), value :: streamID
          real(c_float), intent(in),dimension(*) :: data_vec
          integer(c_int), value :: nmiss
       end subroutine streamWriteRecordF
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        subroutine streamCopyRecord(streamIDdest,streamIDsrc) bind(c,name='streamCopyRecord')
          import :: c_int
          integer(c_int), value :: streamIDdest
          integer(c_int), value :: streamIDsrc
       end subroutine streamCopyRecord
      end interface
  
      interface
        integer(c_int) function vlistCreate() bind(c,name='vlistCreate')
          import :: c_int
       end function vlistCreate
      end interface
  
      interface
        subroutine vlistDestroy(vlistID) bind(c,name='vlistDestroy')
          import :: c_int
          integer(c_int), value :: vlistID
       end subroutine vlistDestroy
      end interface
  
      interface
        integer(c_int) function vlistDuplicate(vlistID) bind(c,name='vlistDuplicate')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistDuplicate
      end interface
  
      interface
        subroutine vlistCopy(vlistID2,vlistID1) bind(c,name='vlistCopy')
          import :: c_int
          integer(c_int), value :: vlistID2
          integer(c_int), value :: vlistID1
       end subroutine vlistCopy
      end interface
  
      interface
        subroutine vlistCopyFlag(vlistID2,vlistID1) bind(c,name='vlistCopyFlag')
          import :: c_int
          integer(c_int), value :: vlistID2
          integer(c_int), value :: vlistID1
       end subroutine vlistCopyFlag
      end interface
  
      interface
        subroutine vlistClearFlag(vlistID) bind(c,name='vlistClearFlag')
          import :: c_int
          integer(c_int), value :: vlistID
       end subroutine vlistClearFlag
      end interface
  
      interface
        subroutine vlistCat(vlistID2,vlistID1) bind(c,name='vlistCat')
          import :: c_int
          integer(c_int), value :: vlistID2
          integer(c_int), value :: vlistID1
       end subroutine vlistCat
      end interface
  
      interface
        subroutine vlistMerge(vlistID2,vlistID1) bind(c,name='vlistMerge')
          import :: c_int
          integer(c_int), value :: vlistID2
          integer(c_int), value :: vlistID1
       end subroutine vlistMerge
      end interface
  
      interface
        subroutine vlistPrint(vlistID) bind(c,name='vlistPrint')
          import :: c_int
          integer(c_int), value :: vlistID
       end subroutine vlistPrint
      end interface
  
646
647
648
649
650
651
652
      interface
        integer(c_int) function vlistNumber(vlistID) bind(c,name='vlistNumber')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNumber
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
712
713
714
715
716
717
718
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
750
751
752
753
754
755
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
      interface
        integer(c_int) function vlistNvars(vlistID) bind(c,name='vlistNvars')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNvars
      end interface
  
      interface
        integer(c_int) function vlistNgrids(vlistID) bind(c,name='vlistNgrids')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNgrids
      end interface
  
      interface
        integer(c_int) function vlistNzaxis(vlistID) bind(c,name='vlistNzaxis')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNzaxis
      end interface
  
      interface
        subroutine vlistDefNtsteps(vlistID,nts) bind(c,name='vlistDefNtsteps')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: nts
       end subroutine vlistDefNtsteps
      end interface
  
      interface
        integer(c_int) function vlistNtsteps(vlistID) bind(c,name='vlistNtsteps')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNtsteps
      end interface
  
      interface
        integer(c_int) function vlistGridsizeMax(vlistID) bind(c,name='vlistGridsizeMax')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistGridsizeMax
      end interface
  
      interface
        integer(c_int) function vlistGrid(vlistID,index) bind(c,name='vlistGrid')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: index
       end function vlistGrid
      end interface
  
      interface
        integer(c_int) function vlistGridIndex(vlistID,gridID) bind(c,name='vlistGridIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: gridID
       end function vlistGridIndex
      end interface
  
      interface
        subroutine vlistChangeGridIndex(vlistID,index,gridID) bind(c,name='vlistChangeGridIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: index
          integer(c_int), value :: gridID
       end subroutine vlistChangeGridIndex
      end interface
  
      interface
        subroutine vlistChangeGrid(vlistID,gridID1,gridID2) bind(c,name='vlistChangeGrid')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: gridID1
          integer(c_int), value :: gridID2
       end subroutine vlistChangeGrid
      end interface
  
      interface
        integer(c_int) function vlistZaxis(vlistID,index) bind(c,name='vlistZaxis')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: index
       end function vlistZaxis
      end interface
  
      interface
        integer(c_int) function vlistZaxisIndex(vlistID,zaxisID) bind(c,name='vlistZaxisIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: zaxisID
       end function vlistZaxisIndex
      end interface
  
      interface
        subroutine vlistChangeZaxisIndex(vlistID,index,zaxisID) bind(c,name='vlistChangeZaxisIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: index
          integer(c_int), value :: zaxisID
       end subroutine vlistChangeZaxisIndex
      end interface
  
      interface
        subroutine vlistChangeZaxis(vlistID,zaxisID1,zaxisID2) bind(c,name='vlistChangeZaxis')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: zaxisID1
          integer(c_int), value :: zaxisID2
       end subroutine vlistChangeZaxis
      end interface
  
      interface
        integer(c_int) function vlistNrecs(vlistID) bind(c,name='vlistNrecs')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistNrecs
      end interface
  
      interface
        subroutine vlistDefTaxis(vlistID,taxisID) bind(c,name='vlistDefTaxis')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: taxisID
       end subroutine vlistDefTaxis
      end interface
  
      interface
        integer(c_int) function vlistInqTaxis(vlistID) bind(c,name='vlistInqTaxis')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistInqTaxis
      end interface
  
      interface
        subroutine vlistDefTable(vlistID,tableID) bind(c,name='vlistDefTable')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: tableID
       end subroutine vlistDefTable
      end interface
  
      interface
        integer(c_int) function vlistInqTable(vlistID) bind(c,name='vlistInqTable')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistInqTable
      end interface
  
      interface
        subroutine vlistDefInstitut(vlistID,instID) bind(c,name='vlistDefInstitut')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: instID
       end subroutine vlistDefInstitut
      end interface
  
      interface
        integer(c_int) function vlistInqInstitut(vlistID) bind(c,name='vlistInqInstitut')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistInqInstitut
      end interface
  
      interface
        subroutine vlistDefModel(vlistID,modelID) bind(c,name='vlistDefModel')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: modelID
       end subroutine vlistDefModel
      end interface
  
      interface
        integer(c_int) function vlistInqModel(vlistID) bind(c,name='vlistInqModel')
          import :: c_int
          integer(c_int), value :: vlistID
       end function vlistInqModel
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
832
        integer(c_int) function vlistDefVar(vlistID,gridID,zaxisID,tsteptype) bind(c,name='vlistDefVar')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
833
834
835
836
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: gridID
          integer(c_int), value :: zaxisID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
837
          integer(c_int), value :: tsteptype
Uwe Schulzweida's avatar
Uwe Schulzweida committed
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
       end function vlistDefVar
      end interface
  
      interface
        subroutine vlistChangeVarGrid(vlistID,varID,gridID) bind(c,name='vlistChangeVarGrid')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: gridID
       end subroutine vlistChangeVarGrid
      end interface
  
      interface
        subroutine vlistChangeVarZaxis(vlistID,varID,zaxisID) bind(c,name='vlistChangeVarZaxis')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: zaxisID
       end subroutine vlistChangeVarZaxis
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
860
        subroutine vlistInqVar(vlistID,varID,gridID,zaxisID,tsteptype) bind(c,name='vlistInqVar')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
861
862
863
864
865
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), intent(out) :: gridID
          integer(c_int), intent(out) :: zaxisID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
866
          integer(c_int), intent(out) :: tsteptype
Uwe Schulzweida's avatar
Uwe Schulzweida committed
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
       end subroutine vlistInqVar
      end interface
  
      interface
        integer(c_int) function vlistInqVarGrid(vlistID,varID) bind(c,name='vlistInqVarGrid')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarGrid
      end interface
  
      interface
        integer(c_int) function vlistInqVarZaxis(vlistID,varID) bind(c,name='vlistInqVarZaxis')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarZaxis
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
        integer(c_int) function vlistInqVarID(vlistID,code) bind(c,name='vlistInqVarID')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: code
       end function vlistInqVarID
      end interface
  
      interface
        integer(c_int) function vlistInqVarTsteptype(vlistID,varID) bind(c,name='vlistInqVarTsteptype')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarTsteptype
      end interface
  
      interface
        subroutine vlistDefVarTsteptype(vlistID,varID,tsteptype) bind(c,name='vlistDefVarTsteptype')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
904
905
906
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
907
908
          integer(c_int), value :: tsteptype
       end subroutine vlistDefVarTsteptype
Uwe Schulzweida's avatar
Uwe Schulzweida committed
909
910
911
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
912
        subroutine vlistDefVarCompType(vlistID,varID,comptype) bind(c,name='vlistDefVarCompType')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
913
914
915
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
916
917
          integer(c_int), value :: comptype
       end subroutine vlistDefVarCompType
Uwe Schulzweida's avatar
Uwe Schulzweida committed
918
919
920
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
921
        integer(c_int) function vlistInqVarCompType(vlistID,varID) bind(c,name='vlistInqVarCompType')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
922
923
924
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
925
       end function vlistInqVarCompType
Uwe Schulzweida's avatar
Uwe Schulzweida committed
926
927
928
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
929
        subroutine vlistDefVarCompLevel(vlistID,varID,complevel) bind(c,name='vlistDefVarCompLevel')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
930
931
932
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
933
934
          integer(c_int), value :: complevel
       end subroutine vlistDefVarCompLevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
935
936
937
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
938
        integer(c_int) function vlistInqVarCompLevel(vlistID,varID) bind(c,name='vlistInqVarCompLevel')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
939
940
941
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
Uwe Schulzweida's avatar
Uwe Schulzweida committed
942
       end function vlistInqVarCompLevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
943
944
      end interface
  
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
      interface
        subroutine vlistDefVarParam(vlistID,varID,param) bind(c,name='vlistDefVarParam')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: param
       end subroutine vlistDefVarParam
      end interface
  
      interface
        integer(c_int) function vlistInqVarParam(vlistID,varID) bind(c,name='vlistInqVarParam')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarParam
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        subroutine vlistDefVarCode(vlistID,varID,code) bind(c,name='vlistDefVarCode')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: code
       end subroutine vlistDefVarCode
      end interface
  
      interface
        integer(c_int) function vlistInqVarCode(vlistID,varID) bind(c,name='vlistInqVarCode')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarCode
      end interface
  
      interface
        subroutine vlistDefVarDatatype(vlistID,varID,datatype) bind(c,name='vlistDefVarDatatype')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: datatype
       end subroutine vlistDefVarDatatype
      end interface
  
      interface
        integer(c_int) function vlistInqVarDatatype(vlistID,varID) bind(c,name='vlistInqVarDatatype')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarDatatype
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        subroutine vlistDefVarChunkType(vlistID,varID,chunktype) bind(c,name='vlistDefVarChunkType')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: chunktype
       end subroutine vlistDefVarChunkType
      end interface
  
      interface
        integer(c_int) function vlistInqVarChunkType(vlistID,varID) bind(c,name='vlistInqVarChunkType')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarChunkType
      end interface
  
      interface
        subroutine vlistDefVarXYZ(vlistID,varID,xyz) bind(c,name='vlistDefVarXYZ')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: xyz
       end subroutine vlistDefVarXYZ
      end interface
  
      interface
        integer(c_int) function vlistInqVarXYZ(vlistID,varID) bind(c,name='vlistInqVarXYZ')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarXYZ
      end interface
  
1030
1031
1032
1033
1034
1035
1036
1037
      interface
        integer(c_int) function vlistInqVarNumber(vlistID,varID) bind(c,name='vlistInqVarNumber')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarNumber
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        subroutine vlistDefVarInstitut(vlistID,varID,instID) bind(c,name='vlistDefVarInstitut')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: instID
       end subroutine vlistDefVarInstitut
      end interface
  
      interface
        integer(c_int) function vlistInqVarInstitut(vlistID,varID) bind(c,name='vlistInqVarInstitut')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarInstitut
      end interface
  
      interface
        subroutine vlistDefVarModel(vlistID,varID,modelID) bind(c,name='vlistDefVarModel')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: modelID
       end subroutine vlistDefVarModel
      end interface
  
      interface
        integer(c_int) function vlistInqVarModel(vlistID,varID) bind(c,name='vlistInqVarModel')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarModel
      end interface
  
      interface
        subroutine vlistDefVarTable(vlistID,varID,tableID) bind(c,name='vlistDefVarTable')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: tableID
       end subroutine vlistDefVarTable
      end interface
  
      interface
        integer(c_int) function vlistInqVarTable(vlistID,varID) bind(c,name='vlistInqVarTable')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarTable
      end interface
  
      interface
        subroutine vlistDefVarName(vlistID,varID,name) bind(c,name='vlistDefVarName')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end subroutine vlistDefVarName
      end interface
  
      interface
        subroutine vlistInqVarName(vlistID,varID,name) bind(c,name='vlistInqVarName')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end subroutine vlistInqVarName
      end interface
  
      interface
1108
        subroutine vlistDefVarStdname(vlistID,varID,stdname) bind(c,name='vlistDefVarStdname')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1109
1110
1111
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
1112
1113
          character(c_char), dimension(*) :: stdname
       end subroutine vlistDefVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1114
1115
1116
      end interface
  
      interface
1117
        subroutine vlistInqVarStdname(vlistID,varID,stdname) bind(c,name='vlistInqVarStdname')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1118
1119
1120
1121
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: stdname
1122
       end subroutine vlistInqVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1123
1124
1125
      end interface
  
      interface
1126
        subroutine vlistDefVarLongname(vlistID,varID,longname) bind(c,name='vlistDefVarLongname')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1127
1128
1129
1130
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: longname
1131
       end subroutine vlistDefVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1132
1133
1134
      end interface
  
      interface
1135
        subroutine vlistInqVarLongname(vlistID,varID,longname) bind(c,name='vlistInqVarLongname')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1136
1137
1138
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
1139
1140
          character(c_char), dimension(*) :: longname
       end subroutine vlistInqVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      end interface
  
      interface
        subroutine vlistDefVarUnits(vlistID,varID,units) bind(c,name='vlistDefVarUnits')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: units
       end subroutine vlistDefVarUnits
      end interface
  
      interface
        subroutine vlistInqVarUnits(vlistID,varID,units) bind(c,name='vlistInqVarUnits')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: units
       end subroutine vlistInqVarUnits
      end interface
  
      interface
        subroutine vlistDefVarMissval(vlistID,varID,missval) bind(c,name='vlistDefVarMissval')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          real(c_double), value :: missval
       end subroutine vlistDefVarMissval
      end interface
  
      interface
        real(c_double) function vlistInqVarMissval(vlistID,varID) bind(c,name='vlistInqVarMissval')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarMissval
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
      interface
        subroutine vlistDefVarExtra(vlistID,varID,extra) bind(c,name='vlistDefVarExtra')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: extra
       end subroutine vlistDefVarExtra
      end interface
  
      interface
        subroutine vlistInqVarExtra(vlistID,varID,extra) bind(c,name='vlistInqVarExtra')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: extra
       end subroutine vlistInqVarExtra
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        subroutine vlistDefVarScalefactor(vlistID,varID,scalefactor) bind(c,name='vlistDefVarScalefactor')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          real(c_double), value :: scalefactor
       end subroutine vlistDefVarScalefactor
      end interface
  
      interface
        real(c_double) function vlistInqVarScalefactor(vlistID,varID) bind(c,name='vlistInqVarScalefactor')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarScalefactor
      end interface
  
      interface
        subroutine vlistDefVarAddoffset(vlistID,varID,addoffset) bind(c,name='vlistDefVarAddoffset')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          real(c_double), value :: addoffset
       end subroutine vlistDefVarAddoffset
      end interface
  
      interface
        real(c_double) function vlistInqVarAddoffset(vlistID,varID) bind(c,name='vlistInqVarAddoffset')
          import :: c_int,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarAddoffset
      end interface
  
      interface
        subroutine vlistDefVarTimave(vlistID,varID,timave) bind(c,name='vlistDefVarTimave')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: timave
       end subroutine vlistDefVarTimave
      end interface
  
      interface
        integer(c_int) function vlistInqVarTimave(vlistID,varID) bind(c,name='vlistInqVarTimave')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarTimave
      end interface
  
      interface
        subroutine vlistDefVarTimaccu(vlistID,varID,timaccu) bind(c,name='vlistDefVarTimaccu')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: timaccu
       end subroutine vlistDefVarTimaccu
      end interface
  
      interface
        integer(c_int) function vlistInqVarTimaccu(vlistID,varID) bind(c,name='vlistInqVarTimaccu')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarTimaccu
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
      interface
        subroutine vlistDefVarTypeOfGeneratingProcess(vlistID,varID,typeOfGeneratingProcess) bind(c,&
       name='vlistDefVarTypeOfGeneratingProcess')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: typeOfGeneratingProcess
       end subroutine vlistDefVarTypeOfGeneratingProcess
      end interface
  
      interface
        integer(c_int) function vlistInqVarTypeOfGeneratingProcess(vlistID,varID) bind(c,name='vlistInqVarTypeOfGeneratingProcess')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarTypeOfGeneratingProcess
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      interface
        integer(c_int) function vlistInqVarSize(vlistID,varID) bind(c,name='vlistInqVarSize')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistInqVarSize
      end interface
  
      interface
        subroutine vlistDefIndex(vlistID,varID,levID,index) bind(c,name='vlistDefIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: levID
          integer(c_int), value :: index
       end subroutine vlistDefIndex
      end interface
  
      interface
        integer(c_int) function vlistInqIndex(vlistID,varID,levID) bind(c,name='vlistInqIndex')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: levID
       end function vlistInqIndex
      end interface
  
      interface
        subroutine vlistDefFlag(vlistID,varID,levID,flag) bind(c,name='vlistDefFlag')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: levID
          integer(c_int), value :: flag
       end subroutine vlistDefFlag
      end interface
  
      interface
        integer(c_int) function vlistInqFlag(vlistID,varID,levID) bind(c,name='vlistInqFlag')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: levID
       end function vlistInqFlag
      end interface
  
      interface
        integer(c_int) function vlistFindVar(vlistID,fvarID) bind(c,name='vlistFindVar')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: fvarID
       end function vlistFindVar
      end interface
  
      interface
        integer(c_int) function vlistFindLevel(vlistID,fvarID,flevelID) bind(c,name='vlistFindLevel')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: fvarID
          integer(c_int), value :: flevelID
       end function vlistFindLevel
      end interface
  
      interface
        integer(c_int) function vlistMergedVar(vlistID,varID) bind(c,name='vlistMergedVar')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
       end function vlistMergedVar
      end interface
  
      interface
        integer(c_int) function vlistMergedLevel(vlistID,varID,levelID) bind(c,name='vlistMergedLevel')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: levelID
       end function vlistMergedLevel
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
      interface
        subroutine vlistDefVarEnsemble(vlistID,varID,ensID,ensCount,forecast_type) bind(c,name='vlistDefVarEnsemble')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: ensID
          integer(c_int), value :: ensCount
          integer(c_int), value :: forecast_type
       end subroutine vlistDefVarEnsemble
      end interface
  
      interface
        integer(c_int) function vlistInqVarEnsemble(vlistID,varID,ensID,ensCount,forecast_type) bind(c,name='vlistInqVarEnsemble')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), intent(out) :: ensID
          integer(c_int), intent(out) :: ensCount
          integer(c_int), intent(out) :: forecast_type
       end function vlistInqVarEnsemble
      end interface
  
      interface
        subroutine cdiClearAdditionalKeys() bind(c,name='cdiClearAdditionalKeys')
       end subroutine cdiClearAdditionalKeys
      end interface
  
      interface
        subroutine cdiDefAdditionalKey(string) bind(c,name='cdiDefAdditionalKey')
          import :: c_char
          character(c_char), dimension(*) :: string
       end subroutine cdiDefAdditionalKey
      end interface
  
      interface
        subroutine vlistDefVarIntKey(vlistID,varID,name,value) bind(c,name='vlistDefVarIntKey')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          integer(c_int), value :: value
       end subroutine vlistDefVarIntKey
      end interface
  
      interface
        subroutine vlistDefVarDblKey(vlistID,varID,name,value) bind(c,name='vlistDefVarDblKey')
          import :: c_int,c_char,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          real(c_double), value :: value
       end subroutine vlistDefVarDblKey
      end interface
  
      interface
        integer(c_int) function vlistHasVarKey(vlistID,varID,name) bind(c,name='vlistHasVarKey')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end function vlistHasVarKey
      end interface
  
      interface
        real(c_double) function vlistInqVarDblKey(vlistID,varID,name) bind(c,name='vlistInqVarDblKey')
          import :: c_int,c_char,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end function vlistInqVarDblKey
      end interface
  
      interface
        integer(c_int) function vlistInqVarIntKey(vlistID,varID,name) bind(c,name='vlistInqVarIntKey')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end function vlistInqVarIntKey
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
      interface
        integer(c_int) function vlistInqNatts(vlistID,varID,nattsp) bind(c,name='vlistInqNatts')
          import :: c_int
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), intent(out) :: nattsp
       end function vlistInqNatts
      end interface
  
      interface
        integer(c_int) function vlistInqAtt(vlistID,varID,attrnum,name,typep,lenp) bind(c,name='vlistInqAtt')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          integer(c_int), value :: attrnum
          character(c_char), dimension(*) :: name
          integer(c_int), intent(out) :: typep
          integer(c_int), intent(out) :: lenp
       end function vlistInqAtt
      end interface
  
      interface
        integer(c_int) function vlistDelAtt(vlistID,varID,name) bind(c,name='vlistDelAtt')
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
       end function vlistDelAtt
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1474
        integer(c_int) function vlistDefAttInt(vlistID,varID,name,type,len,ip_vec) bind(c,name='vlistDefAttInt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1475
1476
1477
1478
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1479
          integer(c_int), value :: type
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1480
          integer(c_int), value :: len
1481
          integer(c_int), intent(in),dimension(*) :: ip_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1482
1483
1484
1485
       end function vlistDefAttInt
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1486
        integer(c_int) function vlistDefAttFlt(vlistID,varID,name,type,len,dp_vec) bind(c,name='vlistDefAttFlt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1487
1488
1489
1490
          import :: c_int,c_char,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1491
          integer(c_int), value :: type
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1492
          integer(c_int), value :: len
1493
          real(c_double), intent(in),dimension(*) :: dp_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1494
1495
1496
1497
       end function vlistDefAttFlt
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1498
        integer(c_int) function vlistDefAttTxt(vlistID,varID,name,len,tp_cbuf) bind(c,name='vlistDefAttTxt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1499
1500
1501
1502
1503
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          integer(c_int), value :: len
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1504
          character(c_char), dimension(*) :: tp_cbuf
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1505
1506
1507
1508
       end function vlistDefAttTxt
      end interface
  
      interface
1509
        integer(c_int) function vlistInqAttInt(vlistID,varID,name,mlen,ip_vec) bind(c,name='vlistInqAttInt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1510
1511
1512
1513
1514
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          integer(c_int), value :: mlen
1515
          integer(c_int), intent(out),dimension(*) :: ip_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1516
1517
1518
1519
       end function vlistInqAttInt
      end interface
  
      interface
1520
        integer(c_int) function vlistInqAttFlt(vlistID,varID,name,mlen,dp_vec) bind(c,name='vlistInqAttFlt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1521
1522
1523
1524
1525
          import :: c_int,c_char,c_double
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          integer(c_int), value :: mlen
1526
          real(c_double), intent(out),dimension(*) :: dp_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1527
1528
1529
1530
       end function vlistInqAttFlt
      end interface
  
      interface
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1531
        integer(c_int) function vlistInqAttTxt(vlistID,varID,name,mlen,tp_cbuf) bind(c,name='vlistInqAttTxt')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1532
1533
1534
1535
1536
          import :: c_int,c_char
          integer(c_int), value :: vlistID
          integer(c_int), value :: varID
          character(c_char), dimension(*) :: name
          integer(c_int), value :: mlen
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1537
          character(c_char), dimension(*) :: tp_cbuf
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
       end function vlistInqAttTxt
      end interface
  
      interface
        subroutine gridName(gridtype,gridnamev) bind(c,name='gridName')
          import :: c_int,c_char
          integer(c_int), value :: gridtype
          character(c_char), dimension(*) :: gridnamev
       end subroutine gridName
      end interface
  
      interface
        character(c_char) function gridNamePtr(gridtype) bind(c,name='gridNamePtr')
          import :: c_int,c_char
          integer(c_int), value :: gridtype
       end function gridNamePtr
      end interface
  
      interface
        subroutine gridCompress(gridID) bind(c,name='gridCompress')
          import :: c_int
          integer(c_int), value :: gridID
       end subroutine gridCompress
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
      interface
        subroutine gridDefMaskGME(gridID,mask_vec) bind(c,name='gridDefMaskGME')
          import :: c_int
          integer(c_int), value :: gridID
          integer(c_int), intent(in),dimension(*) :: mask_vec
       end subroutine gridDefMaskGME
      end interface
  
      interface
        integer(c_int) function gridInqMaskGME(gridID,mask_vec) bind(c,name='gridInqMaskGME')
          import :: c_int
          integer(c_int), value :: gridID
          integer(c_int), intent(out),dimension(*) :: mask_vec
       end function gridInqMaskGME
      end interface
  
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1579
      interface
1580
        subroutine gridDefMask(gridID,mask_vec) bind(c,name='gridDefMask')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1581
1582
          import :: c_int
          integer(c_int), value :: gridID
1583
          integer(c_int), intent(in),dimension(*) :: mask_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1584
1585
1586
1587
       end subroutine gridDefMask
      end interface
  
      interface
1588
        integer(c_int) function gridInqMask(gridID,mask_vec) bind(c,name='gridInqMask')
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1589
1590
          import :: c_int
          integer(c_int), value :: gridID
1591
          integer(c_int), intent(out),dimension(*) :: mask_vec
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
       end function gridInqMask
      end interface
  
      interface
        subroutine gridPrint(gridID,opt) bind(c,name='gridPrint')
          import :: c_int
          integer(c_int), value :: gridID
          integer(c_int), value :: opt
       end subroutine gridPrint
      end interface
  
      interface
        integer(c_int) function gridCreate(gridtype,size) bind(c,name='gridCreate')
          import :: c_int
          integer(c_int), value :: gridtype
          integer(c_int), value :: size
       end function gridCreate
      end interface
  
      interface
        subroutine gridDestroy(gridID) bind(c,name='gridDestroy')
          import :: c_int
          integer(c_int), value