  The purpose of this work is to develop a procedure to obtain the normal modes
of a coronal loop from time-dependent numerical simulations with the aim of
better understanding observed transverse loop oscillations. To achieve this
goal, in this paper we present a new method and test its performance with a
problem for which the normal modes can be computed analytically. In a follow-up
paper, the application to the simulations of \citet{rial2013} is tackled. The
method proceeds iteratively and at each step consists of (i) a time-dependent
numerical simulation followed by (ii) the Complex Empirical Orthogonal Function
(CEOF) analysis of the simulation results. The CEOF analysis provides an
approximation to the normal mode eigenfunctions that can be used to set up the
initial conditions for the numerical simulation of the following iteration, in
which an improved normal mode approximation is obtained. The iterative process
is stopped once the global difference between successive approximate
eigenfunctions is below a prescribed threshold. The equilibrium used in this
paper contains material discontinuities that result in one eigenfunction with a
jump across these discontinuities and two eigenfunctions whose normal
derivatives are discontinuous there. After 6 iterations, the approximation to
the frequency and eigenfunctions are accurate to $\lesssim 0.7$\% except for
the eigenfunction with discontinuities, which displays a much larger error at
these positions.
