Microwave thermal emission from a stratified medium with nonuniform temperature distribution