VVINIT(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’– VVINIT β€” the NCAR Graphics glow-up era πŸ’–

okay bestie, gather round, because this is VVINIT(3NCARG) and she is the prep queen of vector plotting. πŸŽ€ This is from the NCAR GRAPHICS manual, and she does all the boring-but-essential setup so that VVECTR can later show up and be the main character. ✨


✨ NAME ✨

VVINIT β€” does all the initialization tasks you literally have to do before VVECTR can be called to plot a vector field. That means: copying array size info into internal common block variables, setting up coordinate system mappings and boundaries, figuring out the max and min vector magnitudes and scalar array values, and β€” if you need it β€” building the color threshold value array. πŸ’…


🌸 SYNOPSIS 🌸

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

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

#include <ncarg/ncargC.h>

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

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the whole cast of arguments, no skips, no cuts:

  • U β€” (REAL 2-dimensional array, dimensioned LU x n: n >= N, input): by default this is assumed to hold the first dimensional Cartesian components of the vector field. BUT β€” plot twist β€” if PLR is non-zero, it's treated as holding 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 hold the second dimensional Cartesian components of the vector field. And yeah, same deal: if PLR is non-zero, it's treated as holding the vector angles. πŸ™ˆ
  • LV β€” (INTEGER, input): actual value of the first dimension of array V.
  • P β€” (REAL 2-dimensional array, dimensioned LP x n: n >= N, input): array of scalar data that may be used to color the vectors. The grid points are assumed to coincide with the grid points of the U and V arrays. Only required if CTV has an absolute value of 2; otherwise this argument is ignored and you can just toss it a dummy value. πŸ’€
  • LP β€” (INTEGER, input): actual value of the first dimension of array P.
  • M β€” (INTEGER, input): number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays, U, V, and P (if used).
  • N β€” (INTEGER, input): number of contiguous elements along the second dimensional axis containing data to be processed in each of the arrays, U, V, and P (if used).
  • WRK β€” (REAL, array dimensioned n: n >= LW, input/output): work array, required only if the parameter VMD is set to a value greater than 0.0. If it is required, it must be dimensioned greater or equal to 2 * M * N. Otherwise you may set it to a dummy value. 🧚
  • LW β€” (INTEGER, input): assumed size of the array WRK. If the parameter VMD is set to a value greater than 0.0, it must be set to a value less than or equal to the dimension of the WRK array, but greater or equal to 2 * M * N. Otherwise, this argument should be assigned the integer value 0.

πŸ’« C-BINDING DESCRIPTION πŸ’«

the C-binding argument descriptions are the same as the FORTRAN argument descriptions, except for these lil swaps:

  • 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 dimensional axis containing data to be processed in each of the arrays, u, v, and p (if used).
  • n β€” number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays, u, v, and p (if used).

πŸ”₯ USAGE πŸ”₯

Call VVINIT before the first invocation of VVECTR, and call it again any time you modify the contents of the input data arrays. periodt. πŸ’…

You may precede a VVINIT call with any number of calls to the Vectors parameter setting routines (VVSETC, VVSETI, or VVSETR). After the VVINIT call, you may still change certain parameters before calling VVECTR. (Consult the vectors_params man page for further information on this point β€” iykyk.)

Set up the two vector component arrays prior to calling VVINIT. To permit multiple purpose use of the array space, the VVINIT 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, LV, and LP contain the actual size of the first dimensions of arrays U, V, and P 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 all the 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 array specified by the WRK argument and its associated size specifier, LW, are used only when the parameter VMD (Vector Minimum Distance) is given a value greater than 0.0. In this case, Vectors uses the array to keep track of the location of each vector in NDC space so that the distances between vectors can be compared. Based on these comparisons, Vectors eliminates some vectors such that the remaining vectors are separated by at least the specified distance. If VMD is less than or equal to 0.0, you may assign an arbitrary dummy value to WRK, but you should set LW to the integer value 0.

🌈 C-BINDING USAGE 🌈

C-Binding usage is the same as FORTRAN usage discussed above if the references to "first dimension" and "second dimension" are exchanged. πŸ¦‹


⭐ EXAMPLES ⭐

Use the ncargex command to see the following relevant examples: bnchmk, fcover, ffex00, ffex01, ffex02, ffex05, stex02, stex03, vvex01, vvex02. go look, bestie, they're iconic. πŸ‘‘


πŸŽ€ ACCESS πŸŽ€

To use VVINIT or c_vvinit, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. (order matters, no cap. 🫢)


πŸ’Œ MESSAGES πŸ’Œ

See the vectors man page for a description of all Vectors error messages and/or informational messages.


πŸ‘€ SEE ALSO πŸ‘€

  • Online: vectors, vectors_params, vvectr, vvgetc, vvgeti, vvgetr, vvrset, vvsetc, vvseti, vvsetr, vvudmv, vvumxy, 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.


k that's the whole thing, you ate it. πŸ“ no crumbs left.

and yeah, this diva's from the UNIX crew, dated April 1993 β€” VVINIT(3NCARG) forever and ever, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from