A Quasi One-Dimensional Model of the Middle Atmosphere Circulation Interacting with Internal Gravity Waves