## 10.2.1 ugvect

1.
Function
Draws a 2-D vector field.
2.
Call
NumRu::DCL.ugvect(u,v)
3.
Explanation of Parameters
A munny 2-D array giving the X component of a vector. The NXnNY portion is used for drawing the vector.
 u (R) mu (I) The first adjustable dimension of array u. v (R) A mvnny 2-D array giving the Y component of a vector. The nxnny portion is used for drawing the vector. mv (I) The first adjustable dimension of array v. nx (I) The first adjustable dimension for the  array u, v used for drawing. ny (I) The second adjustable dimension for the  array u, v used for drawing.
4.
Notes
(a)
The units of each component of the vector are in the V-coordinate. However, there is usually no need to give the array u, v  converted into units in VC; only the scaling factor needs to be given. This scaling factor is determined internally when the internal variable 'LNRMAL' is .TRUE. (the initial value). When .false., the internal variables 'XFACT1' and 'YFACT1' are inquired. (The initial values are both 1.0.) Therefore, when the scaling factor is explicitly specified, set 'LNRMAL' to .false., and specify 'XFACT1' and 'YFACT1'. Furthermore, when 'LNRMAL' is .true. and the internal variable 'LEQRAT' is .true., then the scaling factors for X and Y will be the same. (The initial value is .true..)
(b)
A vector is drawn by the UFLNZV in UFPACK. (See Chapter 14.) Therefore, the shape of the vector is determined by the internal variables handled by ufpget/ufpset. However, the line index for the line to draw the vector is determined by the internal variable 'INDEX'. (The initial value is 3.) The internal variable 'ICENT' can be used to specify the position of the starting point of the vector relative to the grid point. When 'ICENT' is +1, then the vector's end point coincides with the grid point; when 0, the center of the vector coincides with the grid point; when -1, the vector's starting point coincides with the grid point. (The initial value is 0.)
(c)
When the coordinates for the grid point in the X direction is not specified by uwsgxa or, uwsgxbsgqwnd inquires about the window information and sets the grid points so that the uxmin and uxmax of the window is divided equally into nx-1 sections.
(d)
When the coordinates for the grid point in the Y direction is not specified by uwsgya or uwsgybsgqwnd inquires about the window information and sets the grid points so that the uymin and uymax of the window is divided equally into ny-1 sections.
(e)
Missing-value handling is performed when the internal variable 'LMISS' handled by glpget/glpset (See user's manual for "MATH1") is .true.. (The missing value inquired in this case is the internal variable 'RMISS' handled by glpget/glpset.) When .false., missing-value handling is not performed. The missing-value handling here is performed when at least one of the X or Y component of the vector is a missing value. (Such a vector will be referred to as "missing-value vector", hereafter.) The actual step taken when the internal variable 'LMISSP' is .true. is that a marker will be drawn on the grid point. (The internal variables and 'ITYPE1', 'INDEX', and  'RSIZEM' are inquired for the values of marker type, marker index, and marker size, respectively. The initial values are 5, 3, and 0.01, respectively.) When 'LMISSP' is .false., then nothing is drawn. (The initial value is .false..) Furthermore, if the internal variable 'LSMALL' is .true., then vectors shorter than the value specified by the internal variable 'RSMALL' are treated in the same manner. However, the internal variable 'ITYPE2' is inquired for marker type. (The initial values of 'LSMALL'rsmall, and itype2 are .false.,  0.001, and  1, respectively.)
(f)
All vector values are checked before drawing. For the following two cases, vectors will not be drawn and a message will be printed. Furthermore, when the internal variable 'LMSG' is .true., a message will be printed in the bottom margin of the graph; when .false., no message will be printed. (The inital value is  .true..) The two cases are:
• All of the vectors are missing values (a missing field)
• All vectors are zero vectors (a zero field)
(g)
When the internal variable 'LUNIT' is .TRUE., then a unit vector is drawn; when .false., not drawn. (The initial value is .false..) Unless explicitly specified by the internal variables 'VXULOC' and 'VYILOC' (the x, y coordinates in the V-coordinate; The initial value is undefined), the unit vector is drawn at a position at a distance specified by the internal variables 'VXUOFF' and 'VYUOFF' away from the lower right-hand corner of the viewport. (The initial value of 'VXUOFF' and 'VYUOFF' is 0.02 and 0, respectively.) The length of a unit vector is determined by the internal variables vxunit and vyunit. (Units in the VC; The initial values are 0.05 and 0.05, respectively.) However, when the internal variables vxunit and vyunit. are explicitly specified, their values are used. (The initial values are undefined.) Unlike vxunit and vyunit, the uxunit and uyunit are specified in units of dimensional quantity specified by the unit vector. Furthermore, when 'LUNIT' is .true., and the internal variable 'LUMSG' is .true., then the size of the unit vector is printed in the bottom margin of the plot. (The initial value is .true..) When 'LUNIT' is .false. and the internal variable 'LMSG' is .true., then the scaling factor is printed in the bottom margin. (The initial value is .true..) These messages are printed using uxpttl. (See Section 3.8.5.) Therefore, a call should be made to ugvect after you have drawn the coordinate axes.