Numerical evaluation of electromagnetic fields due to dipole antennas in the presence of stratified media