c_natgrids(3NCARG)
π NAME π
c_natgrids β the main character C entry point for natural neighbor gridding β¨
So basically, bestie, this is the NCAR Graphics function you call when you wanna grid some scattered data points. No cap.
π§ FUNCTION PROTOTYPE π§
float *c_natgrids(int, float [], float [], float [],
int, int, float [], float [], int *);
π SYNOPSIS π
float *c_natgrids (npnts, x, y, z, numxout, numyout, xi, yi, ier);
πΈ DESCRIPTION πΈ
Okay so here's the tea on every single argument, and yes we're going through all of them, no skipping:
npntsβ the number of input data points you're feeding in. Heads up though:npnts > 3. You need more than three, that's the rule, it's giving non-negotiable. πxβ an array holding all the x coordinates of your input data points.yβ an array holding all the y coordinates of your input data points.zβ an array holding the functional values of your input data points. Translation:z[m]is the value of the input function at coordinate(x[m],y[m]), for0 <= m < npnts. She's the vibe of the data, fr fr.numxoutβ how many x values live in your output grid.numyoutβ how many y values live in your 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. Lowkey flexible, highkey ordered. β¨yiβ an array of dimensionnumyoutcontaining the y coordinates of the output data grid. The values inyimust be increasing, but need not be equally spaced. Same energy asxi, just the y-flavored twin. π¦ierβ the error value, aka the vibe check. If*iercomes back as0, then no errors were detected, slay. If*ieris non-zero, go read the man page fornatgrid_errorsfor the details. π
π USAGE π
c_natgrids returns a pointer to a linear array of data, and that array is your interpolated grid, stored in row-major order. Periodt.
So say you declare out like this:
float *out;
and then you set:
out = c_natgrids(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 the space for out? That gets allocated internally to c_natgrids, and it's numxout*numyout floats in size. She handles her own memory, iconic behavior honestly. π
π₯ ACCESS π₯
To use c_natgrids, load the NCAR Graphics library ngmath. That's the whole assignment, bestie. π
β SEE ALSO β
Go read these too, they're all in the same friend group:
natgridnatgrid_paramsc_nnsetic_nngetic_nnsetrc_nngetrc_nnsetcc_nngetc
Also! Complete documentation for Natgrid is available at this URL, go tap in:
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.
Okay so legal girlies, read the license agreement, it's literally the rules of the house. π
And that's a wrap on the c_natgrids(3NCARG) page from the NCAR GRAPHICS manual, UNIX flavor, dated March 1997-1998. Thanks for coming to my TED talk, 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