Numerical simulation of narrow bipolar electromagnetic pulses generated by thunderstorm discharges