  We determine the decoupling surfaces for the hydrodynamic description of
heavy ion collisions at RHIC and LHC by comparing the local hydrodynamic
expansion rate with the microscopic pion-pion scattering rate. The pion $p_T$
spectra for nuclear collisions at RHIC and LHC are computed by applying the
Cooper-Frye procedure on the dynamical-decoupling surfaces, and compared with
those obtained from the constant-temperature freeze-out surfaces. Comparison
with RHIC data shows that the system indeed decouples when the expansion rate
becomes comparable with the pion scattering rate. The dynamical decoupling
based on the rates comparison also suggests that the effective decoupling
temperature in central heavy ion collisions remains practically unchanged from
RHIC to LHC.
