Skip to content

Conversation

@thomas-nilsson-irfu
Copy link
Contributor

Ref:
https://www.ncei.noaa.gov/products/international-geomagnetic-reference-field and https://www.ngdc.noaa.gov/IAGA/vmod/coeffs/igrf14coeffs.txt (cropped to keep the same number of coefficients as was previously used).

Closes #51

  • Pull request has descriptive title
  • Pull request gives overview of changes
  • New code has inline comments where necessary
  • Appropriate documentation has been written
  • Relevant issues are linked to (e.g. See issue # or Closes #)

While I have tried to be thorough in this pull request, feel free to check and correct me (with a comment or direct edit) in case of any problems.

Copy link
Contributor

@mshumko mshumko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the IGRF coefficients @thomas-nilsson-irfu. I see that the tests failed as the output values changed slightly from the reference. Would you mind update the reference values in test_IRBEM.py? Below I've copied the failed test outputs.

Let me know if that is too much of a hassle and I can help out.

=========================== short test summary info ============================
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_find_magequator - AssertionError: 626.22582957[231](https://github.com/PRBEM/IRBEM/actions/runs/12013233237/job/33486280234?pr=52#step:8:232)21 != 626.2135860526192 within 7 places (0.012243519692901828 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_find_mirror_point - AssertionError: 42271.43059990003 != 42271.69731031445 within 7 places (0.26671041442023125 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_footPoint - AssertionError: 99.99412846343064 != 99.9906483758779 within 7 places (0.0034800875527452035 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_get_field_multi - AssertionError: np.float64(-21079.764883133903) != -21079.870874468797 within 7 places (np.float64(0.10599133489449741) difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_get_mlt - AssertionError: 9.56999052595853 != 9.569987066693876 within 7 places (3.459264654281924e-06 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_lstar_array - AssertionError: 3.5597242229067536 != 3.5597506994978874 within 7 places (2.647659113375056e-05 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_lstar_datetime_obj - AssertionError: 3.5597242229067536 != 3.5597506994978874 within 7 places (2.647659113375056e-05 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_lstar_datetime_str - AssertionError: 3.5597242229067536 != 3.5597506994978874 within 7 places (2.647659113375056e-05 difference)
FAILED python/IRBEM/test_IRBEM.py::TestIRBEM::test_lstar_time_str - AssertionError: 3.5597242229067536 != 3.5597506994978874 within 7 places (2.647659113375056e-05 difference)

Note the values were changed one after another as tests failed, starting
with the ones described in comment on pull request 52, and as one part
of the test completed the next value was out of limit and corrected.

I have corrected values here until the test script ran clean, but some
values (if not tested fully by the test suite) may still need some more
attention.

Also included here is a change of Makefile to ensure the instructions in
README.install actually runs and produce some output to help the user
compile the code.
(i.e. the `make all.help`, `make install.help`, `make test.help`).

Also added a .gitignore entry for ".venv/" (created as part of installing
the IRBEM python package locally, on Linux with Python3.12, following
instructions https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-a-new-virtual-environment)
As described on:
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners
the current macos-latest is "macos-14" which, according to:
https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#language-and-runtime
only has gfortran-12, gfortran-13 and gfortran-14 installed by default.

Added here in hope that the CI/CD test job succeeds also for MacOS.

Also included is an update to my affil. & ORCID in the .zenod.json file
@thomas-nilsson-irfu
Copy link
Contributor Author

Dear @mshumko,
I think I have now succeeded in fixing as much as I can of the previously failing CI/CD jobs... The one remaining failing job "documentation/deploy" is not really able to run on this pull request for some reason.

With best regards,
Thomas Nilsson

Copy link
Contributor

@mshumko mshumko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good. Thanks @thomas-nilsson-irfu for your work with the IGRF coefficients, fixing the OSX GitHub Action, updating the test suite, and other code updates.

@mshumko mshumko merged commit 8279aa9 into PRBEM:main Dec 14, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IGRF 13th have been superseeded by IGRF 14th edition

2 participants