  Numerical reconstruction/extrapolation of coronal nonlinear force-free
magnetic field (NLFFF) usually takes the photospheric vector magnetogram as
input at the bottom boundary. Magnetic field observed at the photosphere,
however, contains force which is in conflict with the fundamental assumption of
the force-free model and measurement noise which is unfavorable for practical
computation. Preprocessing of the raw magnetogram has been proposed by
Wiegelmann, Inhester, and Sakurai (2006) to remove the force and noise for
providing better input for NLFFF modeling. In this paper we develop a new code
of magnetogram preprocessing which is consistent with our extrapolation method
CESE-MHD-NLFFF (Jiang, Feng, and Xiang, 2012; Jiang and Feng, 2012). Basing on
a magnetic-splitting rule that a magnetic field can be split into a potential
field part and a non-potential part, we split the magnetogram and deal with the
two parts separately. Preprocessing of the magnetogram's potential part is
based on a numerical potential field model, and the non-potential part is
preprocessed using the similar optimization method of Wiegelmann et al (2006).
The code is applied to the SDO/HMI data and results show that the method can
remove efficiently the force and noise and improve the quality of
extrapolation.
