  The large amount of spectra obtained during the epoch of extensive
spectroscopic surveys of Galactic stars needs the development of automatic
procedures to derive their atmospheric parameters and individual element
abundances. Starting from the widely-used code MOOG by C. Sneden, we have
developed a new procedure to determine atmospheric parameters and abundances in
a fully automatic way. The code FAMA (Fast Automatic MOOG Analysis) is
presented describing its approach to derive atmospheric stellar parameters and
element abundances. The code, freely distributed, is written in Perl and can be
used on different platforms. The aim of FAMA is to render the computation of
the atmospheric parameters and abundances of a large number of stars using
measurements of equivalent widths as automatic and as independent of any
subjective approach as possible. It is based on the simultaneous search for
three equilibria: excitation equilibrium, ionization balance, and the
relationship between \fei\ and the reduced equivalent widths. FAMA also
evaluates the statistical errors on individual element abundances and errors
due to the uncertainties in the stellar parameters. The convergence criteria
are not fixed 'a priori' but are based on the quality of the spectra. In this
paper we present tests performed on the Solar spectrum EWs which tests the
dependency on the initial parameters, and the analysis of a sample of stars
observed in Galactic open and globular clusters.
