A circuit model is presented for Josephson junctions (JJs) that solves the
nonlinear long-junction equation, driven by a nonuniform current distributi
on. This extended resistively shunted junction (ERSJ) model consists of a p
arallel array of ideal resistively shunted JJs coupled by inductors. The ju
nction array is connected to an array of current sources that simulate the
time- and space-dependent current distribution in a stripline. The rf-curre
nt dependent complex impedance of a long JJ calculated using this model agr
ees with measured data on a YBCO grain-boundary JJ and provides an explanat
ion of the measured steps in the resistance resulting from the creation, an
nihilation, and motion of Josephson vortices under the influence of rf curr
ents. This model contributes to a better understanding of the power-handlin
g characteristics of high-T-c microwave devices, in which the power losses
are believed to result from JJ effects associated with imperfections in the
films. The model also predicts second-harmonic generation with a highly no
nlinear and nonmonotonic power dependence. Details of the dynamics of Josep
hson vortices are presented and discussed.