Calculation of a gigantic upward atmospheric discharge, accompanying optical phenomena, and penetrating radiations. I. Numerical model