Applications of Energy Principles to the General Circulation