cartesian2sphere: Convert Cartesian coordinates to spherical coordinates

View source: R/cartesian2sphere.R

cartesian2sphereR Documentation

Convert Cartesian coordinates to spherical coordinates

Description

Convert Cartesian coordinates to spherical coordinates

Usage

cartesian2sphere(lon, lat, lonR = NULL, latR = NULL, verbose = FALSE)

Arguments

lon

A numeric vector of longitudes

lat

A numeric vector of latitudes

lonR

Center longitude of viewing angle

latR

Center latitude of viewing angle

verbose

a boolean; if TRUE print information about progress

Value

A list(X=X, Y=Y, Z=Y) where X is the radial distance, Y is the polar angle, and Z is the azimuthal angle. When displaying data on a spherical grid, the longitude/latitude coordinate system is replaced with X/Z, i.e., plot(X, Z) instead of plot(lon, lat).


metno/esd documentation built on Feb. 25, 2025, 6:44 p.m.