An introduction to atmospheric thermodynamics