Geophysical fluids dynamics is the study of fluid envelopes surrounding a rotating planetary body, such as the Earth's oceans and planetary atmospheres. The dynamics of such fluids are dominated by the influence of gravity and rotation, and their study has clear applications to a diverse range of subjects such as weather forecasting, ocean modeling and prediction of future climate. An important component of the study of geophysical fluids is the use of numerical models, since the equations are in general too difficult to solve analytically. The part of the model responsible for simulation reversible (entropy-conserving), (moist) adiabatic dynamics is known as the dynamical core. The dominant features of the large scale dynamics of the atmosphere (and many aspects of the small-scale dynamics and other areas of geophysical fluid dynamics) are balanced states and adjustment processes, wave motions (Rossby, Kelvin, and Inertia-Gravity) and conservation properties (such as total energy). It is therefore desirable that the dynamical core has similar discrete processes and properties. Underlying these properties at the continuous level is the Hamiltonian formulation, which writes the equations of motion in terms of a Hamiltonian function and a Poisson bracket. A general framework for structure-preserving discretizations of reversible dynamics then consists of discretizing the Hamiltonian formulation using a mimetic spatial discretization and an energy-conserving Poisson integrator to produce a quasi-Hamiltonian discrete model. This is sufficient to obtain most of the desirable properties, and we will show that careful selection of the spatial and temporal discretization gives rest. Specifically, we have chosen to use the newly developed mimetic Galerkin difference element (MGD, a type of compatible Galerkin method) coupled with a second-order, implicit Poisson integrator. The MGD element avoid spectral gaps and other dispersive anomalies found with finite elements methods. Using these choices, concrete examples will be shown of the application of the general framework for two commonly used sets of equations in geophysical fluid dynamics: the thermal shallow water equations and the fully compressible Euler equations. In both cases, for the first time, models with fully discrete conservation of total mass, buoyancy or entropy and energy for arbitrary equations of state are obtained. If time permits, there will also be a short discussion of ongoing working on the extension of the general framework to incorporate irreversible processes.