GeomagneticModelData
✖
GeomagneticModelData
returns the magnetic field data for the specified time for the current location.
returns the magnetic field data for the specified time and location.
returns the component of the magnetic field for the specified time and location.
Details and Options




- GeomagneticModelData[] makes use of $GeoLocation to determine your location and Now to determine current time.
- The location loc can be specified as latitude and longitude coordinates {lat,long}, coordinates with a height {lat,long,h}, GeoPosition[…], or as a named Entity[…]. h can be input as a numeric object in meters or as a Quantity.
- locationspec can also be a region as specified by a named Entity[…], or a listed pair of specific locations {locationspec1,locationspec2} or {locationspec1,locationspec2,h}.
- For regions, results are returned as arrays or an Association of arrays of magnetic field components by default. Arrays are calculated at the height of a specific coordinate point of the grid above the reference datum unless otherwise specified. If that data is not available, it uses a default height of 0 meters.
- The magnetic field is calculated for the current time using the World Magnetic Model or "WMM". The model is updated regularly to account for slow changes in the Earth's magnetic field. Historical magnetic fields use "WMM" if the date is within their range of validity. Otherwise, GeomagneticModelData uses the International Geomagnetic Reference Field ("IGRF") or, for pre-1900 dates, the "GUFM1" model.
- datespec can be specified by DateObject or DateList.
- Location and date can also be specified together as Association["Location"->locationspec,"Date"datespec].
- Components include "NorthComponent", "EastComponent", "DownComponent", "HorizontalComponent", "Declination", "Inclination", and "Magnitude". Components are measured relative to the reference ellipsoid "WGS84Original".
- "DownComponent" is measured relative to the perpendicular to the reference ellipsoid where positive values are downward. "HorizontalComponent" is the field parallel to the surface at that point. "Declination" is the angle from the direction of true geographic north to the horizontal component, measured clockwise. "Inclination" is the angle between the horizontal component and the vertical component. "Magnitude" is the total magnitude of the field. "Potential" is the magnetic potential.
- Components and "Magnitude" are returned in nanoteslas. "Inclination" and "Declination" are returned in angular degrees. "Potential" is returned as nanovolt seconds per meter.
- All magnetic field components are returned as an Association unless a specific component is requested.
- GeomagneticModelData[component] returns the component for the current magnetic field at your location.
- GeomagneticModelData[locationspec,component] returns the component for the current magnetic field at the specified location.
- GeomagneticModelData[locationspec,component,func] and GeomagneticModelData[locationspec,datespec,component,func] are used to specify the format of output when extended locations are specified.
- Possible settings for func include:
-
All return all values for extended locations GeoVector return components as a GeoVector object GeoVectorENU return components as a GeoVectorENU object Interval return intervals for extended locations Max return maximum values for extended locations Mean return mean value for extended locations Min return minumum values for extended locations StandardDeviation return standard deviation for extended locations - GeoVector and GeoVectorENU are not available for "Potential" or "Magnitude" components.
- GeomagneticModelData also includes the following properties: "NorthGeomagneticPole", "NorthModelDipPole", "NorthModelDipPoleGeoElevation", "SouthGeomagneticPole", "SouthModelDipPole", and "SouthModelDipPoleGeoElevation". These can be used to find the respective poles for the current or historical times.
- GeomagneticModelData takes the following options:
-
GeoZoomLevel Automatic level of resolution of the magnetic field array Method Automatic method for calculating magnetic field - Method has the suboption "Model", which allows you to specify what model to use. Available models include "WMM", "IGRF", and "GUFM1".
- The spatial resolution of the requested gravitational field data can be selected with the option GeoZoomLevelzoom, where zoom is a positive or negative integer. The larger the integer is, the more points are used to construct the array of data.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Find the magnetic field components at a geographic position:

https://wolfram.com/xid/0g359xr4k9hpvys7m-pp365g

Use Entity to specify a location:

https://wolfram.com/xid/0g359xr4k9hpvys7m-3y9x34

Find the magnetic field at a location and time:

https://wolfram.com/xid/0g359xr4k9hpvys7m-e5ie8g

Scope (16)Survey of the scope of standard use cases
Location Specification (6)
Find the magnetic field components for the current location:

https://wolfram.com/xid/0g359xr4k9hpvys7m-szl1pu

Provide location as a GeoPosition:

https://wolfram.com/xid/0g359xr4k9hpvys7m-6gyby6

Location can be given as a list of coordinates and local height:

https://wolfram.com/xid/0g359xr4k9hpvys7m-f02paq

Coordinates and height can be specified with Quantity:

https://wolfram.com/xid/0g359xr4k9hpvys7m-sgodzi

Find an array of magnetic vectors over a rectangular region defined by two points:

https://wolfram.com/xid/0g359xr4k9hpvys7m-pdj1fl

Points can be specified with GeoPosition or Entity:

https://wolfram.com/xid/0g359xr4k9hpvys7m-0ifbkn

Set the height at which the magnetic vectors will be calculated over the region:

https://wolfram.com/xid/0g359xr4k9hpvys7m-9pea9r

Calculate the magnetic field over the region defined by an Entity:

https://wolfram.com/xid/0g359xr4k9hpvys7m-nwmtjk


https://wolfram.com/xid/0g359xr4k9hpvys7m-1ov99d

Date Specification (2)
Component Specification (3)
Request specific components of the magnetic field:

https://wolfram.com/xid/0g359xr4k9hpvys7m-u5eibl


https://wolfram.com/xid/0g359xr4k9hpvys7m-1cnmhn

Find the derived components of a magnetic field:

https://wolfram.com/xid/0g359xr4k9hpvys7m-7wjuvu

Calculate the magnitude of the magnetic field:

https://wolfram.com/xid/0g359xr4k9hpvys7m-ftng51

Format Specification (2)
Find the range of the east component for an extended region:

https://wolfram.com/xid/0g359xr4k9hpvys7m-evvli9

Obtain the maximum or mean value of a component for a region:

https://wolfram.com/xid/0g359xr4k9hpvys7m-cnzm38


https://wolfram.com/xid/0g359xr4k9hpvys7m-53nrn3

Association Specification (2)
Date and location can be specified together using Association:

https://wolfram.com/xid/0g359xr4k9hpvys7m-gwhag8

Association specification works with component arguments:

https://wolfram.com/xid/0g359xr4k9hpvys7m-qm2t4j

Poles (1)
Find the properties of GeomagneticModelData:

https://wolfram.com/xid/0g359xr4k9hpvys7m-4icpiy

Find the north geomagnetic pole:

https://wolfram.com/xid/0g359xr4k9hpvys7m-olimcw

Calculate the position of the southern dip pole in 1943:

https://wolfram.com/xid/0g359xr4k9hpvys7m-ivrihn

Options (2)Common values & functionality for each option
GeoZoomLevel (1)
Control the size of the array produced for an extended region using GeoZoomLevel:

https://wolfram.com/xid/0g359xr4k9hpvys7m-r3h41l


https://wolfram.com/xid/0g359xr4k9hpvys7m-paankw

Method (1)
Use the Method option to compare the IGRF and WMM models:

https://wolfram.com/xid/0g359xr4k9hpvys7m-2xzh4m

Applications (5)Sample problems that can be solved with this function
Find the magnitude of the magnetic field at a location:

https://wolfram.com/xid/0g359xr4k9hpvys7m-i0tyo8

Calculate the angle to the vertical:

https://wolfram.com/xid/0g359xr4k9hpvys7m-le089a


https://wolfram.com/xid/0g359xr4k9hpvys7m-lz95n7

Find the Lorentz force on an electron in a hydrogen atom traveling perpendicular to the vertical:

https://wolfram.com/xid/0g359xr4k9hpvys7m-tzau1n


https://wolfram.com/xid/0g359xr4k9hpvys7m-of8dvb

Calculate how declination varies with latitude:

https://wolfram.com/xid/0g359xr4k9hpvys7m-799qtq

https://wolfram.com/xid/0g359xr4k9hpvys7m-yuav4o

Explore how the geomagnetic field changes with time:

https://wolfram.com/xid/0g359xr4k9hpvys7m-8p1770

https://wolfram.com/xid/0g359xr4k9hpvys7m-z7gyds

Track the location of a perpendicular magnetic field or dip pole over time:

https://wolfram.com/xid/0g359xr4k9hpvys7m-542tsp

https://wolfram.com/xid/0g359xr4k9hpvys7m-lh2zku

Possible Issues (3)Common pitfalls and unexpected behavior
Coordinates must be in the correct dimensions:

https://wolfram.com/xid/0g359xr4k9hpvys7m-sq79e3


The geomagnetic models are only valid near the Earth's surface:

https://wolfram.com/xid/0g359xr4k9hpvys7m-8f1zok


Historical models have a limited range of validity:

https://wolfram.com/xid/0g359xr4k9hpvys7m-h3gmva


For the World Magnetic Model, this is even more limited:

https://wolfram.com/xid/0g359xr4k9hpvys7m-dfvuzd


Neat Examples (2)Surprising or curious use cases
Examine the magnitude of the geomagnetic field across the entire planet:

https://wolfram.com/xid/0g359xr4k9hpvys7m-16eo5j

https://wolfram.com/xid/0g359xr4k9hpvys7m-zpbyek

https://wolfram.com/xid/0g359xr4k9hpvys7m-4mqx93

Explore the change in declination across the globe:

https://wolfram.com/xid/0g359xr4k9hpvys7m-ueac37

https://wolfram.com/xid/0g359xr4k9hpvys7m-h6i21u

Examine how the Earth's magnetic field changes over time:

https://wolfram.com/xid/0g359xr4k9hpvys7m-pkvwml

https://wolfram.com/xid/0g359xr4k9hpvys7m-ya5zpl

Wolfram Research (2015), GeomagneticModelData, Wolfram Language function, https://reference.wolfram.com/language/ref/GeomagneticModelData.html (updated 2019).
Text
Wolfram Research (2015), GeomagneticModelData, Wolfram Language function, https://reference.wolfram.com/language/ref/GeomagneticModelData.html (updated 2019).
Wolfram Research (2015), GeomagneticModelData, Wolfram Language function, https://reference.wolfram.com/language/ref/GeomagneticModelData.html (updated 2019).
CMS
Wolfram Language. 2015. "GeomagneticModelData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/GeomagneticModelData.html.
Wolfram Language. 2015. "GeomagneticModelData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/GeomagneticModelData.html.
APA
Wolfram Language. (2015). GeomagneticModelData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeomagneticModelData.html
Wolfram Language. (2015). GeomagneticModelData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeomagneticModelData.html
BibTeX
@misc{reference.wolfram_2025_geomagneticmodeldata, author="Wolfram Research", title="{GeomagneticModelData}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GeomagneticModelData.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_geomagneticmodeldata, organization={Wolfram Research}, title={GeomagneticModelData}, year={2019}, url={https://reference.wolfram.com/language/ref/GeomagneticModelData.html}, note=[Accessed: 29-March-2025
]}