VVINIT(3NCARG)
π 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 β ifPLRis non-zero, it's treated as holding the vector magnitudes instead. π«ΆLUβ (INTEGER, input): the actual value of the first dimension of arrayU.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: ifPLRis non-zero, it's treated as holding the vector angles. πLVβ (INTEGER, input): actual value of the first dimension of arrayV.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 theUandVarrays. Only required ifCTVhas 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 arrayP.Mβ (INTEGER, input): number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays,U,V, andP(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, andP(if used).WRKβ (REAL, array dimensioned n: n >= LW, input/output): work array, required only if the parameterVMDis set to a value greater than 0.0. If it is required, it must be dimensioned greater or equal to2 * M * N. Otherwise you may set it to a dummy value. π§LWβ (INTEGER, input): assumed size of the arrayWRK. If the parameterVMDis set to a value greater than 0.0, it must be set to a value less than or equal to the dimension of theWRKarray, but greater or equal to2 * M * N. Otherwise, this argument should be assigned the integer value0.
π« 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 ofuin the calling program.lvβ the second dimension ofvin the calling program.lpβ the second dimension ofpin 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, andp(if used).nβ number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays,u,v, andp(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 π
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
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms