I present a method for calculating frequency-domain electromagnetic responses caused by a dipole source over a 2-D structure. In modeling controlled-source electromagnetic data, it is usual to separate the electromagnetic field into a primary (background) and a secondary (scattered) field to avoid a source singularity, and only the secondary field caused by anomalous bodies is computed numerically. However, this conventional scheme is not effective for complex structures lacking a simple background structure. The present modeling method uses a pseudo–delta function to distribute the dipole source current, and does not need the separation of the primary and the secondary field. In addition, the method employs an isoparametric finite-element technique to represent realistic topography. Numerical experiments are used to validate the code. Finally, a simulation of a source overprint effect and the response of topography for the long-offset transient electromagnetic and the controlled-source magnetotelluric measurements is presented.