Gravity waves and turbulence in the free atmosphere and the atmospheric boundary layer