^{1}

A derivation of a dynamical core for the dry atmosphere in the absence of dissipative processes based on the least action (i.e., Hamilton’s) principle is presented. This approach can be considered the finite-element method applied to the calculation and minimization of the action. The algorithm possesses the following characteristic features: (1) For a given set of grid points and a given forward operator the algorithm ensures through the minimization of action maximal closeness (in a broad sense) of the evolution of the discrete system to the motion of the continuous atmosphere (a dynamically-optimal algorithm); (2) The grid points can be irregularly spaced allowing for variable spatial resolution; (3) The spatial resolution can be adjusted locally while executing calculations; (4) By using a set of tetrahedra as finite elements the algorithm ensures a better representation of the topography (piecewise linear rather than staircase); (5) The algorithm automatically calculates the evolution of passive tracers by following the trajectories of the fluid particles, which ensures that all <em>a priori</em> required tracer properties are satisfied. For testing purposes, the algorithm is realized in 2D, and a numerical example representing a convection event is presented.