Since there has been very little progress on this more or less trivial issue, I took the liberty of creating a proposed fix (attached here as a diff file) in case it can be of any help to anyone.
With best regards,
Thomas Nilsson, IRF Uppsala
edited 2020-02-21T10:45 CET: Removed incorrect attachement file, see comment below
Last edit: Thomas Nilsson 2020-02-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As all of you may noticed, in my suggested patch (igrf_coef.f.diff) I simply followed suite in regards to only having the main-field coefficients of the IGRF up to degree N=10. This was done to ensure it did not introduce unexpected bugs in other parts of the IRBEM-LIB codebase, which I am not too familiar with, (in particual igrf.f).
However now I must simply ask, why does not IRBEM-LIB take into account the full IGRF model which, since IAGA's decision in 2001 (which is referenced in text here https://doi.org/10.1111/j.1365-246X.2005.02641.x), should include up to degree N=13 for year 2000 and onwards? (Following missions like Ørsted, CHAMP and Swarm the measurements of Earth's magnetic field have greatly improved in coverage and accuracy).
I have only had a cursory read through the IRBEM-LIB code, as of svn rev 618, but I have been unable to find any notice explicitly stating it does not use the IGRF-12 (IGRF-13 with my patch) with all of its official coefficients or any notice giving a reason as to why things are done this way.
With best regards,
Thomas Nilsson, IRF Uppsala
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear everyone,
I was just made aware of a typo which snuck into my proposed "igrf_coef.f.diff" file which was linked above.
One line, which added:
+2020 F2=(year-2020.D0)/5.D0
instead should have read:
+2020 F2=(year-2015.D0)/5.D0
Please consider using the corrcted "igrf_coef.f.diff" file which is attached in this message instead. And my appologizes to anyone who downloaded and used the previous incorrect verison.
Credit goes to Nikolai Pavlov for catching this and making me aware of it, thanks again!
Hi Thomas,
Thanks for the patch. I'm not part of the core development team, so hopefully my commit access will be deemed as having been used for good here. This has been applied in r620.
I can't speak for the IRBEM developers on why the additional coefficients aren't used where they are available. If you do need the functionality provided by IRBEMlib, but need the additional precision, and aren't tied in to using Fortran - then take a look at LANLGeoMag (https://github.com/drsteve/LANLGeoMag). There's a lot of overlapping functionality and the IGRF there uses all of the coefficients, but it's a C library and has some pretty different design choices to IRBEMlib!
Hopefully there'll be an uptick in active IRBEM development in the near future that includes implementing the full IGRF.
Steve
PS. I don't have permission to close the ticket, so it'll stay open until someone with admin drops by.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will attempt to close this ticket. I don't know the actual reason for truncating the IGRF. But, since IRBEM was built to be fast, it could be that the ONERA team decided they didn't need those extra terms. Or, it could be they just copied whatever GEOPACK had. We know from the old Olson-Pfitzer study that one need not evaluate all the IGRF terms to get an accurate L value. But, for just computing B at the surface of the Earth, those details would presumably matter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since there has been very little progress on this more or less trivial issue, I took the liberty of creating a proposed fix (attached here as a diff file) in case it can be of any help to anyone.
With best regards,
Thomas Nilsson, IRF Uppsala
edited 2020-02-21T10:45 CET: Removed incorrect attachement file, see comment below
Last edit: Thomas Nilsson 2020-02-21
As all of you may noticed, in my suggested patch (igrf_coef.f.diff) I simply followed suite in regards to only having the main-field coefficients of the IGRF up to degree N=10. This was done to ensure it did not introduce unexpected bugs in other parts of the IRBEM-LIB codebase, which I am not too familiar with, (in particual igrf.f).
However now I must simply ask, why does not IRBEM-LIB take into account the full IGRF model which, since IAGA's decision in 2001 (which is referenced in text here https://doi.org/10.1111/j.1365-246X.2005.02641.x), should include up to degree N=13 for year 2000 and onwards? (Following missions like Ørsted, CHAMP and Swarm the measurements of Earth's magnetic field have greatly improved in coverage and accuracy).
I have only had a cursory read through the IRBEM-LIB code, as of svn rev 618, but I have been unable to find any notice explicitly stating it does not use the IGRF-12 (IGRF-13 with my patch) with all of its official coefficients or any notice giving a reason as to why things are done this way.
With best regards,
Thomas Nilsson, IRF Uppsala
Dear everyone,
I was just made aware of a typo which snuck into my proposed "igrf_coef.f.diff" file which was linked above.
One line, which added:
instead should have read:
Please consider using the corrcted "igrf_coef.f.diff" file which is attached in this message instead. And my appologizes to anyone who downloaded and used the previous incorrect verison.
Credit goes to Nikolai Pavlov for catching this and making me aware of it, thanks again!
With best regards,
Thomas Nilsson, IRF Uppsala
Hi Thomas,
Thanks for the patch. I'm not part of the core development team, so hopefully my commit access will be deemed as having been used for good here. This has been applied in r620.
I can't speak for the IRBEM developers on why the additional coefficients aren't used where they are available. If you do need the functionality provided by IRBEMlib, but need the additional precision, and aren't tied in to using Fortran - then take a look at LANLGeoMag (https://github.com/drsteve/LANLGeoMag). There's a lot of overlapping functionality and the IGRF there uses all of the coefficients, but it's a C library and has some pretty different design choices to IRBEMlib!
Hopefully there'll be an uptick in active IRBEM development in the near future that includes implementing the full IGRF.
Steve
PS. I don't have permission to close the ticket, so it'll stay open until someone with admin drops by.
I will attempt to close this ticket. I don't know the actual reason for truncating the IGRF. But, since IRBEM was built to be fast, it could be that the ONERA team decided they didn't need those extra terms. Or, it could be they just copied whatever GEOPACK had. We know from the old Olson-Pfitzer study that one need not evaluate all the IGRF terms to get an accurate L value. But, for just computing B at the surface of the Earth, those details would presumably matter.
Morley applied the fix and updated the coefficients.