c_natgridd(3NCARG)
π c_natgridd β bestie edition π
okay so this is the NCAR GRAPHICS page for c_natgridd(3NCARG), and honestly? she's that girl. it's the double precision C entry point for natural neighbor gridding. let's get into it π¦
β¨ NAME β¨
c_natgrids β primary double precision C entry for natural neighbor gridding
(yes bestie, the NAME section really does say c_natgrids. that's just what it says. i don't make the rules π
)
π§ FUNCTION PROTOTYPE π§
double *c_natgridd(int, double [], double [], double [],
int, int, double [], double [], int *);
πΈ SYNOPSIS πΈ
double *c_natgridd (npnts, x, y, z, numxout, numyout, xi, yi, ier);
π DESCRIPTION π
here's the whole cast, no skips, no cuts β¨
npntsβ the number of input data points. and it has to benpnts > 3. like, more than three. that's the vibe check and it is not optional π€xβ an array holding the x coordinates of the input data points.yβ an array holding the y coordinates of the input data points.zβ an array holding the functional values of the input data points. so basicallyz[m]is the value of the input function at coordinate(x[m],y[m]), for0 <= m < npnts. cute right?numxoutβ the number of x values in the output grid.numyoutβ the number of y values in the output grid.xiβ an array of dimensionnumxoutcontaining the x coordinates of the output data grid. the values inximust be increasing, but they do not need to be equally spaced. flexible queen πyiβ an array of dimensionnumyoutcontaining the y coordinates of the output data grid. the values inyimust be increasing, but they do not need to be equally spaced either. same energy, different axis β¨ierβ an error value. if*ieris0, then no errors were detected, we're thriving π. if*ieris non-zero, then go read the man page fornatgrid_errorsfor the details. that's where the lore lives.
π₯ USAGE π₯
okay so c_natgridd returns a pointer to a linear array of data that is the interpolated grid, stored in row-major order. let me set the scene:
if out is declared as
double *out;
and we set:
out = c_natgridd(numin, x, y, z, numxout, numyout, xo, yo, &ier);
then out[i*numyout+j] is the interpolated function value at coordinate point (xo[i],yo[j]) for 0 <= i < numxout and 0 <= j < numyout. π«Ά
and here's the part where she's lowkey generous: the space for out is allocated internal to c_natgrids, and it is numxout*numyout double values in size. no cap. you don't gotta malloc that yourself. iconic behavior honestly π
π ACCESS π
to use c_natgridd, load the NCAR Graphics library ngmath. that's it. that's the whole step. periodt β¨
π SEE ALSO π
go read these too, they're all in the same friend group:
natgridnatgrid_paramsc_nnsetic_nngetic_nnsetrdc_nngetrdc_nnsetcc_nngetc
also! complete documentation for Natgrid is available at URL
http://ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/nnhome.html
π COPYRIGHT π
Copyright (C) 2000
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
bestie. please. the use of this software is governed by a License Agreement. read it. i'm begging π
and that's the whole page, start to finish, nothing skipped, every flag and every word intact π¦π
this has been c_natgridd(3NCARG) from the UNIX manual pages, March 1997-1998 vintage β an absolute era, no notes, ate and left no crumbs πβ¨ bye bestie π
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms