NAME:
  recsph
 PURPOSE:   (one line only)
  Convert from rectangular to spherical coordinates
 DESCRIPTION:
 CATEGORY:
  Mathematical
 CALLING SEQUENCE:
  recsph,x,y,z,r,lat,lon
 INPUTS:
  x     - Cartesian x-coordinate (same units as r).
  y     - Cartesian y-coordinate (same units as r).
  z     - Cartesian z-coordinate (same units as r).
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
 OUTPUTS:
  r - distance from origin
  lat - angular distance from x-y plane (radians)
  lon - longitude (angle from x axis) in radians
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
  rank and size of all inputs must match or be scalar.
 PROCEDURE:
 MODIFICATION HISTORY:
  2011/11/29, Written by Marc W. Buie, Southwest Research Institute
                converted from sphrec.f
  2014/09/19, MWB, added prival call on lon to reduce to [0,2pi)