The magnetospheric magnetic field may be conveniently described by two scal
ar functions (alpha, beta), known as the Euler potentials. They are not uni
quely defined, and they may be difficult to derive for configuration more c
omplex than a simple dipole. We propose here a simple numerical method to c
ompute one possible pair (alpha, beta). In magnetospheric regions of closed
field lines, a can be chosen as a function of the tube volume of unit magn
etic Aux. The method can be applied to a wide class of magnetic fields whic
h describe the magnetospheric domain of closed field lines and the conjugat
ed ionosphere. Were, it is used with the T87 Tsyganenko model. The results
coincide with the dipolar potentials at close distances from the Earth. At
larger distances, they display an increasing distortion with the radial dis
tance (or the invariant latitude in the ionosphere) and the magnetic activi
ty. In the magnetosphere, the contours of alpha and beta are stretched towa
rds the nightside. In the ionosphere, they also extend towards the nightsid
e and present major distortions in a narrow ring at the polar cap boundary,
which maps distant boundary layers in the magnetosphere.