Skip to content

Add option to the IGRF calculations to limit the number of used harmonics. - #9206

Merged
joa-quim merged 2 commits into
masterfrom
IGRF-banded
Sep 14, 2026
Merged

joa-quim merged 2 commits into
masterfrom
IGRF-banded

Conversation

@joa-quim

@joa-quim joa-quim commented Sep 13, 2026

Copy link
Copy Markdown
Member

Extend option -F of mgd77magref to also limit the number of harmonics used by adding +l<low>/<high>

This exaple shows the geomagnetic field of all but the dipolar term.

gmt grdmath -Rd -I1 0 = zeros.nc
gmt grd2xyz zeros.nc -o0,1 | gmt mgd77magref -A+a0+t2020+y -Frt/0+l2/13 | gmt xyz2grd -Rd -I1 -Gnondip.nc
gmt grdimage nondip.nc -JR15c -Ba -png nondip

Tried to find something to test against but didn't find. Only internal consistency that +l1/1 plus +l2/13 == l1/13 (all harmonics in modern IGRFs.

nondip

@joa-quim
joa-quim requested a review from a team September 13, 2026 21:34
@joa-quim
joa-quim merged commit 3ca89b5 into master Sep 14, 2026
14 of 17 checks passed
@joa-quim
joa-quim deleted the IGRF-banded branch September 14, 2026 18:20
@Esteban82 Esteban82 added the add-changelog Add PR to the changelog label Sep 14, 2026
@seisman seisman mentioned this pull request Sep 15, 2026
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants