Energy conserving compatible finite element methods for numerical weather prediction