10.2.1 UGVECT

1.
Function
Draws a 2-D vector field.
2.
Call
CALL UGVECT(U,MU,V,MV,NX,NY)
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.