  Potential magnetic field solutions can be obtained based on the synoptic
magnetograms of the Sun. Traditionally, a spherical harmonics decomposition of
the magnetogram is used to construct the current and divergence free magnetic
field solution. This method works reasonably well when the order of spherical
harmonics is limited to be small relative to the resolution of the magnetogram,
although some artifacts, such as ringing, can arise around sharp features. When
the number of spherical harmonics is increased, however, using the raw
magnetogram data given on a grid that is uniform in the sine of the latitude
coordinate can result in inaccurate and unreliable results, especially in the
polar regions close to the Sun.
  We discuss here two approaches that can mitigate or completely avoid these
problems: i) Remeshing the magnetogram onto a grid with uniform resolution in
latitude, and limiting the highest order of the spherical harmonics to the
anti-alias limit; ii) Using an iterative finite difference algorithm to solve
for the potential field. The naive and the improved numerical solutions are
compared for actual magnetograms, and the differences are found to be rather
dramatic.
  We made our new Finite Difference Iterative Potential-field Solver (FDIPS) a
publically available code, so that other researchers can also use it as an
alternative to the spherical harmonics approach.
