<p>After looking into the various wrappers and ways Python and IDL work with FORTRAN I came to the conclusion that it is more of a preference which language you use. However as people continuously add astronomy support to Python this may change, but as of now, it seems to be a question of preference. </p>

CC BY-SA 3.0
2016-08-29T12:28:27.403Z
I assume you know that you can use the [CALL_EXTERNAL.PRO](http://www.harrisgeospatial.com/docs/CALL_EXTERNAL.html) routine in IDL to call pre-compiled Fortran routines (as shared object libraries).
honeste_vivere
CC BY-SA 3.0
2016-07-21T13:22:05.830Z
2016-07-21T13:22:05.830Z
Ceddrick
<p>I'm trying to use model atmospheres such as Kurucz or MARCS for the first time personally and I'm wondering if it is better to wrap it with IDL or Python in terms of writing the code, and getting the values I wanted from the model atmospheres into arrays for printing into tables. </p>

<p>Essentially is it better to approach this issue using IDL or with Python, or is it just more of a preferential thing if anything?</p>

CC BY-SA 3.0
2016-07-20T17:30:17.450Z
I cannot give a practical answer to this question, since I have not worked in your exact situation, but I would be inclined to suggest Python because it has a large userbase and excellent support, see http://www.ncra.tifr.res.in:8081/~yogesh/python2014/whypython.pdf
called2voyage
CC BY-SA 3.0
2016-07-20T18:07:09.903Z
@called2voyage I'm leaning more towards Python since I'm more experienced with it, however the individual ways each language tackles utilizing FORTRAN is different in complexity and approach and that's more towards what I'm getting at. Maybe I should edit the question.
Ceddrick
CC BY-SA 3.0
2016-07-20T18:08:14.137Z
Yes, that is a good idea. Otherwise, even from those who have been in a situation where they can compare, their comparison may not address your situation.
called2voyage
CC BY-SA 3.0
2016-07-20T21:50:47.213Z
Good Lord - those are code packages from around **the early 1970s** is that right????  in Fortran?
Fattie
CC BY-SA 3.0
2016-07-20T22:01:36.367Z
@JoeBlow If you want to write code that does stuff fast, you write it in a compiled language like fortran or C.
ProfRob
CC BY-SA 3.0
2016-07-20T22:21:53.800Z
@JoeBlow MARCS is from 2008, as far as I can see. Kurucz was founded in around 1979 but has been updated frequently since. 

And as Rob Jeffries says, Fortran is still one of the absolutely best solutions there is for heavy number crunching. The language was last updated in 2010, with another update planned for 2018.
Thriveth
CC BY-SA 3.0
2016-07-21T07:14:33.150Z
This is off topic it would be better on asked on stackoverflow.com
James Screech
CC BY-SA 3.0
2016-07-21T12:20:48.217Z
@JamesScreech We have had [questions](http://astronomy.stackexchange.com/questions/10513/what-are-the-most-popular-computer-programming-languages-in-observational-astron) on Astronomy software before. This would fall under ["Setting up, using and maintaining your astronomy related equipment"](http://astronomy.stackexchange.com/help/on-topic).
called2voyage
CC BY-SA 3.0
2016-07-21T18:06:42.573Z
Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/42850/discussion-on-question-by-ceddrick-interfacing-fortran-programs-for-model-atmosp).
called2voyage
<star>
Interfacing FORTRAN programs for model atmospheres with IDL or Python
Ceddrick
# Interfacing FORTRAN programs for model atmospheres with IDL or Python

(Asked by: username_0 on 2016-07-20)

I'm trying to use model atmospheres such as Kurucz or MARCS for the first time personally and I'm wondering if it is better to wrap it with IDL or Python in terms of writing the code, and getting the values I wanted from the model atmospheres into arrays for printing into tables.

Essentially is it better to approach this issue using IDL or with Python, or is it just more of a preferential thing if anything?

**Tags:** star

> **Comments:**
> **username_1**: I cannot give a practical answer to this question, since I have not worked in your exact situation, but I would be inclined to suggest Python because it has a large userbase and excellent support, see http://www.ncra.tifr.res.in:8081/~yogesh/python2014/whypython.pdf  
> **username_0**: @username_1 I'm leaning more towards Python since I'm more experienced with it, however the individual ways each language tackles utilizing FORTRAN is different in complexity and approach and that's more towards what I'm getting at. Maybe I should edit the question.  
> **username_1**: Yes, that is a good idea. Otherwise, even from those who have been in a situation where they can compare, their comparison may not address your situation.  
> **username_2**: Good Lord - those are code packages from around **the early 1970s** is that right????  in Fortran?  
> **username_3**: @JoeBlow If you want to write code that does stuff fast, you write it in a compiled language like fortran or C.  
> **username_4**: @JoeBlow MARCS is from 2008, as far as I can see. Kurucz was founded in around 1979 but has been updated frequently since.   And as Rob Jeffries says, Fortran is still one of the absolutely best solutions there is for heavy number crunching. The language was last updated in 2010, with another update planned for 2018.  
> **username_5**: This is off topic it would be better on asked on stackoverflow.com  
> **username_1**: @username_5 We have had [questions](http://astronomy.stackexchange.com/questions/10513/what-are-the-most-popular-computer-programming-languages-in-observational-astron) on Astronomy software before. This would fall under ["Setting up, using and maintaining your astronomy related equipment"](http://astronomy.stackexchange.com/help/on-topic).  
> **username_1**: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/42850/discussion-on-question-by-username_0-interfacing-fortran-programs-for-model-atmosp).  

---

## 1 answers

### Answer by username_0 on 2016-07-21. Score: 2

After looking into the various wrappers and ways Python and IDL work with FORTRAN I came to the conclusion that it is more of a preference which language you use. However as people continuously add astronomy support to Python this may change, but as of now, it seems to be a question of preference.

> **Comments:**
> **username_6**: I assume you know that you can use the [CALL_EXTERNAL.PRO](http://www.harrisgeospatial.com/docs/CALL_EXTERNAL.html) routine in IDL to call pre-compiled Fortran routines (as shared object libraries).  

---

