({{, (RefLink[GeogravityModelData, paclet:ref/GeogravityModelData])[] 
returns the gravitational field data for the current location.}, {, (RefLink[GeogravityModelData, paclet:ref/GeogravityModelData])[locationspec]
returns the gravitational field data for a location.}, {, (RefLink[GeogravityModelData, paclet:ref/GeogravityModelData])[locationspec,component]
returns the component of the gravitational field.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[GeogravityModelData, paclet:ref/GeogravityModelData])[] makes use of (RefLink[$GeoLocation, paclet:ref/$GeoLocation]) to determine your location.

locationspec can be specified as latitude and longitude coordinates {lat,lon}, coordinates with a height {lat,lon,h}, (RefLink[GeoPosition, paclet:ref/GeoPosition])[…], or as a named (RefLink[Entity, paclet:ref/Entity])[…]. h can be input as a numeric object in meters or as a (RefLink[Quantity, paclet:ref/Quantity]).

locationspec can also be a region as specified by a named (RefLink[Entity, paclet:ref/Entity])[…] or a listed pair of specific locations {(Subscript[locationspec, 1]),(Subscript[locationspec, 2])} or {(Subscript[locationspec, 1]),(Subscript[locationspec, 2]),h}.

Location can also be specified as (RefLink[Association, paclet:ref/Association])["Location"->locationspec].

For regions, results are returned as arrays or an (RefLink[Association, paclet:ref/Association]) of arrays of gravitational fields by default. Arrays are calculated at the geographic 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.

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 between the north and east components. "Inclination" is the angle between the horizontal component and the vertical component. "Magnitude" is the total magnitude of the field. "Potential" is the gravitational potential.

Components and "Magnitude" are returned in meters per second squared. "Inclination" and "Declination" are returned in angular degrees. "Potential" is returned in joules per kilogram.

All gravitational field components are returned as an (RefLink[Association, paclet:ref/Association]) unless a specific component is requested.

(RefLink[GeogravityModelData, paclet:ref/GeogravityModelData])[locationspec,component,func] is used to specify the format of output when extended locations are specified.

Possible settings for func include:

(RefLink[GeoVector, paclet:ref/GeoVector]) and (RefLink[GeoVectorENU, paclet:ref/GeoVectorENU]) are not available for "Potential" or "Magnitude" components.

(RefLink[GeogravityModelData, paclet:ref/GeogravityModelData]) takes the following options:

(RefLink[Method, paclet:ref/Method]) takes a suboption "ModelDegree" that controls the order of the gravitational model used. It can be set to integer values between 2 and 360 inclusive.

(RefLink[Method, paclet:ref/Method]) also takes a suboption "IncludeRotation" that can be set to (RefLink[True, paclet:ref/True]) to include the effects of the Earth's rotation in the calculation of the acceleration field components.

The spatial resolution of the requested gravitational field data can be selected with the option (RefLink[GeoZoomLevel, paclet:ref/GeoZoomLevel])->zoom, where zoom is an integer.

Data is based on EGM96 (Earth Gravitational Model 1996) on the WGS 84 ellipsoid.

OpenersPrimaryExamplesSection(Spacer1)Examples  (22)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find the gravitational field components at a geographic position:

GeogravityModelData[GeoPosition[{40, -100, 691}]]

Use (RefLink[Entity, paclet:ref/Entity]) to specify a location:

GeogravityModelData[(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"])]

OpenersExampleSection1(Spacer1)Scope  (10)

OpenersExampleSubsection0(Spacer1)Location Specification  (5)

Find the gravitational field components for the current location:

GeogravityModelData[]

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

GeogravityModelData[{40, 10, 691}]

Coordinates and height can be specified with (RefLink[Quantity, paclet:ref/Quantity]):

GeogravityModelData[{Quantity[35,"AngularDegrees"], Quantity[-90,"AngularDegrees"], Quantity[200,"Feet"]}]

Find an array of gravitational fields over a rectangular region defined by two points:

GeogravityModelData[{{40, -100},{45, -90}},GeoZoomLevel->1]

Points can be specified with (RefLink[GeoPosition, paclet:ref/GeoPosition]) or (RefLink[Entity, paclet:ref/Entity]):

GeogravityModelData[{(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]),GeoPosition[{45, -90}]},GeoZoomLevel->1]["Magnitude"]

Set the height at which the gravitational field will be calculated over the region:

GeogravityModelData[{{40, -100},{45, -90},Quantity[200,"Feet"]},GeoZoomLevel->2]["NorthComponent"]

Calculate the gravitational field over the region defined by an (RefLink[Entity, paclet:ref/Entity]):

GeogravityModelData[(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"]),GeoZoomLevel->1]["DownComponent"]

Include a reference height:

GeogravityModelData[{(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"]),Quantity[1000,"Meters"]},GeoZoomLevel->1]["DownComponent"]

OpenersExampleSubsection1(Spacer1)Component Specification  (3)

Request specific components of the gravitational field:

GeogravityModelData[{Quantity[40,"AngularDegrees"], Quantity[-90,"AngularDegrees"], Quantity[500,"Feet"]},"EastComponent"]

GeogravityModelData[{Quantity[40,"AngularDegrees"], Quantity[-90,"AngularDegrees"], Quantity[500,"Feet"]},"DownComponent"]

Find the derived components of a gravitational field:

GeogravityModelData[{Quantity[40,"AngularDegrees"], Quantity[-90,"AngularDegrees"], Quantity[500,"Feet"]},"Declination"]

Calculate the magnitude of the gravitational field:

GeogravityModelData[{Quantity[40,"AngularDegrees"], Quantity[-90,"AngularDegrees"], Quantity[500,"Feet"]},"Magnitude"]

OpenersExampleSubsection2(Spacer1)Format Specification  (2)

Find the range of the east component for an extended region:

GeogravityModelData[(Entity["New York, United States", Entity["AdministrativeDivision",{"NewYork","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"NewYork\", \"UnitedStates\"}]", "administrative division"]),"EastComponent",Interval,GeoZoomLevel->1]

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

GeogravityModelData[{{40, -5,0},{45, 5,0}},"Magnitude",Max,GeoZoomLevel->1]

GeogravityModelData[{{40, -5,0},{45, 5,0}},"DownComponent",Mean,GeoZoomLevel->1]

OpenersExampleSection2(Spacer1)Options  (4)

OpenersExampleSubsection3(Spacer1)GeoZoomLevel  (1)

Control the size of the array produced for an extended region using (RefLink[GeoZoomLevel, paclet:ref/GeoZoomLevel]):

GeogravityModelData[{(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]),{45, -90}},"Magnitude",GeoZoomLevel->1]

GeogravityModelData[{(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]),{45, -90}},"Magnitude",GeoZoomLevel->2]

OpenersExampleSubsection4(Spacer1)Method  (3)

Increase the accuracy of the results by increasing the "ModelDegree" setting for the (RefLink[Method, paclet:ref/Method]) option:

GeogravityModelData[{40, -100, 691},Method->{"ModelDegree"->100}]

Examine how the down component changes with increasing degrees of the model:

data=Table[GeogravityModelData[{40, -100, 691},Method->{"ModelDegree"->n}]["DownComponent"],{n,2,20}];

ListPlot[data]

Use "IncludeRotation" to examine the effect of the Earth's rotation on net gravitational acceleration:

data=Table[{lat,GeogravityModelData[{lat, 5,0},"DownComponent",Method->{"IncludeRotation"->False}]-GeogravityModelData[{lat, 5,0},"DownComponent",Method->{"IncludeRotation"->True}]},{lat,0,90,2}];

ListPlot[data,Joined->True]

OpenersExampleSection3(Spacer1)Applications  (3)

Find the magnitude of the gravitational field at a location:

GeogravityModelData[(Entity["Champaign", Entity["City",{"Champaign","Illinois","UnitedStates"}], "Entity[\"City\", {\"Champaign\", \"Illinois\", \"UnitedStates\"}]", "city"])]["Magnitude"]

Calculate the angle to the vertical:

GeogravityModelData[(Entity["Champaign", Entity["City",{"Champaign","Illinois","UnitedStates"}], "Entity[\"City\", {\"Champaign\", \"Illinois\", \"UnitedStates\"}]", "city"])]["Inclination"]

UnitConvert[%,"Radians"]

Calculate the inclination of the gravitational field for major cities in France:

cities=CityData[{Large,"France"}];

data=GeogravityModelData[#,"Inclination"]&/@cities;

Examine the distribution of values as a divergence from the vertical:

Histogram[UnitConvert[(Quantity[Pi/2,"Radians"]+data),"Milliradians"],{0.01},AxesLabel->Automatic]

Examine how the gravity model deviates from the theoretical gravitational acceleration:

GeogravityModelData[(Entity["Denver", Entity["City",{"Denver","Colorado","UnitedStates"}], "Entity[\"City\", {\"Denver\", \"Colorado\", \"UnitedStates\"}]", "city"]),"DownComponent"]

FormulaData[{"GravitationalAcceleration","Radius"},{"r"->PlanetData["Earth", "Radius"]+GeoElevationData[EntityValue[(Entity["Denver", Entity["City",{"Denver","Colorado","UnitedStates"}], "Entity[\"City\", {\"Denver\", \"Colorado\", \"UnitedStates\"}]", "city"]),"Position"]],"M"->PlanetData["Earth", "Mass"]}]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

Coordinates must be in the correct dimensions:

GeogravityModelData[{Quantity[40,"Seconds"], -100}]

"ModelDegree" should be an integer between 2 and 360:

GeogravityModelData[GeoPosition[{40, -100, 691}],Method->{"ModelDegree"->1}]

GeogravityModelData[GeoPosition[{40, -100, 691}],Method->{"ModelDegree"->4.5}]

OpenersExampleSection5(Spacer1)Neat Examples  (3)

Examine how the period T differs in different locations for a 1-meter-long pendulum with a displacement of 1 degree:

FormulaData[{"PendulumSmallOscillations","Standard"},{"g"->GeogravityModelData[(Entity["Cairo", Entity["City",{"Cairo","Cairo","Egypt"}], "Entity[\"City\", {\"Cairo\", \"Cairo\", \"Egypt\"}]", "city"])]["DownComponent"],"l"->Quantity[1,"Meters"],(QuantityVariable[(Subscript["θ", 0]), "Angle"])->1 Degree}]

FormulaData[{"PendulumSmallOscillations","Standard"},{"g"->GeogravityModelData[(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"])]["DownComponent"],"l"->Quantity[1,"Meters"],(QuantityVariable[(Subscript["θ", 0]), "Angle"])->1 Degree}]

Examine how the Earth's gravitational field differs from the standard value of 9.81 (m/(s^2)) over a region:

data=Normal[GeogravityModelData[(Entity["United States", Entity["Country","UnitedStates"], "Entity[\"Country\", \"UnitedStates\"]", "Country"]), "DownComponent", GeoZoomLevel -> 1]]-Quantity[1,"StandardAccelerationOfGravity"];

plot=ListContourPlot[QuantityMagnitude@data,Frame->False,PlotRangePadding->0,ColorFunction->"TemperatureMap"];

Legended[GeoGraphics[{GeoStyling[{"GeoImage",plot}],Opacity[0.8],Polygon[(Entity["United States", Entity["Country","UnitedStates"], "Entity[\"Country\", \"UnitedStates\"]", "Country"])]}],BarLegend[{"TemperatureMap",{Min[#],Max[#]}&@Flatten[QuantityMagnitude@data]}]]

Examine the magnitude of the gravitational field across the entire planet:

data=QuantityMagnitude@GeogravityModelData[{{-90,-180.},{90,180.}},"Magnitude",GeoZoomLevel->-2];

plot=ListContourPlot[data,Frame->False,PlotRangePadding->0,ColorFunction->"TemperatureMap"];

Legended[GeoGraphics[{GeoStyling[{"GeoImage",plot}],Opacity[0.5],Polygon[GeoPosition[{{-90,-180},{90,-180},{90,180},{-90,180}}]]},GeoRange->"World"],BarLegend[{"TemperatureMap",{Min[#],Max[#]}&@Flatten[QuantityMagnitude@data]}]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeomagneticModelData, paclet:ref/GeomagneticModelData])  ▪  (RefLink[SatelliteData, paclet:ref/SatelliteData])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Earth Sciences: Data & Computation, paclet:guide/EarthSciencesDataAndComputation])}, {▪(RefLinkPlain[Geographic Data & Entities, paclet:guide/GeographicData])}})}})