Energy and Enstrophy conserving shallow water solver