SHGETNP(3NCARG)
β¨ SHGETNP β¨
okay bestie, gather round, because this is SHGETNP from the NCAR Graphics crew (that's the manual section 3NCARG, iykyk) and it's literally about finding your nearest neighbors in 3-space π¦
π NAME π
SHGETNP β find the nearest points to a specified point in 3-space. no cap, that's the whole job. π
πΈ SYNOPSIS πΈ
CALL SHGETNP (PX, PY, PZ, N, X, Y, Z, IFLAG, IWK, RWK, NP, IER)
β¨ DESCRIPTION β¨
okay so here's the whole cast of characters, one by one, no skips:
PXβ (real, input) the X coordinate value for a point P whose nearest neighbor is to be found. πPYβ (real, input) the Y coordinate value for a point P whose nearest neighbor is to be found. πPZβ (real, input) the Z coordinate value for a point P whose nearest neighbor is to be found. πXβ (real, input) an array containing the X coordinates of the input data points.Yβ (real, input) an array containing the Y coordinates of the input data points.Zβ (real, input) an array containing the Z coordinates of the input data points.IFLAGβ (integer, input) a flag that equals0if this is the first call to this subroutine for the given dataset and equals1otherwise. first-call energy vs. we-been-here energy, basically. β¨IRKβ (integer, input) an integer workspace dimensioned for at least2*N. πRWKβ (real, input) a real workspace dimensioned for at least11*N+6. do not skimp on the space, she needs room to breathe π«ΆNPβ (integer, output) an index such that(X(NP),Y(NP),Z(NP))is the nearest input data point to P.NP = 0ifIER .NE. 0. On successive calls to this subroutine after the first (that is whenIFLAG=1) you can find the Mth closest point to(PX,PY,PZ)with the Mth call.IWKandRWKshould not be modified between calls toSHGETNPif you are wanting to find successive nearest neighbors. π¨ like fr fr, hands off the workspaces.IERβ (integer, output) an error return value. IfIERis returned as0, then no errors were detected. IfIERis non-zero, then refer to the man page forshgrid_errorsfor details. π
π USAGE π
SHGETNP is called to find the nearest point to a specified point in 3-space. Successive calls to SHGETNP will determine the point nearest the specified point exclusive of the points found in previous calls, i.e. successive calls can be used to find the N nearest points for any N between one and the maximum number of points in the input dataset. π
translation: call her once, get your closest bestie. call her again, and she's like "okay not that one again" and hands you the next closest. keep going and you've got a whole ranked friend group. β
π ACCESS π
To use SHGETNP, load the NCAR Graphics library ngmath.
π¦ SEE ALSO π¦
shgridshsetishgetishgrid_params
Complete documentation for Shgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/shgrid/shhome.html
π COPYRIGHT π
Copyright (C) 1997-2000 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
okay and that's the whole page bestie, we ate and left zero crumbs π this lil legend comes from the UNIX manual, dated September 1999, and it's page SHGETNP(3NCARG) β periodt. πβ¨πΈ
π¦ 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