• -layer model is used. The latter is explored by use of an ters. In this a fairly simple 1• energy diagnostic scheme recently developed for multilayer models. On the basis of visual inspection and spectral analysis of the results, it is concluded that the physical processes leading to the formation, the separation distance, and the persistence of the filaments are largely independent of the presence of a variable topography and coastline irregularities. The role of the irregularities is to modify the qualitative appearance of the filaments and also to loosely anchor them to conspicuous topographic and/or coastline features. The variable topography alone modifies the appearance of the mesoscale structures and produces alongshore differences in the onset of instabilities, while coastline irregularities alone effectuate a delay in the onset of the initial small-scale, linearly unstable waves. The energy diagnosis reveals that the eddy kinetic energy linked to the filaments and other mesoscale structures is steadily extracted from the mean available gravitational energy via a combination of frontal instability and mixed frontal-conventional baroclinic instability. This cyclogenesis is made possible through the maintenance of a strong lateral front in both density and upper layer thickness close to the coast. The frontogenesis, in turn, is sustained by the persistent upwelling-favorable wind forcing.