Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update magneticField() #1473

Closed
dankelley opened this issue Jan 10, 2019 · 7 comments
Closed

update magneticField() #1473

dankelley opened this issue Jan 10, 2019 · 7 comments
Assignees

Comments

@dankelley
Copy link
Owner

dankelley commented Jan 10, 2019

@richardsc pointed out [1], so I am creating this issue as a reminder to keep checking [2, presently offline for the Trump shutdown of the American government] for code updates, so that magneticField() can be kept up-to-date.

References

  1. Witze, Alexandra. “Earth’s Magnetic Field Is Acting up and Geologists Don’t Know Why.” Nature 565 (January 9, 2019): 143. https://doi.org/10.1038/d41586-019-00007-1.

  2. NOAA website (https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html)

@dankelley dankelley self-assigned this Jan 10, 2019
@dankelley
Copy link
Owner Author

With the Trump shutdown over, I was able to check the NOAA site for updates. There are none. The code for igrf12syn in the oce sourc filesrc/magdev.f seems to match the latest version, at https://www.ngdc.noaa.gov/IAGA/vmod/igrf12.f, and so I am closing this issue.

I added some notes to the doc on magneticField(), relating to having made this check (develop branch commit 73d6028).

I don't want to keep this open as a "check once a year" sort of thing, so I'm closing it. I assume that an updated field will cause enough ripple through the research community that this will get reopened, or a new issue will get submitted.

@hhourston
Copy link

Hi Dan and Clark, IGRF-13 has been released: https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html.

@dankelley
Copy link
Owner Author

Thanks very much, @hhourston, for the comment. As it turns out, we just released to CRAN a week or so ago, and so the update will go into the "develop" branch, and won't appear on CRAN for 6 months or so (depending on whether there are other major changes that would justify a release then).

I've reopened this, and will have a look at th updated IGRF. Maybe I'll make some graphs of the changes, and document them here and possibly in a blog posting. I'll try to boil the changes down into a few numbers that can go in the help for magneticField() in a section called "History".

@dankelley dankelley reopened this Mar 3, 2020
@dankelley
Copy link
Owner Author

Amusingly, they are still using the 1960s-era variant of Fortran, in which columns past the 72nd are ignored, so e.g. in

      data g0/ -31543.,-2298., 5922., -677., 2905.,-1061.,  924., 1121., 1900
     1           1022.,-1469., -330., 1256.,    3.,  572.,  523.,  876., 1900

the 1900 is ignored. I will need to trim all of those because R uses a more modern Fortran and flags lines like that, yielding several hundred compiler warnings that the CRAN team will notice, possibly threatening the continued existence of oce on CRAN.

Although this is the only Fortran code I know of that is continually updated and yet uses the old notation, I kind of like it as a retro statement about something, a kind of vinyl record in an age of 5G music streaming.

@dankelley
Copy link
Owner Author

I've started this work, and am taking notes at https://github.com/dankelley/oce/wiki/how-to-update-the-model-for-earth-magnetic-field (which I may make into a blog posting later on). I want to add more tests to the test suite, and graphs to the docs, and I'll report on those things sometime today.

@dankelley
Copy link
Owner Author

The new formulae are incorporated into the "develop" branch. They are unlikely to appear in the CRAN version for about half a year, or maybe a year, unless we get a serious bug fix that will lt me convince the CRAN overlords that we need an update.

I blogged about the conversion process at http://dankelley.github.io/r/2020/03/03/oce-update-magneticField.html, which is basically a retelling of the story that's on the wiki page. Anyone using magneticField() ought to be aware that declinations could very well be changed by up to about a degree (see the histogram in the above-cited blog page).

@dankelley
Copy link
Owner Author

I am closing this again. Thanks, @hhourston, for noticing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants