Equilibrium Statistical Mechanics and Energy Partition for the Shallow Water Model