Structure and dynamics of the Martian lower and middle atmosphere