STINIT(3NCARG)

✨ NAME ✨

okay so bestie, STINIT is the lil' pre-game ritual πŸ’… β€” she does all the initialization tasks you have to do before STREAM can be called to create a streamline field flow plot. Like, the way she copies info about your input data arrays into internal common block variables and then sets up the coordinate system mappings and boundaries? it's giving responsible queen. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

CALL STINIT (U,LU,V,LV,P,LP,M,N,WRK,LW)

πŸ¦‹ C-BINDING SYNOPSIS πŸ¦‹

#include <ncarg/ncargC.h>

void c_stinit(float *u, int lu, float *v, int lv,
              float *p, int lp, int m, int n,
              float *wrk, int lw)

🌸 DESCRIPTION 🌸

here's the whole squad of arguments, one by one, no skips, no cuts πŸ’–

  • U β€” (REAL 2-dimensional array, dimensioned LU x n: n >= N, input) by default she's assumed to contain the first dimensional Cartesian components of the vector field. BUT β€” plot twist β€” if PLR is non-zero, she gets treated as containing the vector magnitudes instead. πŸ™ˆ
  • LU β€” (INTEGER, input) the actual value of the first dimension of array U.
  • V β€” (REAL 2-dimensional array, dimensioned LV x n: n >= N, input) by default assumed to contain the second dimensional Cartesian components of the vector field. however, if PLR is non-zero, she's treated as containing the vector angles. 🌈
  • LV β€” (INTEGER, input) the actual value of the first dimension of array V.
  • P β€” (REAL, input, DUMMY) this one is literally just vibing rn β€” she's currently ignored and you may assign her a dummy value. πŸ’€
  • LP β€” (INTEGER, input, DUMMY) the first dimension of array P. not currently used, so bestie should be assigned the integer value 0.
  • M β€” (INTEGER, input) number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays, U and V.
  • N β€” (INTEGER, input) number of contiguous elements along the second dimensional axis containing data to be processed in each of the arrays, U and V.
  • WRK β€” (REAL, array dimensioned n: n >= LW, input/output) the work array πŸ› οΈ used to store normalized values of the U and V vector components while the streamlines are calculated. she also holds bit flags indicating whether a grid location is eligible for starting a streamline or placing a directional arrowhead. multi-talented fr fr.
  • LW β€” (INTEGER, input) the assumed size of the array WRK. currently it must be greater or equal to 2*M*N. ⭐

🧚 C-BINDING DESCRIPTION 🧚

the C-binding argument descriptions are the same as the FORTRAN argument descriptions, with the following exceptions (yes there's a plot twist, there always is):

  • lu β€” the second dimension of u in the calling program.
  • lv β€” the second dimension of v in the calling program.
  • lp β€” the second dimension of p in the calling program.
  • m β€” number of contiguous elements along the second dimension containing data to be processed in each of the arrays, u and v.
  • n β€” number of contiguous elements along the first dimension containing data to be processed in each of the arrays, u and v.

πŸ’œ USAGE πŸ’œ

call STINIT before the first invocation of STREAM, and again any time you modify the contents of the input data arrays. periodt.

you may precede an STINIT call with any number of calls to the parameter setting routines, STSETR and STSETI. however β€” and listen, this part matters β€” although it is possible to call STSETI or STSETR between calls to STINIT and STREAM, changing the setting of many of Streamline's parameters at this point will result in incorrect behavior. 😭 so when in doubt, set your parameters before the STINIT call; go check the streamlines_params man page for more info.

set up the two vector component arrays prior to calling STINIT. to permit multiple purpose use of the array space, the STINIT argument list includes both the actual size and an assumed size for the first dimension of each input array. due to FORTRAN array ordering conventions, only the assumed size needs to be specified for the second dimension. (note: when using the C bindings, mentally exchange all references to first and second dimensions in this discussion. 🧠✨) the arguments LU and LV contain the actual size of the first dimensions of U and V, respectively. since the grid locations for each of the data arrays are assumed to coincide, a single argument, M, represents the assumed size of the first dimension for both arrays. similarly, the argument N is the assumed size of the second dimension. the only requirement for the actual second dimension size is that it be greater than or equal to N for each array.

the P and LP arguments are intended for future enhancement of the Streamlines utility. they are not currently used or examined in any way. for maximum assurance of compatibility with future changes to the code, give the LP argument the INTEGER value 0. 🫢

WRK is an array used to store normalized values of the U and V vector components while the streamlines are calculated. she also holds bit flags indicating whether a grid location is eligible for starting a streamline or placing a directional arrowhead. her assumed size is specified by the argument LW. and LW must have a value greater or equal to 2*M*N. πŸ‘‘


πŸ”₯ EXAMPLES πŸ”₯

use the ncargex command to see the following relevant examples: ffex00, ffex01, ffex03, ffex04, fstream, stex01, stex02, stex03.


🌟 ACCESS 🌟

to use STINIT or c_stinit, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. don't be chaotic about it bestie. πŸ’…


πŸ’Œ MESSAGES πŸ’Œ

see the streamlines man page for a description of all Streamlines error messages and/or informational messages.


πŸ‘‘ SEE ALSO πŸ‘‘

Online: stgetc, stgeti, stgetr, stream, streamlines, streamlines_params, strset, stsetc, stseti, stsetr, stuixy, stumsl, stumta, stumxy, ncarg_cbind.

Hardcopy: NCAR Graphics Fundamentals, UNIX Version


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


okay that's the whole page, you ate that πŸ“ this was STINIT(3NCARG) from the NCAR Graphics manual β€” the UNIX flavor, dated April 1993 πŸ’– go make some streamlines, main character ✨