code: def lonlat2xyz(lon, lat):
      
      lat = xu.deg2rad(lat)
      lon = xu.deg2rad(lon)
      x = xu.cos(lat) * xu.cos(lon)
      y = xu.cos(lat) * xu.sin(lon)
      z = xu.sin(lat)
      return x, y, z
docs: Convert lon lat to cartesian.