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

Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
11
12
13
14
15
16
17
18
19
20
21
22
      INTEGER    CDI_MAX_NAME          
      PARAMETER (CDI_MAX_NAME           = 256)
      INTEGER    CDI_UNDEFID           
      PARAMETER (CDI_UNDEFID            = -1)
      INTEGER    CDI_GLOBAL            
      PARAMETER (CDI_GLOBAL             = -1)
!
!  Byte order
!
      INTEGER    CDI_BIGENDIAN         
      PARAMETER (CDI_BIGENDIAN          =  0)
      INTEGER    CDI_LITTLEENDIAN      
      PARAMETER (CDI_LITTLEENDIAN       =  1)
23
24
      INTEGER    CDI_PDPENDIAN         
      PARAMETER (CDI_PDPENDIAN          =  2)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
      INTEGER    CDI_REAL              
      PARAMETER (CDI_REAL               =  1)
      INTEGER    CDI_COMP              
      PARAMETER (CDI_COMP               =  2)
      INTEGER    CDI_BOTH              
      PARAMETER (CDI_BOTH               =  3)
!
!  Error identifier
!
      INTEGER    CDI_NOERR             
      PARAMETER (CDI_NOERR              =  0)
      INTEGER    CDI_EEOF              
      PARAMETER (CDI_EEOF               = -1)
      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)
      INTEGER    CDI_EUNC4             
      PARAMETER (CDI_EUNC4              = -24)
      INTEGER    CDI_ELIMIT            
      PARAMETER (CDI_ELIMIT             = -99)
!
!  File types
!
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
      INTEGER    CDI_FILETYPE_GRB      
      PARAMETER (CDI_FILETYPE_GRB       =  1)
      INTEGER    CDI_FILETYPE_GRB2     
      PARAMETER (CDI_FILETYPE_GRB2      =  2)
      INTEGER    CDI_FILETYPE_NC       
      PARAMETER (CDI_FILETYPE_NC        =  3)
      INTEGER    CDI_FILETYPE_NC2      
      PARAMETER (CDI_FILETYPE_NC2       =  4)
      INTEGER    CDI_FILETYPE_NC4      
      PARAMETER (CDI_FILETYPE_NC4       =  5)
      INTEGER    CDI_FILETYPE_NC4C     
      PARAMETER (CDI_FILETYPE_NC4C      =  6)
      INTEGER    CDI_FILETYPE_SRV      
      PARAMETER (CDI_FILETYPE_SRV       =  7)
      INTEGER    CDI_FILETYPE_EXT      
      PARAMETER (CDI_FILETYPE_EXT       =  8)
      INTEGER    CDI_FILETYPE_IEG      
      PARAMETER (CDI_FILETYPE_IEG       =  9)
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
      INTEGER    FILETYPE_GRB          
      PARAMETER (FILETYPE_GRB           =  1)
      INTEGER    FILETYPE_GRB2         
      PARAMETER (FILETYPE_GRB2          =  2)
      INTEGER    FILETYPE_NC           
      PARAMETER (FILETYPE_NC            =  3)
      INTEGER    FILETYPE_NC2          
      PARAMETER (FILETYPE_NC2           =  4)
      INTEGER    FILETYPE_NC4          
      PARAMETER (FILETYPE_NC4           =  5)
      INTEGER    FILETYPE_NC4C         
      PARAMETER (FILETYPE_NC4C          =  6)
      INTEGER    FILETYPE_SRV          
      PARAMETER (FILETYPE_SRV           =  7)
      INTEGER    FILETYPE_EXT          
      PARAMETER (FILETYPE_EXT           =  8)
      INTEGER    FILETYPE_IEG          
      PARAMETER (FILETYPE_IEG           =  9)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
91
92
93
!
!  Compress types
!
94
95
96
97
98
99
100
101
102
103
104
105
      INTEGER    CDI_COMPRESS_NONE     
      PARAMETER (CDI_COMPRESS_NONE      =  0)
      INTEGER    CDI_COMPRESS_SZIP     
      PARAMETER (CDI_COMPRESS_SZIP      =  1)
      INTEGER    CDI_COMPRESS_GZIP     
      PARAMETER (CDI_COMPRESS_GZIP      =  2)
      INTEGER    CDI_COMPRESS_BZIP2    
      PARAMETER (CDI_COMPRESS_BZIP2     =  3)
      INTEGER    CDI_COMPRESS_ZIP      
      PARAMETER (CDI_COMPRESS_ZIP       =  4)
      INTEGER    CDI_COMPRESS_JPEG     
      PARAMETER (CDI_COMPRESS_JPEG      =  5)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
106
107
108
!
!  external data types
!
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
      INTEGER    CDI_DATATYPE_PACK     
      PARAMETER (CDI_DATATYPE_PACK      =  0)
      INTEGER    CDI_DATATYPE_PACK1    
      PARAMETER (CDI_DATATYPE_PACK1     =  1)
      INTEGER    CDI_DATATYPE_PACK2    
      PARAMETER (CDI_DATATYPE_PACK2     =  2)
      INTEGER    CDI_DATATYPE_PACK3    
      PARAMETER (CDI_DATATYPE_PACK3     =  3)
      INTEGER    CDI_DATATYPE_PACK4    
      PARAMETER (CDI_DATATYPE_PACK4     =  4)
      INTEGER    CDI_DATATYPE_PACK5    
      PARAMETER (CDI_DATATYPE_PACK5     =  5)
      INTEGER    CDI_DATATYPE_PACK6    
      PARAMETER (CDI_DATATYPE_PACK6     =  6)
      INTEGER    CDI_DATATYPE_PACK7    
      PARAMETER (CDI_DATATYPE_PACK7     =  7)
      INTEGER    CDI_DATATYPE_PACK8    
      PARAMETER (CDI_DATATYPE_PACK8     =  8)
      INTEGER    CDI_DATATYPE_PACK9    
      PARAMETER (CDI_DATATYPE_PACK9     =  9)
      INTEGER    CDI_DATATYPE_PACK10   
      PARAMETER (CDI_DATATYPE_PACK10    = 10)
      INTEGER    CDI_DATATYPE_PACK11   
      PARAMETER (CDI_DATATYPE_PACK11    = 11)
      INTEGER    CDI_DATATYPE_PACK12   
      PARAMETER (CDI_DATATYPE_PACK12    = 12)
      INTEGER    CDI_DATATYPE_PACK13   
      PARAMETER (CDI_DATATYPE_PACK13    = 13)
      INTEGER    CDI_DATATYPE_PACK14   
      PARAMETER (CDI_DATATYPE_PACK14    = 14)
      INTEGER    CDI_DATATYPE_PACK15   
      PARAMETER (CDI_DATATYPE_PACK15    = 15)
      INTEGER    CDI_DATATYPE_PACK16   
      PARAMETER (CDI_DATATYPE_PACK16    = 16)
      INTEGER    CDI_DATATYPE_PACK17   
      PARAMETER (CDI_DATATYPE_PACK17    = 17)
      INTEGER    CDI_DATATYPE_PACK18   
      PARAMETER (CDI_DATATYPE_PACK18    = 18)
      INTEGER    CDI_DATATYPE_PACK19   
      PARAMETER (CDI_DATATYPE_PACK19    = 19)
      INTEGER    CDI_DATATYPE_PACK20   
      PARAMETER (CDI_DATATYPE_PACK20    = 20)
      INTEGER    CDI_DATATYPE_PACK21   
      PARAMETER (CDI_DATATYPE_PACK21    = 21)
      INTEGER    CDI_DATATYPE_PACK22   
      PARAMETER (CDI_DATATYPE_PACK22    = 22)
      INTEGER    CDI_DATATYPE_PACK23   
      PARAMETER (CDI_DATATYPE_PACK23    = 23)
      INTEGER    CDI_DATATYPE_PACK24   
      PARAMETER (CDI_DATATYPE_PACK24    = 24)
      INTEGER    CDI_DATATYPE_PACK25   
      PARAMETER (CDI_DATATYPE_PACK25    = 25)
      INTEGER    CDI_DATATYPE_PACK26   
      PARAMETER (CDI_DATATYPE_PACK26    = 26)
      INTEGER    CDI_DATATYPE_PACK27   
      PARAMETER (CDI_DATATYPE_PACK27    = 27)
      INTEGER    CDI_DATATYPE_PACK28   
      PARAMETER (CDI_DATATYPE_PACK28    = 28)
      INTEGER    CDI_DATATYPE_PACK29   
      PARAMETER (CDI_DATATYPE_PACK29    = 29)
      INTEGER    CDI_DATATYPE_PACK30   
      PARAMETER (CDI_DATATYPE_PACK30    = 30)
      INTEGER    CDI_DATATYPE_PACK31   
      PARAMETER (CDI_DATATYPE_PACK31    = 31)
      INTEGER    CDI_DATATYPE_PACK32   
      PARAMETER (CDI_DATATYPE_PACK32    = 32)
      INTEGER    CDI_DATATYPE_CPX32    
      PARAMETER (CDI_DATATYPE_CPX32     = 64)
      INTEGER    CDI_DATATYPE_CPX64    
      PARAMETER (CDI_DATATYPE_CPX64     = 128)
      INTEGER    CDI_DATATYPE_FLT32    
      PARAMETER (CDI_DATATYPE_FLT32     = 132)
      INTEGER    CDI_DATATYPE_FLT64    
      PARAMETER (CDI_DATATYPE_FLT64     = 164)
      INTEGER    CDI_DATATYPE_INT8     
      PARAMETER (CDI_DATATYPE_INT8      = 208)
      INTEGER    CDI_DATATYPE_INT16    
      PARAMETER (CDI_DATATYPE_INT16     = 216)
      INTEGER    CDI_DATATYPE_INT32    
      PARAMETER (CDI_DATATYPE_INT32     = 232)
      INTEGER    CDI_DATATYPE_UINT8    
      PARAMETER (CDI_DATATYPE_UINT8     = 308)
      INTEGER    CDI_DATATYPE_UINT16   
      PARAMETER (CDI_DATATYPE_UINT16    = 316)
      INTEGER    CDI_DATATYPE_UINT32   
      PARAMETER (CDI_DATATYPE_UINT32    = 332)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
      INTEGER    DATATYPE_PACK         
      PARAMETER (DATATYPE_PACK          =  0)
      INTEGER    DATATYPE_PACK8        
      PARAMETER (DATATYPE_PACK8         =  8)
      INTEGER    DATATYPE_PACK16       
      PARAMETER (DATATYPE_PACK16        = 16)
      INTEGER    DATATYPE_PACK24       
      PARAMETER (DATATYPE_PACK24        = 24)
      INTEGER    DATATYPE_FLT32        
      PARAMETER (DATATYPE_FLT32         = 132)
      INTEGER    DATATYPE_FLT64        
      PARAMETER (DATATYPE_FLT64         = 164)
      INTEGER    DATATYPE_INT32        
      PARAMETER (DATATYPE_INT32         = 232)
!
!  internal data types
!
212
213
214
215
216
217
218
219
220
221
222
223
      INTEGER    CDI_DATATYPE_INT      
      PARAMETER (CDI_DATATYPE_INT       = 251)
      INTEGER    CDI_DATATYPE_FLT      
      PARAMETER (CDI_DATATYPE_FLT       = 252)
      INTEGER    CDI_DATATYPE_TXT      
      PARAMETER (CDI_DATATYPE_TXT       = 253)
      INTEGER    CDI_DATATYPE_CPX      
      PARAMETER (CDI_DATATYPE_CPX       = 254)
      INTEGER    CDI_DATATYPE_UCHAR    
      PARAMETER (CDI_DATATYPE_UCHAR     = 255)
      INTEGER    CDI_DATATYPE_LONG     
      PARAMETER (CDI_DATATYPE_LONG      = 256)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
      INTEGER    DATATYPE_INT          
      PARAMETER (DATATYPE_INT           = 251)
      INTEGER    DATATYPE_FLT          
      PARAMETER (DATATYPE_FLT           = 252)
      INTEGER    DATATYPE_TXT          
      PARAMETER (DATATYPE_TXT           = 253)
      INTEGER    DATATYPE_CPX          
      PARAMETER (DATATYPE_CPX           = 254)
      INTEGER    DATATYPE_UCHAR        
      PARAMETER (DATATYPE_UCHAR         = 255)
      INTEGER    DATATYPE_LONG         
      PARAMETER (DATATYPE_LONG          = 256)
!
!  Chunks
!
239
240
241
242
243
244
      INTEGER    CDI_CHUNK_AUTO        
      PARAMETER (CDI_CHUNK_AUTO         =  1)
      INTEGER    CDI_CHUNK_GRID        
      PARAMETER (CDI_CHUNK_GRID         =  2)
      INTEGER    CDI_CHUNK_LINES       
      PARAMETER (CDI_CHUNK_LINES        =  3)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
!
!  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_UNSTRUCTURED     
      PARAMETER (GRID_UNSTRUCTURED      =  9)
      INTEGER    GRID_CURVILINEAR      
      PARAMETER (GRID_CURVILINEAR       = 10)
      INTEGER    GRID_LCC              
      PARAMETER (GRID_LCC               = 11)
      INTEGER    GRID_PROJECTION       
Uwe Schulzweida's avatar
Uwe Schulzweida committed
271
      PARAMETER (GRID_PROJECTION        = 12)
272
273
274
275
276
277
278
279
      INTEGER    CDI_PROJ_RLL          
      PARAMETER (CDI_PROJ_RLL           = 21)
      INTEGER    CDI_PROJ_LCC          
      PARAMETER (CDI_PROJ_LCC           = 22)
      INTEGER    CDI_PROJ_LAEA         
      PARAMETER (CDI_PROJ_LAEA          = 23)
      INTEGER    CDI_PROJ_SINU         
      PARAMETER (CDI_PROJ_SINU          = 24)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
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
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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
!
!  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)
      INTEGER    ZAXIS_SIGMA           
      PARAMETER (ZAXIS_SIGMA            = 11)
      INTEGER    ZAXIS_MEANSEA         
      PARAMETER (ZAXIS_MEANSEA          = 12)
      INTEGER    ZAXIS_TOA             
      PARAMETER (ZAXIS_TOA              = 13)
      INTEGER    ZAXIS_SEA_BOTTOM      
      PARAMETER (ZAXIS_SEA_BOTTOM       = 14)
      INTEGER    ZAXIS_ATMOSPHERE      
      PARAMETER (ZAXIS_ATMOSPHERE       = 15)
      INTEGER    ZAXIS_CLOUD_BASE      
      PARAMETER (ZAXIS_CLOUD_BASE       = 16)
      INTEGER    ZAXIS_CLOUD_TOP       
      PARAMETER (ZAXIS_CLOUD_TOP        = 17)
      INTEGER    ZAXIS_ISOTHERM_ZERO   
      PARAMETER (ZAXIS_ISOTHERM_ZERO    = 18)
      INTEGER    ZAXIS_SNOW            
      PARAMETER (ZAXIS_SNOW             = 19)
      INTEGER    ZAXIS_LAKE_BOTTOM     
      PARAMETER (ZAXIS_LAKE_BOTTOM      = 20)
      INTEGER    ZAXIS_SEDIMENT_BOTTOM 
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM  = 21)
      INTEGER    ZAXIS_SEDIMENT_BOTTOM_TA
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TA = 22)
      INTEGER    ZAXIS_SEDIMENT_BOTTOM_TW
      PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TW = 23)
      INTEGER    ZAXIS_MIX_LAYER       
      PARAMETER (ZAXIS_MIX_LAYER        = 24)
      INTEGER    ZAXIS_REFERENCE       
      PARAMETER (ZAXIS_REFERENCE        = 25)
!
!  SUBTYPE types
!
      INTEGER    MAX_KV_PAIRS_MATCH    
      PARAMETER (MAX_KV_PAIRS_MATCH     = 10)
!
!  Data structure defining a key-value search, possibly with multiple
!  key-value pairs in combination.
!  
!  Currently, only multiple pairs combined by AND are supported.
!
!
!  TIME types
!
      INTEGER    TIME_CONSTANT         
      PARAMETER (TIME_CONSTANT          =  0)
      INTEGER    TIME_VARIABLE         
      PARAMETER (TIME_VARIABLE          =  1)
!
!  TSTEP types
!
      INTEGER    TSTEP_CONSTANT        
      PARAMETER (TSTEP_CONSTANT         =  0)
      INTEGER    TSTEP_INSTANT         
      PARAMETER (TSTEP_INSTANT          =  1)
      INTEGER    TSTEP_AVG             
      PARAMETER (TSTEP_AVG              =  2)
      INTEGER    TSTEP_ACCUM           
      PARAMETER (TSTEP_ACCUM            =  3)
      INTEGER    TSTEP_MAX             
      PARAMETER (TSTEP_MAX              =  4)
      INTEGER    TSTEP_MIN             
      PARAMETER (TSTEP_MIN              =  5)
      INTEGER    TSTEP_DIFF            
      PARAMETER (TSTEP_DIFF             =  6)
      INTEGER    TSTEP_RMS             
      PARAMETER (TSTEP_RMS              =  7)
      INTEGER    TSTEP_SD              
      PARAMETER (TSTEP_SD               =  8)
      INTEGER    TSTEP_COV             
      PARAMETER (TSTEP_COV              =  9)
      INTEGER    TSTEP_RATIO           
      PARAMETER (TSTEP_RATIO            = 10)
      INTEGER    TSTEP_RANGE           
      PARAMETER (TSTEP_RANGE            = 11)
      INTEGER    TSTEP_INSTANT2        
      PARAMETER (TSTEP_INSTANT2         = 12)
      INTEGER    TSTEP_INSTANT3        
      PARAMETER (TSTEP_INSTANT3         = 13)
!
!  TAXIS types
!
      INTEGER    TAXIS_ABSOLUTE        
      PARAMETER (TAXIS_ABSOLUTE         =  1)
      INTEGER    TAXIS_RELATIVE        
      PARAMETER (TAXIS_RELATIVE         =  2)
      INTEGER    TAXIS_FORECAST        
      PARAMETER (TAXIS_FORECAST         =  3)
!
!  TUNIT types
!
      INTEGER    TUNIT_SECOND          
      PARAMETER (TUNIT_SECOND           =  1)
      INTEGER    TUNIT_MINUTE          
      PARAMETER (TUNIT_MINUTE           =  2)
      INTEGER    TUNIT_QUARTER         
      PARAMETER (TUNIT_QUARTER          =  3)
      INTEGER    TUNIT_30MINUTES       
      PARAMETER (TUNIT_30MINUTES        =  4)
      INTEGER    TUNIT_HOUR            
      PARAMETER (TUNIT_HOUR             =  5)
      INTEGER    TUNIT_3HOURS          
      PARAMETER (TUNIT_3HOURS           =  6)
      INTEGER    TUNIT_6HOURS          
      PARAMETER (TUNIT_6HOURS           =  7)
      INTEGER    TUNIT_12HOURS         
      PARAMETER (TUNIT_12HOURS          =  8)
      INTEGER    TUNIT_DAY             
      PARAMETER (TUNIT_DAY              =  9)
      INTEGER    TUNIT_MONTH           
      PARAMETER (TUNIT_MONTH            = 10)
      INTEGER    TUNIT_YEAR            
      PARAMETER (TUNIT_YEAR             = 11)
!
!  CALENDAR types
!
      INTEGER    CALENDAR_STANDARD     
      PARAMETER (CALENDAR_STANDARD      =  0)
      INTEGER    CALENDAR_PROLEPTIC    
      PARAMETER (CALENDAR_PROLEPTIC     =  1)
      INTEGER    CALENDAR_360DAYS      
      PARAMETER (CALENDAR_360DAYS       =  2)
      INTEGER    CALENDAR_365DAYS      
      PARAMETER (CALENDAR_365DAYS       =  3)
      INTEGER    CALENDAR_366DAYS      
      PARAMETER (CALENDAR_366DAYS       =  4)
      INTEGER    CALENDAR_NONE         
      PARAMETER (CALENDAR_NONE          =  5)
!
!  number of unsigned char needed to store UUID
!
      INTEGER    CDI_UUID_SIZE         
      PARAMETER (CDI_UUID_SIZE          = 16)
!
!  Structs that are used to return data to the user
!
!
!  Opaque types
!
!
!  CDI control routines
!
!                     cdiReset
      EXTERNAL        cdiReset

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

!                     cdiDebug
!                                    (INTEGER         debug)
      EXTERNAL        cdiDebug

      CHARACTER(80)   cdiLibraryVersion
      EXTERNAL        cdiLibraryVersion

!                     cdiPrintVersion
      EXTERNAL        cdiPrintVersion

      INTEGER         cdiHaveFiletype
!                                    (INTEGER         filetype)
      EXTERNAL        cdiHaveFiletype

!                     cdiDefMissval
!                                    (DOUBLEPRECISION missval)
      EXTERNAL        cdiDefMissval

      DOUBLEPRECISION cdiInqMissval
      EXTERNAL        cdiInqMissval

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

      INTEGER         namespaceNew
      EXTERNAL        namespaceNew

!                     namespaceSetActive
!                                    (INTEGER         namespaceID)
      EXTERNAL        namespaceSetActive

487
488
489
      INTEGER         namespaceGetActive
      EXTERNAL        namespaceGetActive

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

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

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

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

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

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

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

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

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

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

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

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

!                     streamClose
!                                    (INTEGER         streamID)
      EXTERNAL        streamClose

!                     streamSync
!                                    (INTEGER         streamID)
      EXTERNAL        streamSync

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

      INTEGER         streamInqVlist
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqVlist

      INTEGER         streamInqFiletype
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqFiletype

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

      INTEGER         streamInqByteorder
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqByteorder

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

      INTEGER         streamInqCompType
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCompType

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

      INTEGER         streamInqCompLevel
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCompLevel

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

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

      INTEGER         streamInqCurTimestepID
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqCurTimestepID

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

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

      INTEGER         streamInqNvars
!                                    (INTEGER         streamID)
      EXTERNAL        streamInqNvars

!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
647
!  STREAM var I/O routines (random access)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
!
!                     streamWriteVar
!                                    (INTEGER         streamID,
!                                     INTEGER         varID,
!                                     DOUBLEPRECISION data(*),
!                                     INTEGER         nmiss)
      EXTERNAL        streamWriteVar

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Uwe Schulzweida's avatar
Uwe Schulzweida committed
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
!                     streamCopyRecord
!                                    (INTEGER         streamIDdest,
!                                     INTEGER         streamIDsrc)
      EXTERNAL        streamCopyRecord

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

!                     vlistDestroy
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistDestroy

      INTEGER         vlistDuplicate
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistDuplicate

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

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

!                     vlistClearFlag
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistClearFlag

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

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

!                     vlistPrint
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistPrint

      INTEGER         vlistNumber
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNumber

      INTEGER         vlistNvars
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNvars

      INTEGER         vlistNgrids
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNgrids

      INTEGER         vlistNzaxis
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNzaxis

      INTEGER         vlistNsubtypes
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNsubtypes

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

      INTEGER         vlistNtsteps
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNtsteps

      INTEGER         vlistGridsizeMax
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistGridsizeMax

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

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

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

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

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

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

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

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

      INTEGER         vlistNrecs
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistNrecs

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

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

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

      INTEGER         vlistInqTaxis
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqTaxis

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

      INTEGER         vlistInqTable
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqTable

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

      INTEGER         vlistInqInstitut
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqInstitut

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

      INTEGER         vlistInqModel
!                                    (INTEGER         vlistID)
      EXTERNAL        vlistInqModel

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

!                     vlistDefVarScalefactor
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     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

!                     vlistDefVarTimave
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         timave)
      EXTERNAL        vlistDefVarTimave

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

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

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

!                     vlistDefVarTypeOfGeneratingProcess
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         typeOfGeneratingProcess)
      EXTERNAL        vlistDefVarTypeOfGeneratingProcess

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

!                     vlistDefVarProductDefinitionTemplate
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         productDefinitionTemplate)
      EXTERNAL        vlistDefVarProductDefinitionTemplate

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

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

!                     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

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

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

!
!  Ensemble info routines
!
!                     vlistDefVarEnsemble
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         ensID,
!                                     INTEGER         ensCount,
!                                     INTEGER         forecast_type)
      EXTERNAL        vlistDefVarEnsemble

      INTEGER         vlistInqVarEnsemble
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     INTEGER         ensID,
!                                     INTEGER         ensCount,
!                                     INTEGER         forecast_type)
      EXTERNAL        vlistInqVarEnsemble

!                     cdiClearAdditionalKeys
      EXTERNAL        cdiClearAdditionalKeys

!                     cdiDefAdditionalKey
!                                    (CHARACTER*(*)   string)
      EXTERNAL        cdiDefAdditionalKey

!                     vlistDefVarIntKey
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         value)
      EXTERNAL        vlistDefVarIntKey

!                     vlistDefVarDblKey
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     DOUBLEPRECISION value)
      EXTERNAL        vlistDefVarDblKey

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

      DOUBLEPRECISION vlistInqVarDblKey
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name)
      EXTERNAL        vlistInqVarDblKey

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

Thomas Jahns's avatar
Thomas Jahns committed
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
!
!  needed only for CDO operator after
!
      CHARACTER(80)   vlistInqVarNamePtr
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarNamePtr

      CHARACTER(80)   vlistInqVarLongnamePtr
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarLongnamePtr

      CHARACTER(80)   vlistInqVarUnitsPtr
!                                    (INTEGER         vlistID,
!                                     INTEGER         varID)
      EXTERNAL        vlistInqVarUnitsPtr

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1386
!
1387
!  CDI attributes
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1388
!
1389
1390
      INTEGER         cdiInqNatts
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1391
1392
!                                     INTEGER         varID,
!                                     INTEGER         nattsp)
1393
      EXTERNAL        cdiInqNatts
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1394

1395
1396
      INTEGER         cdiInqAtt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1397
1398
1399
1400
1401
!                                     INTEGER         varID,
!                                     INTEGER         attrnum,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         typep,
!                                     INTEGER         lenp)
1402
      EXTERNAL        cdiInqAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1403

1404
1405
      INTEGER         cdiDelAtt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1406
1407
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name)
1408
      EXTERNAL        cdiDelAtt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1409

1410
1411
      INTEGER         cdiDefAttInt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1412
1413
1414
1415
1416
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         type,
!                                     INTEGER         len,
!                                     INTEGER         ip(*))
1417
      EXTERNAL        cdiDefAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1418

1419
1420
      INTEGER         cdiDefAttFlt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1421
1422
1423
1424
1425
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         type,
!                                     INTEGER         len,
!                                     DOUBLEPRECISION dp(*))
1426
      EXTERNAL        cdiDefAttFlt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1427

1428
1429
      INTEGER         cdiDefAttTxt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1430
1431
1432
1433
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         len,
!                                     CHARACTER*(*)   tp_cbuf)
1434
      EXTERNAL        cdiDefAttTxt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1435

1436
1437
      INTEGER         cdiInqAttInt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1438
1439
1440
1441
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         mlen,
!                                     INTEGER         ip(*))
1442
      EXTERNAL        cdiInqAttInt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1443

1444
1445
      INTEGER         cdiInqAttFlt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1446
1447
1448
1449
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         mlen,
!                                     DOUBLEPRECISION dp(*))
1450
      EXTERNAL        cdiInqAttFlt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1451

1452
1453
      INTEGER         cdiInqAttTxt
!                                    (INTEGER         cdiID,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1454
1455
1456
1457
!                                     INTEGER         varID,
!                                     CHARACTER*(*)   name,
!                                     INTEGER         mlen,
!                                     CHARACTER*(*)   tp_cbuf)
1458
      EXTERNAL        cdiInqAttTxt
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513

!
!  GRID routines
!
!                     gridName
!                                    (INTEGER         gridtype,
!                                     CHARACTER*(*)   gridname)
      EXTERNAL        gridName

      CHARACTER(80)   gridNamePtr
!                                    (INTEGER         gridtype)
      EXTERNAL        gridNamePtr

!                     gridCompress
!                                    (INTEGER         gridID)
      EXTERNAL        gridCompress

!                     gridDefMaskGME
!                                    (INTEGER         gridID,
!                                     INTEGER         mask(*))
      EXTERNAL        gridDefMaskGME

      INTEGER         gridInqMaskGME
!                                    (INTEGER         gridID,
!                                     INTEGER         mask(*))
      EXTERNAL        gridInqMaskGME

!                     gridDefMask
!                                    (INTEGER         gridID,
!                                     INTEGER         mask(*))
      EXTERNAL        gridDefMask

      INTEGER         gridInqMask
!                                    (INTEGER         gridID,
!                                     INTEGER         mask(*))
      EXTERNAL        gridInqMask

!                     gridPrint
!                                    (INTEGER         gridID,
!                                     INTEGER         opt)
      EXTERNAL        gridPrint

      INTEGER         gridCreate
!                                    (INTEGER         gridtype,
!                                     INTEGER         size)
      EXTERNAL        gridCreate

!                     gridDestroy
!                                    (INTEGER         gridID)
      EXTERNAL        gridDestroy

      INTEGER         gridDuplicate
!                                    (INTEGER         gridID)
      EXTERNAL        gridDuplicate

1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
!                     gridDefProj
!                                    (INTEGER         gridID,
!                                     INTEGER         projID)
      EXTERNAL        gridDefProj

      INTEGER         gridInqProj
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqProj

      INTEGER         gridInqProjType
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqProjType

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
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
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
      INTEGER         gridInqType
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqType

      INTEGER         gridInqSize
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqSize

!                     gridDefXsize
!                                    (INTEGER         gridID,
!                                     INTEGER         xsize)
      EXTERNAL        gridDefXsize

      INTEGER         gridInqXsize
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqXsize

!                     gridDefYsize
!                                    (INTEGER         gridID,
!                                     INTEGER         ysize)
      EXTERNAL        gridDefYsize

      INTEGER         gridInqYsize
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqYsize

!                     gridDefNP
!                                    (INTEGER         gridID,
!                                     INTEGER         np)
      EXTERNAL        gridDefNP

      INTEGER         gridInqNP
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqNP

!                     gridDefXvals
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION xvals(*))
      EXTERNAL        gridDefXvals

      INTEGER         gridInqXvals
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION xvals(*))
      EXTERNAL        gridInqXvals

!                     gridDefYvals
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION yvals(*))
      EXTERNAL        gridDefYvals

      INTEGER         gridInqYvals
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION yvals(*))
      EXTERNAL        gridInqYvals

1582
1583
1584
!
!  CDI grid string key values
!
1585
1586
1587
      INTEGER    CDI_KEY_XNAME         
      PARAMETER (CDI_KEY_XNAME          = 901)
      INTEGER    CDI_KEY_XDIMNAME      
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1588
      PARAMETER (CDI_KEY_XDIMNAME       = 902)
1589
      INTEGER    CDI_KEY_XLONGNAME     
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1590
      PARAMETER (CDI_KEY_XLONGNAME      = 903)
1591
      INTEGER    CDI_KEY_XUNITS        
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1592
1593
1594
1595
1596
1597
1598
      PARAMETER (CDI_KEY_XUNITS         = 904)
      INTEGER    CDI_KEY_YNAME         
      PARAMETER (CDI_KEY_YNAME          = 911)
      INTEGER    CDI_KEY_YDIMNAME      
      PARAMETER (CDI_KEY_YDIMNAME       = 912)
      INTEGER    CDI_KEY_YLONGNAME     
      PARAMETER (CDI_KEY_YLONGNAME      = 913)
1599
      INTEGER    CDI_KEY_YUNITS        
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1600
1601
1602
      PARAMETER (CDI_KEY_YUNITS         = 914)
      INTEGER    CDI_KEY_VDIMNAME      
      PARAMETER (CDI_KEY_VDIMNAME       = 920)
1603
      INTEGER    CDI_KEY_MAPNAME       
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1604
      PARAMETER (CDI_KEY_MAPNAME        = 921)
1605
      INTEGER    CDI_KEY_MAPPING       
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
      PARAMETER (CDI_KEY_MAPPING        = 922)
!
!  CDI zaxis string key values
!
      INTEGER    CDI_KEY_NAME          
      PARAMETER (CDI_KEY_NAME           = 941)
      INTEGER    CDI_KEY_DIMNAME       
      PARAMETER (CDI_KEY_DIMNAME        = 942)
      INTEGER    CDI_KEY_LONGNAME      
      PARAMETER (CDI_KEY_LONGNAME       = 943)
      INTEGER    CDI_KEY_UNITS         
      PARAMETER (CDI_KEY_UNITS          = 944)
      INTEGER    CDI_KEY_PSNAME        
      PARAMETER (CDI_KEY_PSNAME         = 950)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1620
1621
1622
1623
      INTEGER    CDI_KEY_P0NAME        
      PARAMETER (CDI_KEY_P0NAME         = 951)
      INTEGER    CDI_KEY_P0VALUE       
      PARAMETER (CDI_KEY_P0VALUE        = 952)
1624
      INTEGER         cdiGridDefKeyStr
1625
1626
1627
1628
!                                    (INTEGER         gridID,
!                                     INTEGER         key,
!                                     INTEGER         size,
!                                     CHARACTER*(*)   mesg)
1629
      EXTERNAL        cdiGridDefKeyStr
1630

1631
      INTEGER         cdiGridInqKeyStr
1632
1633
1634
1635
!                                    (INTEGER         gridID,
!                                     INTEGER         key,
!                                     INTEGER         size,
!                                     CHARACTER*(*)   mesg)
1636
      EXTERNAL        cdiGridInqKeyStr
1637

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
      INTEGER         cdiZaxisDefKeyFlt
!                                    (INTEGER         zaxisID,
!                                     INTEGER         key,
!                                     DOUBLEPRECISION value)
      EXTERNAL        cdiZaxisDefKeyFlt

      INTEGER         cdiZaxisInqKeyFlt
!                                    (INTEGER         zaxisID,
!                                     INTEGER         key,
!                                     DOUBLEPRECISION value)
      EXTERNAL        cdiZaxisInqKeyFlt

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
!                     gridDefXname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xname)
      EXTERNAL        gridDefXname

!                     gridInqXname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xname)
      EXTERNAL        gridInqXname

!                     gridDefXlongname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xlongname)
      EXTERNAL        gridDefXlongname

!                     gridInqXlongname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xlongname)
      EXTERNAL        gridInqXlongname

!                     gridDefXunits
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xunits)
      EXTERNAL        gridDefXunits

!                     gridInqXunits
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xunits)
      EXTERNAL        gridInqXunits

!                     gridDefYname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   yname)
      EXTERNAL        gridDefYname

!                     gridInqYname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   yname)
      EXTERNAL        gridInqYname

!                     gridDefYlongname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   ylongname)
      EXTERNAL        gridDefYlongname

!                     gridInqYlongname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   ylongname)
      EXTERNAL        gridInqYlongname

!                     gridDefYunits
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   yunits)
      EXTERNAL        gridDefYunits

!                     gridInqYunits
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   yunits)
      EXTERNAL        gridInqYunits

!                     gridInqXstdname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   xstdname)
      EXTERNAL        gridInqXstdname

!                     gridInqYstdname
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   ystdname)
      EXTERNAL        gridInqYstdname

!                     gridDefPrec
!                                    (INTEGER         gridID,
!                                     INTEGER         prec)
      EXTERNAL        gridDefPrec

      INTEGER         gridInqPrec
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqPrec

      DOUBLEPRECISION gridInqXval
!                                    (INTEGER         gridID,
!                                     INTEGER         index)
      EXTERNAL        gridInqXval

      DOUBLEPRECISION gridInqYval
!                                    (INTEGER         gridID,
!                                     INTEGER         index)
      EXTERNAL        gridInqYval

      DOUBLEPRECISION gridInqXinc
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqXinc

      DOUBLEPRECISION gridInqYinc
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqYinc

      INTEGER         gridIsCircular
!                                    (INTEGER         gridID)
      EXTERNAL        gridIsCircular

      INTEGER         gridInqTrunc
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqTrunc

!                     gridDefTrunc
!                                    (INTEGER         gridID,
!                                     INTEGER         trunc)
      EXTERNAL        gridDefTrunc

!
!  Reference of an unstructured grid
!
!                     gridDefNumber
!                                    (INTEGER         gridID,
!                                     INTEGER         number)
      EXTERNAL        gridDefNumber

      INTEGER         gridInqNumber
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqNumber

!                     gridDefPosition
!                                    (INTEGER         gridID,
!                                     INTEGER         position)
      EXTERNAL        gridDefPosition

      INTEGER         gridInqPosition
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqPosition

!                     gridDefReference
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   reference)
      EXTERNAL        gridDefReference

      INTEGER         gridInqReference
!                                    (INTEGER         gridID,
!                                     CHARACTER*(*)   reference)
      EXTERNAL        gridInqReference

1791
1792
!                     gridDefUUID
!                                    (INTEGER         gridID,
1793
!                                     INTEGER*1(16)   uuid)
1794
1795
      EXTERNAL        gridDefUUID

1796
!                     gridInqUUID
1797
!                                    (INTEGER         gridID,
Thomas Jahns's avatar
Thomas Jahns committed
1798
!                                     INTEGER*1(16)   uuid)
1799
1800
      EXTERNAL        gridInqUUID

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
!
!  Rotated Lon/Lat grid
!
!                     gridDefParamRLL
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION xpole,
!                                     DOUBLEPRECISION ypole,
!                                     DOUBLEPRECISION angle)
      EXTERNAL        gridDefParamRLL

!                     gridInqParamRLL
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION xpole,
!                                     DOUBLEPRECISION ypole,
!                                     DOUBLEPRECISION angle)
      EXTERNAL        gridInqParamRLL

!
!  Hexagonal GME grid
!
!                     gridDefParamGME
!                                    (INTEGER         gridID,
!                                     INTEGER         nd,
!                                     INTEGER         ni,
!                                     INTEGER         ni2,
!                                     INTEGER         ni3)
      EXTERNAL        gridDefParamGME

!                     gridInqParamGME
!                                    (INTEGER         gridID,
!                                     INTEGER         nd,
!                                     INTEGER         ni,
!                                     INTEGER         ni2,
!                                     INTEGER         ni3)
      EXTERNAL        gridInqParamGME

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1837
!
1838
!  Lambert Conformal Conic grid (GRIB version)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1839
!
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1840
!                     gridDefParamLCC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1841
1842
1843
1844
1845
1846
1847
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION originLon,
!                                     DOUBLEPRECISION originLat,
!                                     DOUBLEPRECISION lonParY,
!                                     DOUBLEPRECISION lat1,
!                                     DOUBLEPRECISION lat2,
!                                     DOUBLEPRECISION xinc,
1848
1849
1850
!                                     DOUBLEPRECISION yinc,
!                                     INTEGER         projflag,
!                                     INTEGER         scanflag)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1851
      EXTERNAL        gridDefParamLCC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1852

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1853
!                     gridInqParamLCC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1854
1855
1856
1857
1858
1859
1860
!                                    (INTEGER         gridID,
!                                     DOUBLEPRECISION originLon,
!                                     DOUBLEPRECISION originLat,
!                                     DOUBLEPRECISION lonParY,
!                                     DOUBLEPRECISION lat1,
!                                     DOUBLEPRECISION lat2,
!                                     DOUBLEPRECISION xinc,
1861
1862
1863
!                                     DOUBLEPRECISION yinc,
!                                     INTEGER         projflag,
!                                     INTEGER         scanflag)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1864
      EXTERNAL        gridInqParamLCC
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1865

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1866
1867
!                     gridDefArea
!                                    (INTEGER         gridID,
1868
!                                     DOUBLEPRECISION area(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1869
1870
1871
1872
      EXTERNAL        gridDefArea

!                     gridInqArea
!                                    (INTEGER         gridID,
1873
!                                     DOUBLEPRECISION area(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
      EXTERNAL        gridInqArea

      INTEGER         gridHasArea
!                                    (INTEGER         gridID)
      EXTERNAL        gridHasArea

!                     gridDefNvertex
!                                    (INTEGER         gridID,
!                                     INTEGER         nvertex)
      EXTERNAL        gridDefNvertex

      INTEGER         gridInqNvertex
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqNvertex

!                     gridDefXbounds
!                                    (INTEGER         gridID,
1891
!                                     DOUBLEPRECISION xbounds(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1892
1893
1894
1895
      EXTERNAL        gridDefXbounds

      INTEGER         gridInqXbounds
!                                    (INTEGER         gridID,
1896
!                                     DOUBLEPRECISION xbounds(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1897
1898
1899
1900
      EXTERNAL        gridInqXbounds

!                     gridDefYbounds
!                                    (INTEGER         gridID,
1901
!                                     DOUBLEPRECISION ybounds(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1902
1903
1904
1905
      EXTERNAL        gridDefYbounds

      INTEGER         gridInqYbounds
!                                    (INTEGER         gridID,
1906
!                                     DOUBLEPRECISION ybounds(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1907
1908
      EXTERNAL        gridInqYbounds

1909
1910
1911
!                     gridDefRowlon
!                                    (INTEGER         gridID,
!                                     INTEGER         nrowlon,
1912
!                                     INTEGER         rowlon(*))
1913
1914
      EXTERNAL        gridDefRowlon

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1915
1916
!                     gridInqRowlon
!                                    (INTEGER         gridID,
1917
!                                     INTEGER         rowlon(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1918
1919
1920
1921
1922
1923
1924
      EXTERNAL        gridInqRowlon

!                     gridChangeType
!                                    (INTEGER         gridID,
!                                     INTEGER         gridtype)
      EXTERNAL        gridChangeType

1925
1926
1927
1928
1929
1930
1931
1932
1933
!                     gridDefComplexPacking
!                                    (INTEGER         gridID,
!                                     INTEGER         lpack)
      EXTERNAL        gridDefComplexPacking

      INTEGER         gridInqComplexPacking
!                                    (INTEGER         gridID)
      EXTERNAL        gridInqComplexPacking

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1934
1935
1936
1937
1938
!
!  ZAXIS routines
!
!                     zaxisName
!                                    (INTEGER         zaxistype,
1939
!                                     CHARACTER*(*)   zaxisname)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1940
1941
      EXTERNAL        zaxisName

1942
      INTEGER         zaxisCreate
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1943
!                                    (INTEGER         zaxistype,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1944
!                                     INTEGER         size)
1945
      EXTERNAL        zaxisCreate
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1946

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1947
1948
1949
1950
!                     zaxisDestroy
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisDestroy

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
      INTEGER         zaxisInqType
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqType

      INTEGER         zaxisInqSize
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqSize

      INTEGER         zaxisDuplicate
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisDuplicate

!                     zaxisPrint
1964
!                                    (INTEGER         zaxisID)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1965
1966
1967
1968
      EXTERNAL        zaxisPrint

!                     zaxisDefLevels
!                                    (INTEGER         zaxisID,
1969
!                                     DOUBLEPRECISION levels(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1970
1971
      EXTERNAL        zaxisDefLevels

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1972
      INTEGER         zaxisInqLevels
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1973
!                                    (INTEGER         zaxisID,
1974
!                                     DOUBLEPRECISION levels(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
      EXTERNAL        zaxisInqLevels

!                     zaxisDefLevel
!                                    (INTEGER         zaxisID,
!                                     INTEGER         levelID,
!                                     DOUBLEPRECISION levels)
      EXTERNAL        zaxisDefLevel

      DOUBLEPRECISION zaxisInqLevel
!                                    (INTEGER         zaxisID,
!                                     INTEGER         levelID)
      EXTERNAL        zaxisInqLevel

Uwe Schulzweida's avatar
Uwe Schulzweida committed
1988
1989
1990
1991
1992
1993
1994
1995
1996
!                     zaxisDefNlevRef
!                                    (INTEGER         gridID,
!                                     INTEGER         nhlev)
      EXTERNAL        zaxisDefNlevRef

      INTEGER         zaxisInqNlevRef
!                                    (INTEGER         gridID)
      EXTERNAL        zaxisInqNlevRef

1997
1998
1999
2000
2001
2002
2003
2004
!                     zaxisDefNumber
!                                    (INTEGER         gridID,
!                                     INTEGER         number)
      EXTERNAL        zaxisDefNumber

      INTEGER         zaxisInqNumber
!                                    (INTEGER         gridID)
      EXTERNAL        zaxisInqNumber
2005
2006
2007

!                     zaxisDefUUID
!                                    (INTEGER         zaxisID,
2008
!                                     INTEGER*1(16)   uuid)
2009
2010
      EXTERNAL        zaxisDefUUID

2011
!                     zaxisInqUUID
2012
!                                    (INTEGER         zaxisID,
2013
!                                     INTEGER*1(16)   uuid)
2014
2015
      EXTERNAL        zaxisInqUUID

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2016
      INTEGER         cdiZaxisDefKeyStr
2017
2018
2019
2020
!                                    (INTEGER         zaxisID,
!                                     INTEGER         key,
!                                     INTEGER         size,
!                                     CHARACTER*(*)   mesg)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2021
      EXTERNAL        cdiZaxisDefKeyStr
2022

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2023
      INTEGER         cdiZaxisInqKeyStr
2024
2025
2026
2027
!                                    (INTEGER         zaxisID,
!                                     INTEGER         key,
!                                     INTEGER         size,
!                                     CHARACTER*(*)   mesg)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2028
      EXTERNAL        cdiZaxisInqKeyStr
2029

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2030
2031
!                     zaxisDefName
!                                    (INTEGER         zaxisID,
2032
!                                     CHARACTER*(*)   name_optional)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2033
2034
2035
2036
2037
2038
2039
      EXTERNAL        zaxisDefName

!                     zaxisInqName
!                                    (INTEGER         zaxisID,
!                                     CHARACTER*(*)   name)
      EXTERNAL        zaxisInqName

2040
2041
!                     zaxisDefLongname
!                                    (INTEGER         zaxisID,
2042
!                                     CHARACTER*(*)   longname_optional)
2043
2044
      EXTERNAL        zaxisDefLongname

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2045
2046
2047
2048
2049
!                     zaxisInqLongname
!                                    (INTEGER         zaxisID,
!                                     CHARACTER*(*)   longname)
      EXTERNAL        zaxisInqLongname

2050
!                     zaxisDefUnits
Deike Kleberg's avatar
Deike Kleberg committed
2051
!                                    (INTEGER         zaxisID,
2052
!                                     CHARACTER*(*)   units_optional)
2053
      EXTERNAL        zaxisDefUnits
Deike Kleberg's avatar
Deike Kleberg committed
2054

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2055
2056
2057
2058
2059
!                     zaxisInqUnits
!                                    (INTEGER         zaxisID,
!                                     CHARACTER*(*)   units)
      EXTERNAL        zaxisInqUnits

2060
2061
2062
2063
2064
!                     zaxisInqStdname
!                                    (INTEGER         zaxisID,
!                                     CHARACTER*(*)   stdname)
      EXTERNAL        zaxisInqStdname

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2065
2066
2067
2068
2069
2070
2071
2072
2073
!                     zaxisDefPrec
!                                    (INTEGER         zaxisID,
!                                     INTEGER         prec)
      EXTERNAL        zaxisDefPrec

      INTEGER         zaxisInqPrec
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqPrec

2074
2075
2076
2077
2078
!                     zaxisDefPositive
!                                    (INTEGER         zaxisID,
!                                     INTEGER         positive)
      EXTERNAL        zaxisDefPositive

Deike Kleberg's avatar
Deike Kleberg committed
2079
2080
2081
2082
      INTEGER         zaxisInqPositive
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqPositive

Thomas Jahns's avatar
Thomas Jahns committed
2083
2084
2085
2086
2087
2088
2089
2090
!                     zaxisDefScalar
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisDefScalar

      INTEGER         zaxisInqScalar
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqScalar

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2091
2092
2093
2094
2095
2096
2097
2098
2099
!                     zaxisDefLtype
!                                    (INTEGER         zaxisID,
!                                     INTEGER         ltype)
      EXTERNAL        zaxisDefLtype

      INTEGER         zaxisInqLtype
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqLtype

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2100
2101
2102
!                     zaxisDefVct
!                                    (INTEGER         zaxisID,
!                                     INTEGER         size,
2103
!                                     DOUBLEPRECISION vct(*))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2104
2105
      EXTERNAL        zaxisDefVct

2106
2107
!                     zaxisInqVct
!                                    (INTEGER         zaxisID,
2108
!                                     DOUBLEPRECISION vct(*))
2109
2110
      EXTERNAL        zaxisInqVct

Uwe Schulzweida's avatar
Uwe Schulzweida committed
2111
2112
2113
2114
      INTEGER         zaxisInqVctSize
!                                    (INTEGER         zaxisID)
      EXTERNAL        zaxisInqVctSize

2115
!                     zaxisDefLbounds
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2116
!                                    (INTEGER         zaxisID,
2117
!                                     DOUBLEPRECISION lbounds(*))
2118
      EXTERNAL        zaxisDefLbounds
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2119

2120
      INTEGER         zaxisInqLbounds
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2121
!                                    (INTEGER         zaxisID,
2122
!                                     DOUBLEPRECISION lbounds_optional(*))