Cssgrid(3NCARG)

πŸ’– Cssgrid β€” the 3NCARG girlies' guide πŸ’–

okay so bestie, welcome to Cssgrid, from the NCAR GRAPHICS manual, section 3NCARG. this is the ngmath library's tension spline situation and honestly? it's giving geometry slay. let's get into it 🫢


✨ NAME ✨

cssgrid β€” fit a tension spline interpolation to a function. that's it, that's the whole job, and she does it beautifully πŸ’…


🌸 DESCRIPTION 🌸

so Cssgrid is a software package living inside the ngmath library, and what it does is implement a tension spline interpolation algorithm to fit a function to input data that's randomly located on the surface of a sphere. yes bestie, a SPHERE. we're not doing flat little grids here, we're doing the whole globe vibe 🌍✨

there are user-settable parameters that control various aspects of the algorithm β€” and the most important one is the tension factor, which controls the level of tautness of the spline fit. and the way it works is:

  • a tension factor of 0. gives you pure cubic spline interpolation πŸŽ€
  • a large tension factor gives you near linear interpolation πŸ“

and by default? the tension factor is automatically computed to optimize certain fitting criteria. she does the math so you don't have to, periodt ✨

the output is a set of values at coordinates on a user-specified lat/lon grid (which, fun fact, can be a single point β€” yes, one lone point is a valid grid, iconic behavior honestly πŸ’€).

procedures also exist for finding a Delaunay triangulation and Voronoi polygons. so if you needed those, you're covered bestie πŸ¦‹

functionally equivalent Fortran, C, and NCL interfaces are all provided. and the Fortran and C codes come in both single and double precision. options, options, options πŸ‘‘

Cssgrid is based on the work of Robert Renka and his packages STRIPACK and SSRFPACK. shoutout to the legend, no cap πŸ™Œ


🌈 SYNOPSIS 🌈

πŸ’œ Fortran

------------------------------
CSSGRID  - interpolation on a sphere
CSSTRI   - calculates Delaunay triangulation
CSVORO   - calculates Voronoi polygons
CSS2C    - converts from lat/lon to Cartesian coordinates
CSC2S    - converts from Cartesian to lat/lon coordinates
CSSETI   - set values for integer-valued parameters
CSGETI   - retrieve values for integer-valued parameters
CSSETR   - set values for real valued parameters
CSGETR   - retrieve values for real valued parameters
CSSETD   - set values for double precision-valued parameters
CSGETD   - retrieve values for double precision-valued parameters
CSSGRIDD - interpolation on a sphere (double precision entry)
CSSTRID  - calculates Delaunay triangulation (double precision entry)
CSVOROD  - calculates Voronoi polygons (double precision entry)
CSS2CD   - converts from lat/lon to Cartesian coordinates (double precision entry)
CSC2SD   - converts from Cartesian to lat/lon coordinates (double precision entry)
------------------------------

πŸ’™ C

c_cssgrid  - interpolation on a sphere
c_csstri   - calculates Delaunay triangulation
c_csvoro   - calculates Voronoi polygons
c_css2c    - converts from lat/lon to Cartesian coordinates
c_csc2s    - converts from Cartesian to lat/lon coordinates
c_csseti   - set values for integer-valued parameters
c_csgeti   - retrieve values for integer-valued parameters
c_cssetr   - set values for real valued parameters
c_csgetr   - retrieve values for real valued parameters
c_cssetd   - set values for double precision-valued parameters
c_csgetd   - retrieve values for double precision-valued parameters
c_cssgridd - interpolation on a sphere (double precision entry)
c_csstrid  - calculates Delaunay triangulation (double precision entry)
c_csvorod  - calculates Voronoi polygons (double precision entry)
c_css2cd   - converts from lat/lon to Cartesian coordinates (double precision entry)
c_csc2sd   - converts from Cartesian to lat/lon coordinates (double precision entry)
note the pattern bestie: lowercase c_ prefix = the C interface, and a trailing d = the double precision entry πŸ’…

πŸ”‘ ACCESS πŸ”‘

to use Cssgrid entries, load the NCAR Graphics library ngmath. that's the whole access sitch 🫢


πŸ‘€ SEE ALSO πŸ‘€

  • cssgrid_params
  • cssgrid_errors

and if you want the complete documentation for Cssgrid, it lives at:

http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html

go read it, iykyk πŸ“šβœ¨


Copyright (C) 2000 University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.

okay so like, legally: it's theirs, and there's a License Agreement governing the use of this Software. read it, respect it, don't be messy πŸ™ˆ

and that's the whole page bestie!! this little icon came to you from the UNIX manual, May 2000 vintage, filed under Cssgrid(3NCARG) β€” old money date, new money energy πŸ’–βœ¨ slay, and happy interpolating πŸ¦‹πŸŒΈ