1STINIT(3NCARG) NCAR GRAPHICS STINIT(3NCARG)
2
3
4
6 STINIT - Performs initialization tasks required before STREAM may be
7 called to create a streamline field flow plot. Information about the
8 input data arrays is copied into internal common block variables and
9 the coordinate system mappings and boundaries are established.
10
12 CALL STINIT (U,LU,V,LV,P,LP,M,N,WRK,LW)
13
15 #include <ncarg/ncargC.h>
16
17 void c_stinit(float *u, int lu, float *v, int lv,
18 float *p, int lp, int m, int n,
19 float *wrk, int lw)
20
22 U (REAL 2-dimensional array, dimensioned LU x n: n >= N,
23 input): By default, assumed to contain the first
24 dimensional Cartesian components of the vector field.
25 However, if PLR is non-zero, it is treated as containing
26 the vector magnitudes.
27
28 LU (INTEGER, input): Actual value of the first dimension of
29 array U.
30
31 V (REAL 2-dimensional array, dimensioned LV x n: n >= N,
32 input): By default, assumed to contain the second
33 dimensional Cartesian components of the vector field.
34 However, if PLR is non-zero, it is treated as containing
35 the vector angles.
36
37 LV (INTEGER, input): Actual value of the first dimension of
38 array V.
39
40 P (REAL, input, DUMMY): This argument is currently ignored
41 and may be assigned a dummy value.
42
43 LP (INTEGER, input, DUMMY): The first dimension of array P.
44 Not currently used, this argument should be assigned the
45 integer value 0.
46
47 M (INTEGER, input): Number of contiguous elements along the
48 first dimensional axis containing data to be processed in
49 each of the arrays, U and V.
50
51 N (INTEGER, input): Number of contiguous elements along the
52 second dimensional axis containing data to be processed in
53 each of the arrays, U and V.
54
55 WRK (REAL, array dimensioned n: n >= LW, input/output): Work
56 array used to store normalized values of the U and V vector
57 components while the streamlines are calculated. It also
58 holds bit flags indicating whether a grid location is
59 eligible for starting a streamline or placing a directional
60 arrowhead.
61
62 LW (INTEGER, input): Assumed size of the array WRK. Currently
63 it must greater or equal to 2*M*N.
64
66 The C-binding argument descriptions are the same as the FORTRAN
67 argument descriptions, with the following exceptions:
68
69
70 lu The second dimension of u in the calling program.
71
72 lv The second dimension of v in the calling program.
73
74 lp The second dimension of p in the calling program.
75
76 m Number of contiguous elements along the second dimension
77 containing data to be processed in each of the arrays, u
78 and v.
79
80 n Number of contiguous elements along the first dimension
81 containing data to be processed in each of the arrays, u
82 and v.
83
85 Call STINIT before the first invocation of STREAM, and again anytime
86 you modify the contents of the input data arrays. You may precede an
87 STINIT call with any number of calls to the parameter setting routines,
88 STSETR and STSETI. Although it is possible to call STSETI or STSETR
89 between calls to STINIT and STREAM, changing the setting of many of
90 Streamline's parameters at this point will result in incorrect
91 behavior. When in doubt, set parameters before the STINIT call; see the
92 streamlines_params man page for more information.
93
94 Set up the two vector component arrays prior to calling STINIT. To
95 permit multiple purpose use of the array space, the STINIT argument
96 list includes both the actual size and an assumed size for the first
97 dimension of each input array. Due to FORTRAN array ordering
98 conventions, only the assumed size needs to be specified for the second
99 dimension. (Note: when using the C bindings, mentally exchange all
100 references to first and second dimensions in this discussion.) The
101 arguments LU and LV contain the actual size of the first dimensions of
102 U and V, respectively. Since the grid locations for each of the data
103 arrays are assumed to coincide, a single argument, M, represents the
104 assumed size of the first dimension for both arrays. Similarly, the
105 argument, N, is the assumed size of the second dimension. The only
106 requirement for the actual second dimension size is that it be greater
107 than or equal to N for each array.
108
109 The P and LP arguments are intended for future enhancement of the
110 Streamlines utility. They are not currently used or examined in any
111 way. For maximum assurance of compatibility with future changes to the
112 code, give the LP argument the INTEGER value 0.
113
114 WRK is an array used to store normalized values of the U and V vector
115 components while the streamlines are calculated. It also holds bit
116 flags indicating whether a grid location is eligible for starting a
117 streamline or placing a directional arrowhead. Its assumed size is
118 specified by the argument LW. LW must have a value greater or equal to
119 2*M*N.
120
122 Use the ncargex command to see the following relevant examples: ffex00,
123 ffex01, ffex03, ffex04, fstream, stex01, stex02, stex03.
124
126 To use STINIT or c_stinit, load the NCAR Graphics libraries ncarg,
127 ncarg_gks, and ncarg_c, preferably in that order.
128
130 See the streamlines man page for a description of all Streamlines error
131 messages and/or informational messages.
132
134 Online: stgetc, stgeti, stgetr, stream, streamlines,
135 streamlines_params, strset, stsetc, stseti, stsetr, stuixy, stumsl,
136 stumta, stumxy, ncarg_cbind.
137
138 Hardcopy: NCAR Graphics Fundamentals, UNIX Version
139
141 Copyright (C) 1987-2009
142 University Corporation for Atmospheric Research
143 The use of this Software is governed by a License Agreement.
144
145
146
147UNIX April 1993 STINIT(3NCARG)