CSS2CD(3NCARG)
π« CSS2CD β it's giving lat/lon to Cartesian, bestie π«
okay so this is a page from the NCAR GRAPHICS manual, and it's literally all about a Fortran subroutine called CSS2CD. she's a coordinate-converting queen and she's about to make your life so much easier. π
β¨ NAME β¨
CSS2CD β convert from lat/lon coordinates to Cartesian coordinates. that's it, that's the job. π
π SYNOPSIS π
CALL CSS2CD (N, RLAT, RLON, X, Y, Z)
like yes, six arguments, but don't panic, we're going through every single one. π«Ά
π DESCRIPTION π
here's the full cast of characters, no cap:
Nβ (integer, input) the number of input lat/lon coordinates. she's the headcount, the vibe check, the "how many are we doing today" girlie.RLATβ (double precision, input) an array holding the latitudes of your input coordinates.RLONβ (double precision, input) an array holding the longitudes of your input coordinates.Xβ (double precision, output) an array holding the X component of the Cartesian coordinates of the output data. and listen:(X(I),Y(I),Z(I))is the Cartesian coordinate that corresponds to the lat/lon coordinate(RLAT(I),RLON(I))forI=1toN. every single I, bestie.Yβ (double precision, output) an array holding the Y component of the Cartesian coordinates of the output data. same deal:(X(I),Y(I),Z(I))is the Cartesian coordinate corresponding to(RLAT(I),RLON(I))forI=1toN.Zβ (double precision, output) an array holding the Z component of the Cartesian coordinates of the output data. and yeah, you guessed it,(X(I),Y(I),Z(I))is the Cartesian coordinate corresponding to(RLAT(I),RLON(I))forI=1toN. iconic trio behavior honestly. π
π¦ USAGE π¦
so you call CSS2CD when you wanna find the equivalent Cartesian coordinates on a unit sphere for whatever latitude and longitude coordinates you've got. π§
the coordinate of 0. latitude and 0. longitude gets converted to the Cartesian coordinate (1.,0.,0.) β that's the anchor point, the main character of this whole mapping, remember her.
latitudes and longitudes are assumed to be in degrees. periodt. π
and fun fact: CSS2CD is the double precision verson (typo and all, we love her π) of CSS2C. so if you need single precision energy, she's over there.
π₯ ACCESS π₯
to use CSS2CD, load the NCAR Graphics library ngmath. that's the one. don't forget her. π
πΈ SEE ALSO πΈ
go read these too, they're all in the group chat:
css_overviewcssgridcsc2sdcss2c
also!! complete documentation for Cssgrid lives at this URL, bookmark it bestie:
http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/csshome.html
π COPYRIGHT π
Copyright (C) 2000 University Corporation for Atmospheric Research
the use of this Software is governed by a License Agreement. so like, read it, fr fr. π
okay that's the whole page, you're officially a CSS2CD expert, go convert some coordinates and slay β¨
signing off from the UNIX manual, MAY 2000 edition, source and version vibes intact β CSS2CD(3NCARG), NCAR GRAPHICS. mwah. π
π¦ 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