  Following our previous work on periodic ray paths (He et al, 2022), we study
asymptotically and numerically the structure of internal shear layers for very
small Ekman numbers in a three-dimensional (3D) spherical shell and in a
two-dimensional (2D) cylindrical annulus when the rays converge towards an
attractor. We first show that the asymptotic solution obtained by propagating
the self-similar solution generated at the critical latitude on the librating
inner core describes the main features of the numerical solution. The internal
shear layer structure and the scaling for its width and velocity amplitude in
$E^{1/3}$ and $E^{1/12}$ respectively are recovered. The amplitude of the
asymptotic solution is shown to decrease to $E^{1/6}$ when it reaches the
attractor, as it is also observed numerically. However, some discrepancies are
observed close to the particular attractors along which the phase of the wave
beam remains constant. Another asymptotic solution close to those attractors is
then constructed using the model of Ogilvie (2005). The solution obtained for
the velocity has an $O(E^{1/6})$ amplitude, but a different self-similar
structure than the critical-latitude solution. It also depends on the Ekman
pumping at the contact points of the attractor with the boundaries. We
demonstrate that it reproduces correctly the numerical solution. Surprisingly,
the solution close to an attractor with phase shift (that is an attractor that
touches the axis in 3D or in 2D with a symmetric forcing) is found to be much
weaker.
