f_vlist_var.tex 12.4 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2


Uwe Schulzweida's avatar
Uwe Schulzweida committed
3
\subsection{Define a Variable: {\tt vlistDefVar}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
4
5
6
7
8
\index{vlistDefVar}
\label{vlistDefVar}

The function {\tt vlistDefVar} adds a new variable to vlistID.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
11
12
13
14
15
16
17
18

\begin{verbatim}
    INTEGER FUNCTION vlistDefVar(INTEGER vlistID, INTEGER gridID, INTEGER zaxisID, 
                                 INTEGER timeID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
19
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
20
\item[{\tt gridID}]
21
Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
22
\item[{\tt zaxisID}]
23
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
24
\item[{\tt timeID}]
Uwe Schulzweida's avatar
Uwe Schulzweida committed
25
26
One of the set of predefined {\CDI} time identifiers.
                    The valid {\CDI} time identifiers are {\tt TIME\_CONSTANT} and {\tt TIME\_VARIABLE}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
28
29
30

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
31
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
32
33
34
35

{\tt vlistDefVar} returns an identifier to the new variable.


Uwe Schulzweida's avatar
Uwe Schulzweida committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
\subsubsection*{Example}

Here is an example using {\tt vlistCreate} to create a variable list
and add a variable with {\tt vlistDefVar}.

\begin{lstlisting}[language=Fortran, backgroundcolor=\color{zebg}, basicstyle=\footnotesize]

    INCLUDE 'cdi.h'
       ...
    INTEGER vlistID, varID
       ...
    vlistID = vlistCreate()
    varID = vlistDefVar(vlistID, gridID, zaxisID, TIME_VARIABLE)
       ...
    streamDefVlist(streamID, vlistID)
       ...
    vlistDestroy(vlistID)
       ...
\end{lstlisting}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
56

Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
\subsection{Get the Grid ID of a Variable: {\tt vlistInqVarGrid}}
\index{vlistInqVarGrid}
\label{vlistInqVarGrid}

The function {\tt vlistInqVarGrid} returns the grid ID of a variable.

\subsubsection*{Usage}

\begin{verbatim}
    INTEGER FUNCTION vlistInqVarGrid(INTEGER vlistID, INTEGER varID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
\item[{\tt varID}]
Variable identifier

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt vlistInqVarGrid} returns the grid ID of the variable.



\subsection{Get the Zaxis ID of a Variable: {\tt vlistInqVarZaxis}}
\index{vlistInqVarZaxis}
\label{vlistInqVarZaxis}

The function {\tt vlistInqVarZaxis} returns the zaxis ID of a variable.

\subsubsection*{Usage}

\begin{verbatim}
    INTEGER FUNCTION vlistInqVarZaxis(INTEGER vlistID, INTEGER varID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
\item[{\tt varID}]
Variable identifier

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt vlistInqVarZaxis} returns the zaxis ID of the variable.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
113
\subsection{Define the code number of a Variable: {\tt vlistDefVarCode}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
114
115
116
117
118
\index{vlistDefVarCode}
\label{vlistDefVarCode}

The function {\tt vlistDefVarCode} defines the code number of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
119
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
120
121
122
123
124
125
126
127

\begin{verbatim}
    SUBROUTINE vlistDefVarCode(INTEGER vlistID, INTEGER varID, INTEGER code)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
128
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
129
130
131
132
133
134
135
136
137
\item[{\tt varID}]
Variable identifier
\item[{\tt code}]
Code number

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
138
\subsection{Get the Code number of a Variable: {\tt vlistInqVarCode}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
139
140
141
142
143
\index{vlistInqVarCode}
\label{vlistInqVarCode}

The function {\tt vlistInqVarCode} returns the code number of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
144
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
145
146
147
148
149
150
151
152

\begin{verbatim}
    INTEGER FUNCTION vlistInqVarCode(INTEGER vlistID, INTEGER varID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
153
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
154
155
156
157
158
159
\item[{\tt varID}]
Variable identifier

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
160
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
161
162
163
164
165

{\tt vlistInqVarCode} returns the code number of the variable.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
166
\subsection{Define the name of a Variable: {\tt vlistDefVarName}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
167
168
169
170
171
\index{vlistDefVarName}
\label{vlistDefVarName}

The function {\tt vlistDefVarName} defines the name of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
172
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
174
175
176
177
178
179
180

\begin{verbatim}
    SUBROUTINE vlistDefVarName(INTEGER vlistID, INTEGER varID, CHARACTER*(*) name)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
181
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
182
183
184
185
186
187
188
189
190
\item[{\tt varID}]
Variable identifier
\item[{\tt name}]
Name of the variable

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
191
\subsection{Get the name of a Variable: {\tt vlistInqVarName}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
192
193
194
195
196
\index{vlistInqVarName}
\label{vlistInqVarName}

The function {\tt vlistInqVarName} returns the name of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
197
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
198
199
200
201
202
203
204
205

\begin{verbatim}
    SUBROUTINE vlistInqVarName(INTEGER vlistID, INTEGER varID, CHARACTER*(*) name)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
206
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
207
208
209
210
211
212
213
214
\item[{\tt varID}]
Variable identifier
\item[{\tt name}]
Variable name

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
215
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
216
217
218
219
220

{\tt vlistInqVarName} returns the name of the variable to the parameter name.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
221
\subsection{Define the long name of a Variable: {\tt vlistDefVarLongname}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
222
223
224
225
226
\index{vlistDefVarLongname}
\label{vlistDefVarLongname}

The function {\tt vlistDefVarLongname} defines the long name of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
227
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
228
229
230
231
232
233
234
235
236

\begin{verbatim}
    SUBROUTINE vlistDefVarLongname(INTEGER vlistID, INTEGER varID, 
                                   CHARACTER*(*) longname)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt longname\ }
\item[{\tt vlistID}]
237
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
238
239
240
241
242
243
244
245
246
\item[{\tt varID}]
Variable identifier
\item[{\tt longname}]
Long name of the variable

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
247
\subsection{Get the longname of a Variable: {\tt vlistInqVarLongname}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
248
249
250
251
252
\index{vlistInqVarLongname}
\label{vlistInqVarLongname}

The function {\tt vlistInqVarLongname} returns the longname of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
253
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
254
255
256
257
258
259
260
261
262

\begin{verbatim}
    SUBROUTINE vlistInqVarLongname(INTEGER vlistID, INTEGER varID, 
                                   CHARACTER*(*) longname)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt longname\ }
\item[{\tt vlistID}]
263
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
264
265
266
267
268
269
270
271
\item[{\tt varID}]
Variable identifier
\item[{\tt longname}]
Variable description

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
272
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
273
274
275
276
277

{\tt vlistInqVaeLongname} returns the longname of the variable to the parameter longname.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
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
\subsection{Define the standard name of a Variable: {\tt vlistDefVarStdname}}
\index{vlistDefVarStdname}
\label{vlistDefVarStdname}

The function {\tt vlistDefVarStdname} defines the standard name of a variable.

\subsubsection*{Usage}

\begin{verbatim}
    SUBROUTINE vlistDefVarStdname(INTEGER vlistID, INTEGER varID, 
                                  CHARACTER*(*) stdname)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
\item[{\tt varID}]
Variable identifier
\item[{\tt stdname}]
Standard name of the variable

\end{deflist}
\end{minipage}


\subsection{Get the standard name of a Variable: {\tt vlistInqVarStdname}}
\index{vlistInqVarStdname}
\label{vlistInqVarStdname}

The function {\tt vlistInqVarStdname} returns the standard name of a variable.

\subsubsection*{Usage}

\begin{verbatim}
    SUBROUTINE vlistInqVarStdname(INTEGER vlistID, INTEGER varID, 
                                  CHARACTER*(*) stdname)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
\item[{\tt varID}]
Variable identifier
\item[{\tt stdname}]
Variable standard name

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt vlistInqVarName} returns the standard name of the variable to the parameter stdname.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
335
\subsection{Define the units of a Variable: {\tt vlistDefVarUnits}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
336
337
338
339
340
\index{vlistDefVarUnits}
\label{vlistDefVarUnits}

The function {\tt vlistDefVarUnits} defines the units of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
341
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
342
343
344
345
346
347
348
349

\begin{verbatim}
    SUBROUTINE vlistDefVarUnits(INTEGER vlistID, INTEGER varID, CHARACTER*(*) units)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
350
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
351
352
353
354
355
356
357
358
359
\item[{\tt varID}]
Variable identifier
\item[{\tt units}]
Units of the variable

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
360
\subsection{Get the units of a Variable: {\tt vlistInqVarUnits}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
361
362
363
364
365
\index{vlistInqVarUnits}
\label{vlistInqVarUnits}

The function {\tt vlistInqVarUnits} returns the units of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
366
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
367
368
369
370
371
372
373
374

\begin{verbatim}
    SUBROUTINE vlistInqVarUnits(INTEGER vlistID, INTEGER varID, CHARACTER*(*) units)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
375
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
376
377
378
379
380
381
382
383
\item[{\tt varID}]
Variable identifier
\item[{\tt units}]
Variable units

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
384
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
385
386
387
388
389

{\tt vlistInqVarUnits} returns the units of the variable to the parameter units.



Uwe Schulzweida's avatar
Uwe Schulzweida committed
390
\subsection{Define the data type of a Variable: {\tt vlistDefVarDatatype}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
391
392
393
394
395
\index{vlistDefVarDatatype}
\label{vlistDefVarDatatype}

The function {\tt vlistDefVarDatatype} defines the data type of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
396
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
397
398
399
400
401
402
403
404

\begin{verbatim}
    SUBROUTINE vlistDefVarDatatype(INTEGER vlistID, INTEGER varID, INTEGER datatype)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt datatype\ }
\item[{\tt vlistID}]
405
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
406
407
408
\item[{\tt varID}]
Variable identifier
\item[{\tt datatype}]
Uwe Schulzweida's avatar
Uwe Schulzweida committed
409
The data type identifier.
410
411
                    The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16},
                    {\tt DATATYPE\_PACK24}, {\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
412

Uwe Schulzweida's avatar
Uwe Schulzweida committed
413
414
415
416
417

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
418
\subsection{Get the data type of a Variable: {\tt vlistInqVarDatatype}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
419
420
421
\index{vlistInqVarDatatype}
\label{vlistInqVarDatatype}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
422
The function {\tt vlistInqVarDatatype} returns the data type of a variable.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
423

Uwe Schulzweida's avatar
Uwe Schulzweida committed
424
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
425
426
427
428
429
430
431
432

\begin{verbatim}
    INTEGER FUNCTION vlistInqVarDatatype(INTEGER vlistID, INTEGER varID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
433
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
434
435
436
437
438
439
\item[{\tt varID}]
Variable identifier

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
440
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
441

Uwe Schulzweida's avatar
Uwe Schulzweida committed
442
{\tt vlistInqVarDatatype} returns an identifier to the data type of the variable.
443
444
The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16}, {\tt DATATYPE\_PACK24},
{\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
445
446
447



Uwe Schulzweida's avatar
Uwe Schulzweida committed
448
\subsection{Define the missing value of a Variable: {\tt vlistDefVarMissval}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
449
450
451
452
453
\index{vlistDefVarMissval}
\label{vlistDefVarMissval}

The function {\tt vlistDefVarMissval} defines the missing value of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
454
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
455
456
457
458
459
460
461
462

\begin{verbatim}
    SUBROUTINE vlistDefVarMissval(INTEGER vlistID, INTEGER varID, REAL*8 missval)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
463
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
464
465
466
467
468
469
470
471
472
\item[{\tt varID}]
Variable identifier
\item[{\tt missval}]
Missing value

\end{deflist}
\end{minipage}


Uwe Schulzweida's avatar
Uwe Schulzweida committed
473
\subsection{Get the missing value of a Variable: {\tt vlistInqVarMissval}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
474
475
476
477
478
\index{vlistInqVarMissval}
\label{vlistInqVarMissval}

The function {\tt vlistInqVarMissval} returns the missing value of a variable.

Uwe Schulzweida's avatar
Uwe Schulzweida committed
479
\subsubsection*{Usage}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
480
481
482
483
484
485
486
487

\begin{verbatim}
    REAL*8 FUNCTION vlistInqVarMissval(INTEGER vlistID, INTEGER varID)
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt vlistID\ }
\item[{\tt vlistID}]
488
Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
489
490
491
492
493
494
\item[{\tt varID}]
Variable identifier

\end{deflist}
\end{minipage}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
495
\subsubsection*{Result}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
496
497
498

{\tt vlistInqVarMissval} returns the missing value of the variable.