VELVCT(3NCARG)
π VELVCT π
okay so bestie, welcome to the NCAR GRAPHICS corner of the manual, this one is VELVCT(3NCARG) and it is literally the girl who plots vector fields for a living. she's been around a while. she's got lore. let's get into it π¦
β¨ NAME β¨
VELVCT β plots a vector field, given two 2-dimensional vector component arrays, U and V. You may control certain characteristics of the plot by adjusting the values given to the input arguments. Other less frequently changed characteristics may be affected by modifying VELDAT, the BLOCK DATA routine that initializes members of the common blocks VEC1 and VEC2. In addition, depending on the value given to the compatibility parameter, CPM, you may set other options by calling VVSETC, VVSETI, or VVSETR to modify internal parameters. π
β¨ SYNOPSIS β¨
CALL VELVCT (U,LU,V,LV,M,N,FLO,HI,NSET,LENGTH,ISPV,SPV)
π¨ STATUS π¨
ngl, VELVCT is obsolete, and is supported only to provide compatibility with old NCAR Graphics codes. However, the compatibility mode parameter, CPM, offers a number of options to help ease the the transition to the new version of the utility. When writing new code you are encouraged not to use this entry point, since it provides less capability than the standard Vectors interface, and may eventually be phased out. π
she's giving legacy code. she's iconic but she's on her way out, fr fr. new code bestie, don't do it.
β¨ C-BINDING SYNOPSIS β¨
#include <ncarg/ncargC.h>
void c_velvct(float *u, int lu, float *v, int lv, int m,
int n, float flo, float hi, int nset,
int length, int ispv, float *spv)
πΈ DESCRIPTION πΈ
Uβ (REAL2-dimensional array, dimensionedLU x n:n >= N, input): By default, assumed to contain the first dimensional Cartesian components of the vector field. However, ifPLRis non-zero, it is treated as containing the vector magnitudes. π«ΆLUβ (INTEGER, input): Actual value of the first dimension of arrayU.Vβ (REAL2-dimensional array, dimensionedLV x n:n >= N, input): By default, assumed to contain the second dimensional Cartesian components of the vector field. However, ifPLRis non-zero, it is treated as containing the vector angles.LVβ (INTEGER, input): Actual value of the first dimension of arrayV.Mβ (INTEGER, input): Number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays,UandV.Nβ (INTEGER, input): Number of contiguous elements along the second dimensional axis containing data to be processed in each of the arrays,UandV.FLOβ (REAL, input): Minimum vector magnitude allowed to be displayed in the plot.HIβ (REAL, input): Maximum vector magnitude allowed to be displayed in the plot. If set to0.0there is no upper limit imposed.NSETβ (INTEGER, input): Flag that controls how and when theSETcall is invoked. IfNSETis0,VELVCTmakes aSETcall to establish a standard viewport and window boundaries coincident with the array coordinate boundaries.PERIMis called to draw a border. IfNSETis greater than zero,VELVCTdoes not callSETorPERIM. IfNSETis less than zero,VELVCTcallsSETto establish window boundaries coincident with the array grid coordinate boundaries but does not modify the viewport or callPERIM. Unlike theVVINIT/VVECTRinterface, whenVELVCTdoes aSETcall, it always restores the original coordinate system state before returning. πLENGTHβ (INTEGER, input): The length in plotter address units (PAUs) used to render the vector with the greatest magnitude that is eligible for plotting. A vector is eligible for plotting if it is less than or equal to the value ofHI, unlessHIis0.0in which case all vectors are eligible. IfLENGTHis set to0.0, the length selected is one half the diagonal length of a grid cell assuming a linear mapping of the grid coordinate space into the viewport.ISPVβ (INTEGER, input): Flag to control the special value feature.0means that the feature is not in use.1means that if the value ofU(I,J)=SPV(1)the vector will not be plotted.2means that if the value ofV(I,J)=SPV(2)the vector will not be plotted.3means that if eitherU(I,J)=SPV(1)orV(I,J)=SPV(2)then the vector will not be plotted.4means that ifU(I,J)=SPV(1)andV(I,J)=SPV(2), the vector will not be plotted. πSPVβ (REALarray, dimensioned2, input): An array of length2which gives the value in theUarray and the value in theVarray which denote special values. This argument is ignored ifISPV=0. The default values are1.0E12.
π C-BINDING DESCRIPTION π
The C-binding argument descriptions are the same as the FORTRAN argument descriptions with the following exceptions:
luβ The second dimension ofuin the calling program.lvβ The second dimension ofvin the calling program.mβ Number of contiguous elements along the second dimensional axis containing data to be processed in each of the arrays,uandv.nβ Number of contiguous elements along the first dimensional axis containing data to be processed in each of the arrays,uandv.
(yes bestie, the dimensions flip between FORTRAN and C, that's just how it is, don't fight it π§)
π₯ USAGE π₯
Beginning with version 3.2 of NCAR Graphics, the VELVCT entry point has been recoded as a front end to the VVINIT/VVECTR interface to Vectors. The compatibility mode parameter, CPM, controls the degree to which a call to the Version 3.2 VELVCT emulates the older call. Appropriate settings of CPM can separately address each of the following three questions regarding the level of emulation:
- Should
FX,FY,MXF, andMYFrather than the Version 3.2 mapping routines perform the mapping to user coordinates? - Should the input arguments
FLO,HI,NSET,LENGTH,ISPV,SPVoverride the current values of the corresponding Vectors' internal parameters? - Should the values contained in the common blocks
VEC1andVEC2override the current values of corresponding Vectors' internal parameters?
Given the default value of CPM, all these questions are answered in the affirmative, and a call to VELVCT gives a reasonably faithful emulation of the older version's behavior. β¨
However, even in this case, it is possible to use the parameter setting routines to control the behavior of features that have no counterpart in the older version of VELVCT, as long as the feature is accessible without calling the new interface. For instance, you could control the vector linewidth by setting the LWD parameter, although you could not draw vectors masked to an area map because doing so requires direct invocation of VVECTR. π
The following two tables show how the VELVCT input arguments and VEC1/VEC2 common block members map into internal parameters currently supported by Vectors. (Consult the vectors_params man page for descriptions of the internal parameters.)
π Input Argument β Internal Parameter
FLOβVLC(VLCis set to-FLOifFLOis positive,0.0otherwise)HIβVHC(VHCis set to-HIifHIis positive,0.0otherwise)NSETβSET(NSET = 0is approximately equivalent toSET = 1)LENGTHβVRL(LENGTHin Plotter Address Units is converted toVRLas a fraction of the viewport width)ISPVβSVFSPV(1)βUSVSPV(2)βVSV
π Common Block Member β Internal Parameter
EXTβVPSICTRFGβVPOILABβLBLIOFFDβDPFRMNβAMN(RMNin metacode coordinates is converted toAMNas a fraction of the viewport width)RMXβAMX(RMXin metacode coordinates is converted toAMXas a fraction of the viewport width)SIZEβLBS(Character size in metacode coordinates is converted toLBSas a fraction of viewport width)INCXβXININCYβYIN-βMNT(When common blocksVEC1andVEC2override parameter settings,MNTis always set to" ", indicating that the minimum vector text block is not to be displayed.)IOFFMβMXT(IfIOFFMis non-zero,MXTis set to" ", indicating that the maximum text block is not to be displayed. OtherwiseMXTis set to the string"MAXIMUM VECTOR")IOFFMβMXX(IfIOFFMis0,MXXis set to a computed value that, as a fraction of the viewport width, specifies a point0.05in NDC left of the right hand edge of the plotter frame.)IOFFMβMXY(IfIOFFMis0,MXYis set to a computed value that, as a fraction of the viewport height, specifies a point0.005in NDC up from the bottom edge of the plotter frame.)IOFFMβMXP(IfIOFFMis0,MXPis set to-2, indicating that the text block should be lower-right justified.
Note that the emulation of the maximum vector text block differs from the older implementation in that it now uses high-quality text. π
π¦ EXAMPLES π¦
Use the ncargex command to see the following relevant example: stex02, tvelvc.
β ACCESS β
To use VELVCT or c_velvct, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
π SEE ALSO π
Online: vectors, vectors_params, fx, vvectr, vvgetc, vvgeti, vvgetr, vvinit, vvrset, vvsetc, vvseti, vvsetr, vvudmv, vvumxy, ncarg_cbind.
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
and that's the whole page bestie, no cap, every last flag accounted for πΈ this was the April 1993 era of the UNIX manual, from the NCAR Graphics fam β go forth and plot those vector fields, you absolute main character πβ¨π
π¦ 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