1VELVCT(3NCARG)                   NCAR GRAPHICS                  VELVCT(3NCARG)
2
3
4

NAME

6       VELVCT - Plots a vector field, given two 2-dimensional vector component
7       arrays, U and V. You may control certain characteristics of the plot by
8       adjusting the values given to the input arguments. Other less
9       frequently changed characteristics may be affected by modifying VELDAT,
10       the BLOCK DATA routine that initializes members of the common blocks
11       VEC1 and VEC2. In addition, depending on the value given to the
12       compatibility parameter, CPM, you may set other options by calling
13       VVSETC, VVSETI, or VVSETR to modify internal parameters.
14

SYNOPSIS

16       CALL VELVCT (U,LU,V,LV,M,N,FLO,HI,NSET,LENGTH,ISPV,SPV)
17

STATUS

19       VELVCT is obsolete, and is supported only to provide compatibility with
20       old NCAR Graphics codes. However, the compatibility mode parameter,
21       CPM, offers a number of options to help ease the the transition to the
22       new version of the utility. When writing new code you are encouraged
23       not to use this entry point, since it provides less capability than the
24       standard Vectors interface, and may eventually be phased out.
25

C-BINDING SYNOPSIS

27       #include <ncarg/ncargC.h>
28
29       void c_velvct(float *u, int lu, float *v, int lv, int m,
30                     int n, float flo, float hi, int nset,
31                     int length, int ispv, float *spv)
32

DESCRIPTION

34       U           (REAL 2-dimensional array, dimensioned LU x n: n >= N,
35                   input): By default, assumed to contain the first
36                   dimensional Cartesian components of the vector field.
37                   However, if PLR is non-zero, it is treated as containing
38                   the vector magnitudes.
39
40       LU          (INTEGER, input): Actual value of the first dimension of
41                   array U.
42
43       V           (REAL 2-dimensional array, dimensioned LV x n: n >= N,
44                   input): By default, assumed to contain the second
45                   dimensional Cartesian components of the vector field.
46                   However, if PLR is non-zero, it is treated as containing
47                   the vector angles.
48
49       LV          LV (INTEGER, input): Actual value of the first dimension of
50                   array V.
51
52       M           (INTEGER, input): Number of contiguous elements along the
53                   first dimensional axis containing data to be processed in
54                   each of the arrays, U and V.
55
56       N           (INTEGER, input): Number of contiguous elements along the
57                   second dimensional axis containing data to be processed in
58                   each of the arrays, U and V.
59
60       FLO         (REAL, input): Minimum vector magnitude allowed to be
61                   displayed in the plot.
62
63       HI          (REAL, input): Maximum vector magnitude allowed to be
64                   displayed in the plot. If set to 0.0 there is no upper
65                   limit imposed.
66
67       NSET        (INTEGER, input): Flag that controls how and when the SET
68                   call is invoked. If NSET is 0, VELVCT makes a SET call to
69                   establish a standard viewport and window boundaries
70                   coincident with the array coordinate boundaries. PERIM is
71                   called to draw a border. If NSET is greater than zero,
72                   VELVCT does not call SET or PERIM. If NSET is less than
73                   zero, VELVCT calls SET to establish window boundaries
74                   coincident with the array grid coordinate boundaries but
75                   does not modify the viewport or call PERIM. Unlike the
76                   VVINIT/VVECTR interface, when VELVCT does a SET call, it
77                   always restores the original coordinate system state before
78                   returning.
79
80       LENGTH      (INTEGER, input): The length in plotter address units
81                   (PAUs) used to render the vector with the greatest
82                   magnitude that is eligible for plotting. A vector is
83                   eligible for plotting if it is less than or equal to the
84                   value of HI, unless HI is 0.0 in which case all vectors are
85                   eligible. If LENGTH is set to 0.0, the length selected is
86                   one half the diagonal length of a grid cell assuming a
87                   linear mapping of the grid coordinate space into the
88                   viewport.
89
90       ISPV        (INTEGER, input): Flag to control the special value
91                   feature. 0 means that the feature is not in use. 1 means
92                   that if the value of U(I,J)=SPV(1) the vector will not be
93                   plotted.  2 means that if the value of V(I,J)=SPV(2) the
94                   vector will not be plotted. 3 means that if either
95                   U(I,J)=SPV(1) or V(I,J)=SPV(2) then the vector will not be
96                   plotted. 4 means that if U(I,J)=SPV(1) and V(I,J)=SPV(2),
97                   the vector will not be plotted.
98
99       SPV         (REAL array, dimensioned 2, input): An array of length 2
100                   which gives the value in the U array and the value in the V
101                   array which denote special values. This argument is ignored
102                   if ISPV=0. The default values are 1.0E12.
103

C-BINDING DESCRIPTION

105       The C-binding argument descriptions are the same as the FORTRAN
106       argument descriptions with the following exceptions:
107
108
109       lu          The second dimension of u in the calling program.
110
111       lv          The second dimension of v in the calling program.
112
113       m           Number of contiguous elements along the second dimensional
114                   axis containing data to be processed in each of the arrays,
115                   u and v.
116
117       n           Number of contiguous elements along the first dimensional
118                   axis containing data to be processed in each of the arrays,
119                   u and v.
120

USAGE

122       Beginning with version 3.2 of NCAR Graphics, the VELVCT entry point has
123       been recoded as a front end to the VVINIT/VVECTR interface to Vectors.
124       The compatibility mode parameter, CPM, controls the degree to which a
125       call to the Version 3.2 VELVCT emulates the older call. Appropriate
126       settings of CPM can separately address each of the following three
127       questions regarding the level of emulation:
128
129       ·      Should FX, FY, MXF, and MYF rather than the Version 3.2 mapping
130              routines perform the mapping to user coordinates?
131
132       ·      Should the input arguments FLO, HI, NSET, LENGTH, ISPV, SPV
133              override the current values of the corresponding Vectors'
134              internal parameters?
135
136       ·      Should the values contained in the common blocks VEC1 and VEC2
137              override the current values of corresponding Vectors' internal
138              parameters?
139
140       Given the default value of CPM, all these questions are answered in the
141       affirmative, and a call to VELVCT gives a reasonably faithful emulation
142       of the older version's behavior.
143
144       However, even in this case, it is possible to use the parameter setting
145       routines to control the behavior of features that have no counterpart
146       in the older version of VELVCT, as long as the feature is accessible
147       without calling the new interface. For instance, you could control the
148       vector linewidth by setting the LWD parameter, although you could not
149       draw vectors masked to an area map because doing so requires direct
150       invocation of VVECTR
151
152       The following two tables show how the VELVCT input arguments and
153       VEC1/VEC2 common block members map into internal parameters currently
154       supported by Vectors. (Consult the vectors_params man page for
155       descriptions of the internal parameters.)
156
157              Input Argument        Internal Parameter
158
159              FLO                   VLC (VLC is set to -FLO if FLO is
160                                    positive, 0.0 otherwise)
161
162              HI                    VHC (VHC is set to -HI if HI is positive,
163                                    0.0 otherwise)
164
165              NSET                  SET (NSET = 0 is approximately equivalent
166                                    to SET = 1)
167
168              LENGTH                VRL (LENGTH in Plotter Address Units is
169                                    converted to VRL as a fraction of the
170                                    viewport width)
171
172              ISPV                  SVF
173
174              SPV(1)                USV
175
176              SPV(2)                VSV
177
178
179              Common Block Member   Internal Parameter
180
181              EXT                   VPS
182
183              ICTRFG                VPO
184
185              ILAB                  LBL
186
187              IOFFD                 DPF
188
189              RMN                   AMN (RMN in metacode coordinates is
190                                    converted to AMN as a fraction of the
191                                    viewport width)
192
193              RMX                   AMX (RMX in metacode coordinates is
194                                    converted to AMX as a fraction of the
195                                    viewport width)
196
197              SIZE                  LBS (Character size in metacode
198                                    coordinates is converted to LBS as a
199                                    fraction of viewport width)
200
201              INCX                  XIN
202
203              INCY                  YIN
204
205              -                     MNT (When common blocks VEC1 and VEC2
206                                    override parameter settings, MNT is always
207                                    set to " ", indicating that the minimum
208                                    vector text block is not to be displayed.)
209
210              IOFFM                 MXT (If IOFFM is non-zero, MXT is set to "
211                                    ", indicating that the maximum text block
212                                    is not to be displayed. Otherwise MXT is
213                                    set to the string "MAXIMUM VECTOR")
214
215              IOFFM                 MXX (If IOFFM is 0, MXX is set to a
216                                    computed value that, as a fraction of the
217                                    viewport width, specifies a point 0.05 in
218                                    NDC left of the right hand edge of the
219                                    plotter frame.)
220
221              IOFFM                 MXY (If IOFFM is 0, MXY is set to a
222                                    computed value that, as a fraction of the
223                                    viewport height, specifies a point 0.005
224                                    in NDC up from the bottom edge of the
225                                    plotter frame.)
226
227              IOFFM                 MXP (If IOFFM is 0, MXP is set to -2,
228                                    indicating that the text block should be
229                                    lower-right justified.
230

Note that the emulation of the maximum vector text block differs from

232       the older implementation in that it now uses high-quality text.
233

EXAMPLES

235       Use the ncargex command to see the following relevant example: stex02,
236       tvelvc.
237

ACCESS

239       To use VELVCT or c_velvct, load the NCAR Graphics libraries ncarg,
240       ncarg_gks, and ncarg_c, preferably in that order.
241

SEE ALSO

243       Online: vectors, vectors_params, fx, vvectr, vvgetc, vvgeti, vvgetr,
244       vvinit, vvrset, vvsetc, vvseti, vvsetr, vvudmv, vvumxy, ncarg_cbind.
245
247       Copyright (C) 1987-2007
248       University Corporation for Atmospheric Research
249
250       This documentation is free software; you can redistribute it and/or
251       modify it under the terms of the GNU General Public License as
252       published by the Free Software Foundation; either version 2 of the
253       License, or (at your option) any later version.
254
255       This software is distributed in the hope that it will be useful, but
256       WITHOUT ANY WARRANTY; without even the implied warranty of
257       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
258       General Public License for more details.
259
260       You should have received a copy of the GNU General Public License along
261       with this software; if not, write to the Free Software Foundation,
262       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
263
264
265
266
267UNIX                              April 1993                    VELVCT(3NCARG)
Impressum