STUMTA(3NCARG)
๐ NAME ๐
okay bestie, so STUMTA is a user-modifiable routine from NCAR Graphics (yes, the 3NCARG girlies โจ). You hand it the coordinates of a point on a streamline in data, user, AND NDC space, plus the interpolated, normalized components of the vector at that point relative to data coordinate space โ and it finds the directional angle of the streamline relative to NDC space at that point. it's giving geometry, it's giving mapping internals ๐
โจ SYNOPSIS โจ
CALL STUMTA (XDA,YDA,XUS,YUS,XND,YND,DU,DV,TA,IST)
๐ DESCRIPTION ๐
here's the full cast of characters, no skips, no skips, we love every single one ๐ซถ
XDA(REAL, input) โ the X coordinate of a point on the streamline, in the data coordinate system. ๐YDA(REAL, input) โ the Y coordinate of a point on the streamline, in the data coordinate system. ๐XUS(REAL, input) โ the X coordinate of the point, in the user coordinate system. ๐ฑYUS(REAL, input) โ the Y coordinate of the point, in the user coordinate system. ๐ฑXND(REAL, input) โ the X coordinate of the point, in NDC space. ๐ฎYND(REAL, input) โ the Y coordinate of the point, in NDC space. ๐ฎDU(REAL, input) โ the interpolated value of the normalized component of the vector at the point, with direction parallel to the X axis of the data coordinate system. โญDV(REAL, input) โ the interpolated value of the normalized component of the vector at the point, with direction parallel to the Y axis of the data coordinate system. โญTA(REAL, output) โ THE MOMENT. ๐ the directional angle of the streamline at the point, relative to NDC space. this is the whole point of the function, she's the main character.IST(REAL, output) โ status of the mapping operation, and listen, the values matter:0โ success ๐- negative values โ the mapping failed ๐ญ
- positive values โ reserved, so do NOT use them if you're implementing a mapping routine. hands off, bestie, those aren't yours.
๐ ๏ธ USAGE ๐ ๏ธ
so here's the tea โ โ STUMTA is a user-modifiable routine, provided to support custom mappings of the data coordinate space. You do not call it directly. ever. nope. not you. ๐
Instead: whenever the parameter MAP specifies a mapping that Streamlines doesn't handle internally โ i.e. when MAP is set to a value other than 0, 1, or 2 โ Streamlines calls STUMTA once for each incremental step in the creation of a streamline. so it's like, every little baby step along the curve, it's checking in. obsessed. ๐ฆ
The default version of STUMTA is lowkey simple: it just returns the angle implied by the incremental vector components passed to it โ that is, it returns ATAN2(DV,DU). slay, queen, no notes. โจ
Now, to implement a custom mapping, you have to:
- pick a unique mapping code โ a positive integer greater than
2๐ข - modify each of the three routines โ
STUMXY,STUIXY, andSTUMTAโ so they recognize and respond consistently to the chosen code. all three. together. friendship bracelet energy. ๐ซถ
In the standard distribution of NCAR Graphics, these three routines live together in a single file, stumxy.f ๐
STUMXYmaps a point from data to user coordinate space.STUIXYinversely maps a point from user to data coordinate space.STUMTAโ which is likely to be the most difficult to implement ๐ฎโ๐จ โ finds the tangent angle of the streamline at a point in NDC space.
๐ซง the common block situation ๐ซง
STUMTA has access to a common block called STMAP, which contains a bunch of variables used to record the current transformation state. ๐ฆ
To accommodate a variety of mapping implementations, STMAP provides more information than is normally required. And bestie, listen closely:
Consider the values stored in STMAP as strictly read-only. do not touch. look with your eyes only. ๐๐ซ
One essential member of this common block is IMAP, which contains the value currently assigned to the MAP parameter. โญ
๐ implementing a non-linear mapping ๐
ngl, when you're implementing a non-linear mapping, an iterative differential technique will most likely be required. ๐ฎโ๐จ
Go look at the routine STMPTA in stmpxy.f, which handles the pre-defined mappings, for examples of the method. ๐
Both of these use such a technique:
- the default transformation (
MAPset to0) โ this one does it in order to account for possible log scaling of the user coordinate axes ๐ - the Ezmap projection (
MAPset to1) ๐บ๏ธ
Basically the idea is this: the vector components must be proportionally reduced in size enough that an effectively "instantaneous" angle can be calculated. but โ and this is the important but โ they must not become so small that the calculation is adversely affected by the floating point precision available for the machine. tiny little numbers = chaos. ๐
Additionally, checks must be put in place to prevent the increment from stepping off the edge of the coordinate system space. ๐ง
And the pre-defined mappings? they step in the opposite direction to find the angle whenever an increment in the original direction would fall off the edge. iconic problem-solving honestly ๐
๐ ACCESS ๐
To use STUMTA, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c โ preferably in that order. order matters, bestie, we're not animals ๐
๐ SEE ALSO ๐
Online: stgetc, stgeti, stgetr, stinit, stream, streamlines, streamlines_params, strset, stsetc, stseti, stsetr, stuixy, stumsl, stumxy, 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.
and that's the whole page, bestie!! ๐ this one's from the NCAR GRAPHICS manual set โ the UNIX flavor โ dated April 1993 (a vintage queen ๐), and the page name is STUMTA(3NCARG) if you ever need to pull it back up. go forth and compute those tangent angles, you've got this fr fr ๐โจ๐ฆ
๐ฆ 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