cdi.inc 71.8 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
! This file was automatically created, 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.4.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,   December 2009
Uwe Schulzweida's avatar
Uwe Schulzweida committed
8
9
10
11
!

      INTEGER    CDI_UNDEFID           
      PARAMETER (CDI_UNDEFID            = -1)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
12
13
      INTEGER    CDI_GLOBAL            
      PARAMETER (CDI_GLOBAL             = -1)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
14
15
      INTEGER    CDI_UNDEFPARAM        
      PARAMETER (CDI_UNDEFPARAM         = 2147483647)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
16
!
17
18
19
20
21
22
23
!  Byte order
!
      INTEGER    CDI_BIGENDIAN         
      PARAMETER (CDI_BIGENDIAN          =  0)
      INTEGER    CDI_LITTLEENDIAN      
      PARAMETER (CDI_LITTLEENDIAN       =  1)
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
24
25
!  Error identifier
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26
27
      INTEGER    CDI_NOERR             
      PARAMETER (CDI_NOERR              =  0)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
29
30
31
32
33
34
35
36
37
      INTEGER    CDI_ESYSTEM           
      PARAMETER (CDI_ESYSTEM            = -10)
      INTEGER    CDI_EINVAL            
      PARAMETER (CDI_EINVAL             = -20)
      INTEGER    CDI_EUFTYPE           
      PARAMETER (CDI_EUFTYPE            = -21)
      INTEGER    CDI_ELIBNAVAIL        
      PARAMETER (CDI_ELIBNAVAIL         = -22)
      INTEGER    CDI_EUFSTRUCT         
      PARAMETER (CDI_EUFSTRUCT          = -23)
38
39
      INTEGER    CDI_EUNC4             
      PARAMETER (CDI_EUNC4              = -24)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
40
41
42
43
44
!
!  File types
!
      INTEGER    FILETYPE_GRB          
      PARAMETER (FILETYPE_GRB           =  1)
45
46
      INTEGER    FILETYPE_GRB2         
      PARAMETER (FILETYPE_GRB2          =  2)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
47
48
49
50
      INTEGER    FILETYPE_NC           
      PARAMETER (FILETYPE_NC            =  3)
      INTEGER    FILETYPE_NC2          
      PARAMETER (FILETYPE_NC2           =  4)
51
52
      INTEGER    FILETYPE_NC4          
      PARAMETER (FILETYPE_NC4           =  5)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
53
      INTEGER    FILETYPE_SRV          
54
      PARAMETER (FILETYPE_SRV           =  6)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
55
      INTEGER    FILETYPE_EXT          
56
      PARAMETER (FILETYPE_EXT           =  7)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
58
59
      INTEGER    FILETYPE_IEG          
      PARAMETER (FILETYPE_IEG           =  8)
!
60
61
!  Compress types
!
62
63
      INTEGER    COMPRESS_NONE         
      PARAMETER (COMPRESS_NONE          =  0)
64
65
66
67
      INTEGER    COMPRESS_SZIP         
      PARAMETER (COMPRESS_SZIP          =  1)
      INTEGER    COMPRESS_GZIP         
      PARAMETER (COMPRESS_GZIP          =  2)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
68
69
      INTEGER    COMPRESS_BZIP2        
      PARAMETER (COMPRESS_BZIP2         =  3)
70
71
      INTEGER    COMPRESS_ZIP          
      PARAMETER (COMPRESS_ZIP           =  4)
72
73
      INTEGER    COMPRESS_JPEG         
      PARAMETER (COMPRESS_JPEG          =  5)
74
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
75
!  external data types
Uwe Schulzweida's avatar
Uwe Schulzweida committed
76
77
78
79
80
81
82
83
84
!
      INTEGER    DATATYPE_PACK         
      PARAMETER (DATATYPE_PACK          =  0)
      INTEGER    DATATYPE_PACK1        
      PARAMETER (DATATYPE_PACK1         =  1)
      INTEGER    DATATYPE_PACK2        
      PARAMETER (DATATYPE_PACK2         =  2)
      INTEGER    DATATYPE_PACK3        
      PARAMETER (DATATYPE_PACK3         =  3)
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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
147
148
149
150
151
152
      INTEGER    DATATYPE_PACK4        
      PARAMETER (DATATYPE_PACK4         =  4)
      INTEGER    DATATYPE_PACK5        
      PARAMETER (DATATYPE_PACK5         =  5)
      INTEGER    DATATYPE_PACK6        
      PARAMETER (DATATYPE_PACK6         =  6)
      INTEGER    DATATYPE_PACK7        
      PARAMETER (DATATYPE_PACK7         =  7)
      INTEGER    DATATYPE_PACK8        
      PARAMETER (DATATYPE_PACK8         =  8)
      INTEGER    DATATYPE_PACK9        
      PARAMETER (DATATYPE_PACK9         =  9)
      INTEGER    DATATYPE_PACK10       
      PARAMETER (DATATYPE_PACK10        = 10)
      INTEGER    DATATYPE_PACK11       
      PARAMETER (DATATYPE_PACK11        = 11)
      INTEGER    DATATYPE_PACK12       
      PARAMETER (DATATYPE_PACK12        = 12)
      INTEGER    DATATYPE_PACK13       
      PARAMETER (DATATYPE_PACK13        = 13)
      INTEGER    DATATYPE_PACK14       
      PARAMETER (DATATYPE_PACK14        = 14)
      INTEGER    DATATYPE_PACK15       
      PARAMETER (DATATYPE_PACK15        = 15)
      INTEGER    DATATYPE_PACK16       
      PARAMETER (DATATYPE_PACK16        = 16)
      INTEGER    DATATYPE_PACK17       
      PARAMETER (DATATYPE_PACK17        = 17)
      INTEGER    DATATYPE_PACK18       
      PARAMETER (DATATYPE_PACK18        = 18)
      INTEGER    DATATYPE_PACK19       
      PARAMETER (DATATYPE_PACK19        = 19)
      INTEGER    DATATYPE_PACK20       
      PARAMETER (DATATYPE_PACK20        = 20)
      INTEGER    DATATYPE_PACK21       
      PARAMETER (DATATYPE_PACK21        = 21)
      INTEGER    DATATYPE_PACK22       
      PARAMETER (DATATYPE_PACK22        = 22)
      INTEGER    DATATYPE_PACK23       
      PARAMETER (DATATYPE_PACK23        = 23)
      INTEGER    DATATYPE_PACK24       
      PARAMETER (DATATYPE_PACK24        = 24)
      INTEGER    DATATYPE_PACK25       
      PARAMETER (DATATYPE_PACK25        = 25)
      INTEGER    DATATYPE_PACK26       
      PARAMETER (DATATYPE_PACK26        = 26)
      INTEGER    DATATYPE_PACK27       
      PARAMETER (DATATYPE_PACK27        = 27)
      INTEGER    DATATYPE_PACK28       
      PARAMETER (DATATYPE_PACK28        = 28)
      INTEGER    DATATYPE_PACK29       
      PARAMETER (DATATYPE_PACK29        = 29)
      INTEGER    DATATYPE_PACK30       
      PARAMETER (DATATYPE_PACK30        = 30)
      INTEGER    DATATYPE_PACK31       
      PARAMETER (DATATYPE_PACK31        = 31)
      INTEGER    DATATYPE_PACK32       
      PARAMETER (DATATYPE_PACK32        = 32)
      INTEGER    DATATYPE_FLT32        
      PARAMETER (DATATYPE_FLT32         = 132)
      INTEGER    DATATYPE_FLT64        
      PARAMETER (DATATYPE_FLT64         = 164)
      INTEGER    DATATYPE_INT8         
      PARAMETER (DATATYPE_INT8          = 208)
      INTEGER    DATATYPE_INT16        
      PARAMETER (DATATYPE_INT16         = 216)
      INTEGER    DATATYPE_INT32        
      PARAMETER (DATATYPE_INT32         = 232)
153
154
155
156
157
158
      INTEGER    DATATYPE_UINT8        
      PARAMETER (DATATYPE_UINT8         = 308)
      INTEGER    DATATYPE_UINT16       
      PARAMETER (DATATYPE_UINT16        = 316)
      INTEGER    DATATYPE_UINT32       
      PARAMETER (DATATYPE_UINT32        = 332)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
159
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
160
161
162
163
164
165
166
167
168
!  internal data types
!
      INTEGER    DATATYPE_INT          
      PARAMETER (DATATYPE_INT           = 251)
      INTEGER    DATATYPE_FLT          
      PARAMETER (DATATYPE_FLT           = 252)
      INTEGER    DATATYPE_TXT          
      PARAMETER (DATATYPE_TXT           = 253)
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
!  GRID types
!
      INTEGER    GRID_GENERIC          
      PARAMETER (GRID_GENERIC           =  1)
      INTEGER    GRID_GAUSSIAN         
      PARAMETER (GRID_GAUSSIAN          =  2)
      INTEGER    GRID_GAUSSIAN_REDUCED 
      PARAMETER (GRID_GAUSSIAN_REDUCED  =  3)
      INTEGER    GRID_LONLAT           
      PARAMETER (GRID_LONLAT            =  4)
      INTEGER    GRID_SPECTRAL         
      PARAMETER (GRID_SPECTRAL          =  5)
      INTEGER    GRID_FOURIER          
      PARAMETER (GRID_FOURIER           =  6)
      INTEGER    GRID_GME              
      PARAMETER (GRID_GME               =  7)
      INTEGER    GRID_TRAJECTORY       
      PARAMETER (GRID_TRAJECTORY        =  8)
      INTEGER    GRID_CELL             
      PARAMETER (GRID_CELL              =  9)
      INTEGER    GRID_CURVILINEAR      
      PARAMETER (GRID_CURVILINEAR       = 10)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
191
192
      INTEGER    GRID_LCC              
      PARAMETER (GRID_LCC               = 11)
193
194
      INTEGER    GRID_LCC2             
      PARAMETER (GRID_LCC2              = 12)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
195
      INTEGER    GRID_LAEA             
196
      PARAMETER (GRID_LAEA              = 13)
197
      INTEGER    GRID_SINUSOIDAL       
198
      PARAMETER (GRID_SINUSOIDAL        = 14)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
!
!  ZAXIS types
!
      INTEGER    ZAXIS_SURFACE         
      PARAMETER (ZAXIS_SURFACE          =  0)
      INTEGER    ZAXIS_GENERIC         
      PARAMETER (ZAXIS_GENERIC          =  1)
      INTEGER    ZAXIS_HYBRID          
      PARAMETER (ZAXIS_HYBRID           =  2)
      INTEGER    ZAXIS_HYBRID_HALF     
      PARAMETER (ZAXIS_HYBRID_HALF      =  3)
      INTEGER    ZAXIS_PRESSURE        
      PARAMETER (ZAXIS_PRESSURE         =  4)
      INTEGER    ZAXIS_HEIGHT          
      PARAMETER (ZAXIS_HEIGHT           =  5)
      INTEGER    ZAXIS_DEPTH_BELOW_SEA 
      PARAMETER (ZAXIS_DEPTH_BELOW_SEA  =  6)
      INTEGER    ZAXIS_DEPTH_BELOW_LAND
      PARAMETER (ZAXIS_DEPTH_BELOW_LAND =  7)
      INTEGER    ZAXIS_ISENTROPIC      
      PARAMETER (ZAXIS_ISENTROPIC       =  8)
      INTEGER    ZAXIS_TRAJECTORY      
      PARAMETER (ZAXIS_TRAJECTORY       =  9)
      INTEGER    ZAXIS_ALTITUDE        
      PARAMETER (ZAXIS_ALTITUDE         = 10)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
224
225
      INTEGER    ZAXIS_SIGMA           
      PARAMETER (ZAXIS_SIGMA            = 11)
226
227
      INTEGER    ZAXIS_MEANSEA         
      PARAMETER (ZAXIS_MEANSEA          = 12)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
!
!  TAXIS types
!
      INTEGER    TAXIS_ABSOLUTE        
      PARAMETER (TAXIS_ABSOLUTE         =  1)
      INTEGER    TAXIS_RELATIVE        
      PARAMETER (TAXIS_RELATIVE         =  2)
!
!  TIME types
!
      INTEGER    TIME_CONSTANT         
      PARAMETER (TIME_CONSTANT          =  1)
      INTEGER    TIME_VARIABLE         
      PARAMETER (TIME_VARIABLE          =  2)
!
!  TUNIT types
!
      INTEGER    TUNIT_SECOND          
      PARAMETER (TUNIT_SECOND           =  1)
      INTEGER    TUNIT_MINUTE          
      PARAMETER (TUNIT_MINUTE           =  2)
      INTEGER    TUNIT_HOUR            
      PARAMETER (TUNIT_HOUR             =  3)
      INTEGER    TUNIT_DAY             
      PARAMETER (TUNIT_DAY              =  4)
      INTEGER    TUNIT_MONTH           
      PARAMETER (TUNIT_MONTH            =  5)
      INTEGER    TUNIT_YEAR            
      PARAMETER (TUNIT_YEAR             =  6)
257
258
      INTEGER    TUNIT_QUARTER         
      PARAMETER (TUNIT_QUARTER          =  7)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
259
260
261
262
263
!
!  CALENDAR types
!
      INTEGER    CALENDAR_STANDARD     
      PARAMETER (CALENDAR_STANDARD      =  0)
264
265
      INTEGER    CALENDAR_PROLEPTIC    
      PARAMETER (CALENDAR_PROLEPTIC     =  1)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
266
267
268
269
270
271
      INTEGER    CALENDAR_360DAYS      
      PARAMETER (CALENDAR_360DAYS       =  2)
      INTEGER    CALENDAR_365DAYS      
      PARAMETER (CALENDAR_365DAYS       =  3)
      INTEGER    CALENDAR_366DAYS      
      PARAMETER (CALENDAR_366DAYS       =  4)
272
273
      INTEGER    CALENDAR_NONE         
      PARAMETER (CALENDAR_NONE          =  5)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
274
275
276
!
!  CDI control routines
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
277
278
279
280
      CHARACTER*80    cdiStringError
!                                    (INTEGER         cdiErrno)
      EXTERNAL        cdiStringError

Uwe Schulzweida's avatar
Uwe Schulzweida committed
281
282
283
284
!                     cdiDebug
!                                    (INTEGER         debug)
      EXTERNAL        cdiDebug

Uwe Schulzweida's avatar
Uwe Schulzweida committed
285
286
287
      CHARACTER*80    cdiLibraryVersion
      EXTERNAL        cdiLibraryVersion

Uwe Schulzweida's avatar
Uwe Schulzweida committed
288
289
290
291
292
293
294
295
296
297
!                     cdiPrintVersion
      EXTERNAL        cdiPrintVersion

!                     cdiDefMissval
!                                    (DOUBLEPRECISION missval)
      EXTERNAL        cdiDefMissval

      DOUBLEPRECISION cdiInqMissval
      EXTERNAL        cdiInqMissval

298
!                     cdiDefGlobal
Uwe Schulzweida's avatar
Uwe Schulzweida committed
299
300
301
302
!                                    (CHARACTER*(*)   string,
!                                     INTEGER         val)
      EXTERNAL        cdiDefGlobal

Uwe Schulzweida's avatar
Uwe Schulzweida committed
303
304
305
306
307
!
!  CDI converter routines
!
!                     cdiDecodeParam
!                                    (INTEGER         param,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
308
309
310
!                                     INTEGER         pnum,
!                                     INTEGER         pcat,
!                                     INTEGER         pdis)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
311
312
313
      EXTERNAL        cdiDecodeParam

      INTEGER         cdiEncodeParam
Uwe Schulzweida's avatar
Uwe Schulzweida committed
314
315
316
!                                    (INTEGER         pnum,
!                                     INTEGER         pcat,
!                                     INTEGER         pdis)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
      EXTERNAL        cdiEncodeParam

!                     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

Uwe Schulzweida's avatar
Uwe Schulzweida committed
345
346
347
348
!
!  STREAM control routines
!
      INTEGER         streamOpenRead
349
!                                    (CHARACTER*(*)   path)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
350
351
352
      EXTERNAL        streamOpenRead

      INTEGER         streamOpenWrite
353
!                                    (CHARACTER*(*)   path,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
354
355
356
357
!                                     INTEGER         filetype)
      EXTERNAL        streamOpenWrite

      INTEGER         streamOpenAppend
358
!                                    (CHARACTER*(*)   path)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
359
360
361
362
363
364
      EXTERNAL        streamOpenAppend

!                     streamClose
!                                    (INTEGER         streamID)
      EXTERNAL        streamClose

Uwe Schulzweida's avatar
Uwe Schulzweida committed
365
366
367
368
!                     streamSync
!                                    (INTEGER         streamID)
      EXTERNAL        streamSync

Uwe Schulzweida's avatar
Uwe Schulzweida committed
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
!                     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

391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
!                     streamDefZtype
!                                    (INTEGER         streamID,
!                                     INTEGER         ztype)
      EXTERNAL        streamDefZtype

!                     streamDefZlevel
!                                    (INTEGER         streamID,
!                                     INTEGER         zlevel)
      EXTERNAL        streamDefZlevel

      INTEGER         streamInqZtype
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqZtype

      INTEGER         streamInqZlevel
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqZlevel

Uwe Schulzweida's avatar
Uwe Schulzweida committed
409
410
411
412
413
414
415
416
417
418
      INTEGER         streamDefTimestep
!                                    (INTEGER         streamID,
!                                     INTEGER         tsID)
      EXTERNAL        streamDefTimestep

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

419
420
421
422
423
424
425
426
      CHARACTER*80    streamFilename
!                                    (INTEGER         streamID)
      EXTERNAL        streamFilename

      CHARACTER*80    streamFilesuffix
!                                    (INTEGER         filetype)
      EXTERNAL        streamFilesuffix

Uwe Schulzweida's avatar
Uwe Schulzweida committed
427
428
429
430
431
432
433
434
435
436
      INTEGER         streamNtsteps
!                                    (INTEGER         streamID)
      EXTERNAL        streamNtsteps

!
!  STREAM var I/O routines
!
!                     streamReadVar
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
437
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
438
439
440
441
442
443
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVar

!                     streamWriteVar
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
444
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
445
446
447
448
449
450
451
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVar

!                     streamReadVarSlice
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
452
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
453
454
455
456
457
458
459
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadVarSlice

!                     streamWriteVarSlice
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID,
460
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVarSlice

!
!  STREAM record I/O routines
!
!                     streamInqRecord
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID)
      EXTERNAL        streamInqRecord

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

!                     streamReadRecord
!                                    (INTEGER         streamID,
481
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
482
483
484
485
486
!                                     INTEGER         nmiss)
      EXTERNAL        streamReadRecord

!                     streamWriteRecord
!                                    (INTEGER         streamID,
487
!                                     DOUBLEPRECISION data_vec,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
488
489
490
491
492
493
494
495
496
497
498
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteRecord

!                     streamCopyRecord
!                                    (INTEGER         streamIDdest,
!                                     INTEGER         streamIDsrc)
      EXTERNAL        streamCopyRecord

!
!  VLIST routines
!
499
500
      INTEGER         vlistCreate
      EXTERNAL        vlistCreate
Uwe Schulzweida's avatar
Uwe Schulzweida committed
501

502
!                     vlistDestroy
Uwe Schulzweida's avatar
Uwe Schulzweida committed
503
!                                    (INTEGER         vlistID)
504
      EXTERNAL        vlistDestroy
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
647
648
649
650
651
652
653
654
655
656

      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         vlistNvars
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNvars

      INTEGER         vlistNgrids
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNgrids

      INTEGER         vlistNzaxis
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNzaxis

!                     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

!                     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         vlistDefVar
!                                    (INTEGER         vlistID,
!                                     INTEGER         gridID,
!                                     INTEGER         zaxisID,
!                                     INTEGER         timeID)
      EXTERNAL        vlistDefVar

657
658
659
660
661
662
!                     vlistChangeVarGrid
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         gridID)
      EXTERNAL        vlistChangeVarGrid

Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
!                     vlistChangeVarZaxis
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         zaxisID)
      EXTERNAL        vlistChangeVarZaxis

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

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

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

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

692
!                     vlistDefVarZtype
Uwe Schulzweida's avatar
Uwe Schulzweida committed
693
694
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
695
696
697
698
699
700
701
702
703
704
705
706
707
!                                     INTEGER         ztype)
      EXTERNAL        vlistDefVarZtype

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

!                     vlistDefVarZlevel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         zlevel)
      EXTERNAL        vlistDefVarZlevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
708

709
      INTEGER         vlistInqVarZlevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
710
711
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
712
      EXTERNAL        vlistInqVarZlevel
Uwe Schulzweida's avatar
Uwe Schulzweida committed
713

Uwe Schulzweida's avatar
Uwe Schulzweida committed
714
715
716
717
718
719
720
721
722
723
724
!                     vlistDefVarParam
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         param)
      EXTERNAL        vlistDefVarParam

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

Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
!                     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

!                     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

792
!                     vlistDefVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
793
794
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
795
796
!                                     CHARACTER*(*)   stdname)
      EXTERNAL        vlistDefVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
797

798
!                     vlistInqVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
799
800
801
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   stdname)
802
      EXTERNAL        vlistInqVarStdname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
803

804
!                     vlistDefVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
805
806
807
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   longname)
808
      EXTERNAL        vlistDefVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
809

810
!                     vlistInqVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
811
812
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
813
814
!                                     CHARACTER*(*)   longname)
      EXTERNAL        vlistInqVarLongname
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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

!                     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

!                     vlistDefVarScalefactor
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION scalefactor)
      EXTERNAL        vlistDefVarScalefactor

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

!                     vlistDefVarAddoffset
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION addoffset)
      EXTERNAL        vlistDefVarAddoffset

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

861
!                     vlistDefVarTimave
Uwe Schulzweida's avatar
Uwe Schulzweida committed
862
863
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
864
865
!                                     INTEGER         timave)
      EXTERNAL        vlistDefVarTimave
Uwe Schulzweida's avatar
Uwe Schulzweida committed
866

867
      INTEGER         vlistInqVarTimave
Uwe Schulzweida's avatar
Uwe Schulzweida committed
868
869
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
870
871
872
873
874
875
876
877
878
879
880
881
      EXTERNAL        vlistInqVarTimave

!                     vlistDefVarTimaccu
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         timaccu)
      EXTERNAL        vlistDefVarTimaccu

      INTEGER         vlistInqVarTimaccu
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarTimaccu
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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

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

      INTEGER         vlistInqVarID
!                                    (INTEGER         vlistID,
!                                     INTEGER         code)
      EXTERNAL        vlistInqVarID

!                     vlistDefIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         levID,
!                                     INTEGER         index)
      EXTERNAL        vlistDefIndex

      INTEGER         vlistInqIndex
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         levID)
      EXTERNAL        vlistInqIndex

!                     vlistDefFlag
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         levID,
!                                     INTEGER         flag)
      EXTERNAL        vlistDefFlag

      INTEGER         vlistInqFlag
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         levID)
      EXTERNAL        vlistInqFlag

      INTEGER         vlistFindVar
!                                    (INTEGER         vlistID,
!                                     INTEGER         fvarID)
      EXTERNAL        vlistFindVar

      INTEGER         vlistFindLevel
!                                    (INTEGER         vlistID,
!                                     INTEGER         fvarID,
!                                     INTEGER         flevelID)
      EXTERNAL        vlistFindLevel

Uwe Schulzweida's avatar
Uwe Schulzweida committed
930
931
932
933
934
935
936
937
938
939
940
      INTEGER         vlistMergedVar
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistMergedVar

      INTEGER         vlistMergedLevel
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         levelID)
      EXTERNAL        vlistMergedLevel

Uwe Schulzweida's avatar
Uwe Schulzweida committed
941
942
943
944
945
946
947
948
949
!
!  VLIST attributes
!
      INTEGER         vlistInqNatts
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         nattsp)
      EXTERNAL        vlistInqNatts

950
      INTEGER         vlistInqAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
951
952
953
954
955
956
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         attrnum,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         typep,
!                                     INTEGER         lenp)
957
      EXTERNAL        vlistInqAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
958

959
      INTEGER         vlistDelAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
960
961
962
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name)
963
      EXTERNAL        vlistDelAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
964

965
      INTEGER         vlistDefAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
966
967
968
969
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         len,
970
!                                     INTEGER         ip_vec)
971
      EXTERNAL        vlistDefAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
972

973
      INTEGER         vlistDefAttFlt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
974
975
976
977
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         len,
978
!                                     DOUBLEPRECISION dp_vec)
979
      EXTERNAL        vlistDefAttFlt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
980

981
      INTEGER         vlistDefAttTxt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
982
983
984
985
986
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         len,
!                                     CHARACTER*(*)   tp)
987
      EXTERNAL        vlistDefAttTxt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
988

989
      INTEGER         vlistInqAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
990
991
992
993
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         mlen,
994
!                                     INTEGER         ip_vec)
995
      EXTERNAL        vlistInqAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
996

997
      INTEGER         vlistInqAttFlt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
998
999
1000
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,