1STRMLN(3NCARG) NCAR GRAPHICS STRMLN(3NCARG)
2
3
4
6 STRMLN - Plots a streamline representation of field flow data, given
7 two 2-dimensional vector component arrays, U and V. You may control
8 certain characteristics of the plot by adjusting the values given to
9 the input arguments. In addition, depending on the value given to the
10 compatibility parameter, CPM, you may set other options by calling
11 STSETI or STSETR to modify internal parameters.
12
14 STRMLN is obsolete, and is supported only to provide compatibility with
15 old NCAR Graphics codes. However, the compatibility mode parameter,
16 CPM, offers a number of options to help ease the the transition to the
17 new version of the utility. When writing new code you are encouraged
18 not to use this entry point, since it provides less capability than the
19 standard Streamlines interface, and may eventually be phased out.
20
22 CALL STRMLN (U,V,WORK,IMAX,IPTSX,JPTSY,NSET,IER)
23
25 #include <ncarg/ncargC.h>
26
27 void c_strmln (float *u, float *v, float *work, int imax,
28 int iptsx, int jptsy, int nset, int *ier)
29
31 U (REAL 2-dimensional array, dimensioned IMAX x n: n >=
32 JPTSY, input): By default, assumed to contain the first
33 dimensional Cartesian components of the vector field.
34 However, if PLR is non-zero, it is treated as containing
35 the vector magnitudes.
36
37 V (REAL 2-dimensional array, dimensioned IMAX x n: n >=
38 JPTSY, input): By default, assumed to contain the second
39 dimensional Cartesian components of the vector field.
40 However, if PLR is non-zero, it is treated as containing
41 the vector angles.
42
43 WORK (REAL array, dimensioned n: n>= 2*IPTSX*JPTSY, working
44 space): User provided work array used to store the
45 normalized vector component values, and also to keep track
46 of the grid boxes eligible for starting a streamline or
47 placement of a directional arrow.
48
49 IMAX (INTEGER, input): Actual value of the first dimension of
50 arrays U and V.
51
52 IPTSX (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 JPTSY (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 NSET (INTEGER, input) Flag that controls how and when the SET
61 call is invoked. If NSET is 0, STRMLN makes a SET call to
62 establish a standard viewport and window boundaries
63 coincident with the array coordinate boundaries. PERIM is
64 called to draw a border. If NSET is greater than zero,
65 STRMLN does not call SET or PERIM. If NSET is less than
66 zero, STRMLN calls SET to establish window boundaries
67 coincident with the array grid coordinate boundaries but
68 does not modify the viewport or call PERIM. Unlike the
69 STINIT/STREAM interface, when STRMLN does a SET call, it
70 always restores the original coordinate system state before
71 returning.
72
73 IER (INTEGER, output) If no error involving the ICYC common
74 block variable (or, depending on the compatibility mode,
75 the CYK internal parameter) is detected IER contains the
76 value 0 on exit from STRMLN. If, when STRMLN is invoked,
77 ICYC (or CYK) is erroneously set to indicate that the data
78 is cyclic, STRMLN still processes the data using non-cyclic
79 interpolation formulas, but returns the value of -1 in IER.
80
82 The C-binding argument descriptions are the same as the FORTRAN
83 argument descriptions, with the following exceptions:
84
85
86 imax The second dimension of u and v in the calling program
87
88 iptsx Number of contiguous elements along the second dimensional
89 axis containing data to be processed in each of the arrays,
90 u and v.
91
92 jptsy Number of contiguous elements along the first dimensional
93 axis containing data to be processed in each of the arrays,
94 u and v.
95
97 Beginning with version 3.2 of NCAR Graphics, the STRMLN entry point has
98 been recoded as a front end to the STINIT/STREAM interface to
99 Streamlines. The compatibility mode parameter, CPM, controls the degree
100 to which a call to the Version 3.2 STRMLN emulates the older call.
101 Appropriate settings of CPM can separately answer each of the following
102 three questions regarding the level of emulation:
103
104 · Should FX and FY rather than the Version 3.2 mapping routines
105 perform the mapping to user coordinates?
106
107 · Should the value of the input argument, NSET, override the
108 current value of the SET parameter?
109
110 · Should the values contained in the common blocks STR02 and STR03
111 override the current values of corresponding Streamlines'
112 internal parameters?
113
114 Given the default value of CPM, all these questions are answered in the
115 affirmative, and a call to STRMLN gives a reasonably faithful emulation
116 of the older version's behavior.
117
118 However, even in this case, it is possible to use the parameter setting
119 routines to control the behavior of features that have no counterpart
120 in the older version of STRMLN, as long as the feature is accessible
121 without calling the new interface. For instance, you could control the
122 streamline linewidth by setting the LWD parameter, but on the other
123 hand you could not draw streamlines masked to an area map because doing
124 so requires direct invocation of STREAM with the proper input
125 arguments. The following two tables show how the STRMLN input arguments
126 and STR02/STR03 common block members map into internal parameters
127 currently supported by Streamlines:
128
129 Input Argument Internal Parameter
130
131 NSET SET (NSET = 0 is approximately equivalent
132 to SET = 1)
133
134
135 Common Block Member Internal Parameter
136
137 INITA SGD
138
139 INITB AGD
140
141 ITERP CKP
142
143 ITERC CKX
144
145 IGFLG TRP
146
147 ICYC CYK
148
149 IMSG SVF
150
151 UVMSG USV
152
153 UVMSG VSV
154
155 DISPL VNL
156
157 AROWL ARL (AROWL as fraction of grid box size is
158 converted to ARL as fraction of viewport
159 width)
160
161 CSTOP SSP (CSTOP as fraction of grid box size is
162 converted to SSP as fraction of viewport
163 width)
164
165 DISPL DFM (DISPL as fraction of grid box size is
166 converted to DFM as fraction of viewport
167 width)
168
169 DISPC/DISPL CDS (The critical displacement multiplier
170 CDS is calculated as the ratio of DISPC to
171 DISPL)
172
173 See the streamlines_params man page for a description of the internal
174 parameters.
175
177 Use the ncargex command to see the following relevant examples: stex02,
178 tstrml.
179
181 To use STRMLN or c_strmln, load the NCAR Graphics libraries ncarg,
182 ncarg_gks, and ncarg_c, preferably in that order.
183
185 Online: fx, stgetc, stgeti, stgetr, stinit, stream, streamlines,
186 streamlines_params, strset, stsetc, stseti, stsetr, stuixy, stumsl,
187 stumta, stumxy, ncarg_cbind.
188
190 Copyright (C) 1987-2009
191 University Corporation for Atmospheric Research
192 The use of this Software is governed by a License Agreement.
193
194
195
196UNIX April 1993 STRMLN(3NCARG)