Simulation of long-period ground motion near a large earthquake