c_dsgrid3d(3NCARG)
๐ c_dsgrid3d โ bestie, it's the 3D gridding girlie ๐
okay so this is a page from the NCAR GRAPHICS manual, and today we're talking about c_dsgrid3d(3NCARG) โ the primary double precision C entry point for 3D gridding. yes she does the whole "scattered points in, pretty grid out" thing. no cap. โจ
๐ธ NAME ๐ธ
c_dsgrid3d โ the primary double precision C entry for 3D gridding. that's her. that's the whole job description. ๐ซถ
๐ FUNCTION PROTOTYPE ๐
double *c_dsgrid3d(int, double [], double [], double [], double [],
int, int, int, double [], double [], double [], int *);
โจ SYNOPSIS โจ
double *c_dsgrid3d(int n, double x[], double y[], double z[],
double u[], int nx, int ny, int nz, double xo[],
double yo[], double zo[], int *ier);
๐ DESCRIPTION ๐
okay bestie, here's the tea on every single argument. nothing skipped, we're being thorough because we love being thorough ๐
nโ how many input data points you're feeding her. the count. the headcount. ๐xโ an array holding the X coordinates of your input data points.yโ an array holding the Y coordinates of your input data points.zโ an array holding the Z coordinates of your input data points.uโ an array of sizenwith the functional values of the input data points. so like,z[m]is the value of the input function at coordinate(x[m],y[m],z[m]), for0 <= m < n. (yes, that's exactly how the original says it, i'm not touching it, it's iconic ๐ญ)nxโ the number of X values in the output grid.nyโ the number of Y values in the output grid.nzโ the number of Z values in the output grid.xoโ an array of sizenxwith the X coordinates of the output data grid. the values inxomust be increasing, but lowkey they don't have to be equally spaced. ๐yoโ an array of sizenywith the Y coordinates of the output data grid. values inyomust be increasing, equally spaced not required. ๐ซzoโ an array of sizenzwith the Z coordinates of the output data grid. values inzomust be increasing, equally spaced not required either. ๐ierโ the error return value. if*iercomes back as0, then no errors were detected, we're slaying, nothing to see here โจ. if*ieris non-zero, then run don't walk to the man page fordsgrid_errors. ๐
๐ USAGE ๐
c_dsgrid3d returns a pointer to a linear array of data that is the interpolated grid, stored in row-major order. that's the vibe. ๐ซ
so if out is declared as
double *out;
and we set:
out = *c_dsgrid3d(n, x, y, z, u, nx, ny, nz, xo, yo, zo, ier);
then out[nz*ny*i + nz*j + k] is the interpolated function value at coordinate point (xo[i],yo[j],zo[k]) for 0 <= i < nx, 0 <= j < ny, and 0 <= k < nz. ๐งฎ
and the space for out? it's allocated internal to c_dsgrid3d and it's nx*ny*nz doubles in size. she provides. periodt. ๐
๐ฆ ACCESS ๐ฆ
to use c_dsgrid3d, load the NCAR Graphics library ngmath. that's the whole access situation, bestie. ๐
๐ SEE ALSO ๐
go read these too, they're all part of the family:
dsgriddsgrid_paramsc_dssetic_dsgetic_dssetrdc_dsgetrdc_dssetcc_dsgetc
and fr fr, complete documentation for Dsgrid is available at URL:
http://ngwww.ucar.edu/ngdoc/ng/ngmath/dsgrid/dshome.html
๐ COPYRIGHT ๐
Copyright (C) 2000 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
โ ๏ธ heads up bestie: that license agreement line is not decoration, it's real. use of this software is governed by it. respect the paperwork. ๐
and that's the whole page!! ๐ this one's from the UNIX manual, dated September 1997-1998, and it lives under the name c_dsgrid3d(3NCARG). go forth and grid in 3D, 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