-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use igrf C code instead of Fortran. #2
Comments
Hi @Jammyjamjamman I think that would be fine to have the C version of IGRF as a reference. Feel free to pull request it 👍 |
Hi, @scivision , sorry for taking a year to respond... Would you still be interested in me implementing this? Here is what my plan would be to implement it:
|
I just checked and put the C code in this repo for future reference. I didn't have any issues compiling with Visual Studio or any other modern C compiler I tried. The C source code for the geomag_windows and geomag_linux is exactly the same. I would need to make an interface for this C code. |
SWIG interfaces are the easiest way I know of doing this. Could also be done as a pure python module (hard) or using Cython. |
Firstly, thanks for this awesome repository! It has been really useful to me!
I think it would be better if the repository used the C IGRF code because:
C is better than Fortran (well... ok this isn't really true anymore, but it is true for old Fortran like seen in the IGRF code).
Most people have a C/C++ compiler already for installing python packages, but not a Fortran compiler. I was using anaconda python on ubuntu and I had to install fortran to install this. (You can also install fortran from the anaconda repo).
Of course, this is not an essential project. I just think it might be a nice improvement. If it's too difficult, then I wouldn't worry about it.
The text was updated successfully, but these errors were encountered: