Nonlinear Schrödinger equation and classical-field description of thermal radiation