We present a technique for describing the global behaviour of complex nonlinear flows by decomposing the flow into modes determined from spectral analysis of the Koopman operator, an infinite-dimensional linear operator associated with the full nonlinear system. These modes, referred to as Koopman modes, are associated with a particular observable, and may be determined directly from data (either numerical or experimental) using a variant of a standard Arnoldi method. They have an associated temporal frequency and growth rate and may be viewed as a nonlinear generalization of global eigenmodes of a linearized system. They provide an alternative to proper orthogonal decomposition, and in the case of periodic data the Koopman modes reduce to a discrete temporal Fourier transform. The Arnoldi method used for computations is identical to the dynamic mode decomposition recently proposed by Schmid & Sesterhenn (Sixty-First Annual Meeting of the APS Division of Fluid Dynamics, 2008), so dynamic mode decomposition can be thought of as an algorithm for finding Koopman modes. We illustrate the method on an example of a jet in crossflow, and show that the method captures the dominant frequencies and elucidates the associated spatial structures.