c_dsgrid2d(3NCARG)
π c_dsgrid2d β the NCAR GRAPHICS main character π
okay so bestie, welcome to the 3NCARG manual section, where we meet c_dsgrid2d β the primary double precision C entry for 2D gridding. she's the one you call when you want your scattered little data points to become a whole entire grid. periodt. β¨
β¨ NAME β¨
c_dsgrid2d β primary double precision C entry for 2D gridding π¦
πΈ FUNCTION PROTOTYPE πΈ
double *c_dsgrid2d(int, double [], double [], double [],
int, int, double [], double [], int *);
π SYNOPSIS π
double *c_dsgrid2d(int n, double x[], double y[], double z[],
int nx, int ny, double xo[], double yo[], int *ier)
π DESCRIPTION π
okay so here's the tea on every single argument, no skips, we're doing all of them π«Ά
nβ the number of input data points. that's it, that's the count. π’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 of sizenwith the functional values of the input data points. like,z[m]is the value of the input function at coordinate(x[m],y[m]), for0 <= m < n. that's the vibe. β¨nxβ the number of X values in the output grid. πnyβ the number of Y values in the output grid. πxoβ an array of sizenxwith the X coordinates of the output data grid. the values inxomust be increasing, but they don't have to be equally spaced β she's flexible like that. πyoβ an array of sizenywith the Y coordinates of the output data grid. the values inyomust be increasing, but again, not required to be equally spaced. πierβ the error return value. if*iercomes back as0, no errors were detected, we're slaying. if*ieris non-zero, go read the man page fordsgrid_errorsβ it will explain everything, iykyk. π¨
π USAGE π
so c_dsgrid2d returns a pointer to a linear array of data β that's your interpolated grid, stored in row-major order. if out is declared as
double *out;
and we set:
out = c_dsgrid2d(n, x, y, z, nx, ny, xo, yo, ier);
then out[i*ny+j] is the interpolated function value at coordinate point (xo[i],yo[j]) for 0 <= i < nx and 0 <= j < ny. no cap. π₯
the space for out is allocated internally to c_dsgrid2d and is nx*ny doubles in size. she handles it, bestie, you don't have to. π
π ACCESS π
to use c_dsgrid2d, load the NCAR Graphics library ngmath. that's the whole assignment. π
π¦ SEE ALSO π¦
dsgriddsgrid_paramsc_dssetic_dsgetic_dssetrdc_dsgetrdc_dssetcc_dsgetc
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.
and that's the whole page, bestie!! this little icon dropped way back in September 1997-1998 on UNIX, and it lives forever in the c_dsgrid2d(3NCARG) era. go forth and grid, you absolute legend. π
β¨ππ«Ά
π¦ 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