Abstract:In the study of geomagnetic field, firstly, the distribution model of geomagnetic field and its secular variation should be established. While the international geomagnetic reference field (IGRF) is used to describe the global geomagnetic field and its secular variation of the geomagnetic field model standard, the international association of geomagnetism and aeronomy (IAGA) every five years is given a set of spherical harmonic coefficients and the international geomagnetic reference field (IGRF). The distribution of the earth′s basic magnetic field and its secular variation is indicated by the spherical harmonic analysis method, which is usually called the spherical harmonic mode of the geomagnetic field. In this paper, through the preparation of the program to complete the calculation of the geomagnetic field, and then use the calculation of the geomagnetic data, draw the geomagnetic elements contour map. Therefore, this program can be calculated at any point of the geomagnetic elements of the value and draw its contour map.