CSS2CD(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’« 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)) for I=1 to N. 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)) for I=1 to N.
  • 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)) for I=1 to N. 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_overview
  • cssgrid
  • csc2sd
  • css2c

also!! complete documentation for Cssgrid lives at this URL, bookmark it bestie:

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

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