A method is developed for solving simultaneously in one dimension the equation of transfer for non-LTE spectral line radiation and the time-dependent equations specifying conservation of mass, energy and linear momentum. In particular, we illustrate the method on a ‘simple’ time-dependent problem in which a pulsating disturbance at some point in a model homogeneous atmosphere propagates towards the surface and steepens into a shock. The resulting emergent intensities show rather dramatic changes over very small time intervals due to the effect of the velocity, density and temperature distributions on the radiative absorption properties of the gas, and thus emphasises the need to solve the above-mentioned four basic equations if one is to obtain physically realistic model atmospheres experiencing initial disturbances.