Generates a global grid (map) of the 13th Generation International Geomagnetic Reference Field (IGRF) for a predefined spatial resolution (in decimal degrees).

igrf_grid(field = "main", year, type = "spheroid", altitude, resolution = 5)

Arguments

field

main field (default = "main") or secular variation ("variation") data output

year

year A.D. Must be greater than or equal to 1900.0 and less than or equal to 2030. Warning message is given for dates greater than 2025.

type

"spheroid" (default) or "sphere" representation

altitude

in km above the earth surface for a geodetic type, or distance from the earth center for the spherical representation.

resolution

spatial resolution of the output map in decimal degree (default = 5).

Value

a data frame with components X,Y,Z,F, D, H and I for the main geomagnetic field or the delta (dX etc) variants for the secular variation on a regular grid. Data is returned in a tidy format with required latitude and longitude columns for convenient plotting.

Examples

grid <- igrf::igrf_grid(
year = 2000,
field = "main",
type = "spheroid",
altitude = 2,
resolution = 5
)