  Invariant finite-difference schemes for the one-dimensional shallow water
equations in the presence of a magnetic field for various bottom topographies
are constructed. Based on the results of the group classification recently
carried out by the authors, finite-difference analogues of the conservation
laws of the original differential model are obtained. Some typical problems are
considered numerically, for which a comparison is made between the cases of a
magnetic field presence and when it is absent (the standard shallow water
model). The invariance of difference schemes in Lagrangian coordinates and the
energy preservation on the obtained numerical solutions are also discussed.
