NOAA Logo, NOAA Satellites and Information, National Geophysical Data Center (NGDC).

Go to the NGA Web Go to the WMM Web Home Go to the Geomagnetic Data Home Go to the WMM Web Home Go to Background on Geomagnetism Go to WMM accuracy and limitations Go to download WMM software and test values Go to WMM maps of the magnetic field elements
World Magnetic Model (WMM) Banner
 NOAA | NGA | NGDC | Geomagnetic Data & Info | WMM Home comments |  privacy policy
Side Navigation Image

The World Magnetic Model and Associated Software

This site provides access to the DoD software and current WMM model. The software computes the main components of the geomagnetic field and their annual changes. The programs are designed to be used in demand mode. The software is available in both C and Fortran source code. The model file, wmm.cof, is expected to reside in the same directory as the software. Note: The altitude is referenced to the World Geodetic System 1984 (WGS 84) ellipsoid.

New Release   DoD World Magnetic Model on-line calculator (2005 - 2010)

As changes are made to the WMM code, the revised code will be posted. Check this site for change notices

Input And Output

The input parameters and valid entries are:

Latitude -90.00 to +90.00 degrees
Longitude -180.00 to +180.00 degrees
Altitude Sea level to 1,000,000 meters (referenced to the WGS 84 ellipsoid)
Date Base epoch of the current model to epoch + 5 years

The seven magnetic components computed are:

F - Total Intensity of the geomagnetic field
H - Horizontal Intensity of the geomagnetic field
X - North Component of the geomagnetic field
Y - East Component of the geomagnetic field
Z - Vertical Component of the geomagnetic field
I (DIP) - Geomagnetic Inclination
D (DEC) - Geomagnetic Declination (Magnetic Variation)

Annual change in each of these magnetic components is also displayed. The annual change is computed by subtracting the main field values for the desired input date from main field values one year later. The output units are displayed using the abbreviations nT (nanoTesla), deg (degrees) and min (minutes) per year.

Download Software and Model

Changes made to the WMM Code

Note: the download code will always be the latest version

25 November 2005 - Version 2 Posted
Due to the number of changes made to the software, NGDC is releasing a version 2 of the code. The download file is the latest version.
    Changes include:

  • Spelling corrections in help text and input prompts
  • Warnings added for undefined declination at / near magnetic poles
  • Resolution of results consistent across all programs
  • Clarified input to indicate height is above mean sea level using the WGS84 reference ellipsoid
  • Corrected elevation bug in the Fortran grid program

Changes made in the Version 2 software are listed in the change document (pdf)

5 April 2005
C Software bug fixes:
  1) Fixed inclination reporting (erroniously reported as positive upwards)
  2) Fixed problem reading input which led to a memory leak and program fail when compiled with gnu compilers

15 December 2004
Changes: As of 2000, the model produced and distributed from the Web has been named "wmm.cof", with the model epoch contained in the header of the model. The current model has an additional change to be compliant with Y2K. The publication date of the model, as shown in the first line (header) of the model is now a four-digit year. There are no changes in the format of the coefficients.

    2005.0            WMM-2005        10/18/2004

rather than

    2000.0            WMM-2000           10/28/99


Last Modified on: Friday, 14-Mar-2008 12:01:20 MDT
NOAA > NESDIS > NGDC
http://www.ngdc.noaa.gov/geomag/WMM/soft.shtml
Maintained by: Susan McLean