Question:

Fortran the best first language for a scientist?

by  |  earlier

0 LIKES UnLike

I'm a meteorologist and I have dabbled in programming and in Fortran, but its been several years. I want to write a multiple linear regression model to forecast long-term temperature anomalies based on dozens of predictors and I am thinking the best way to accomplish this is to learn how to program. Fortran is used widely in the field, so I am leaning toward this language, which also seems easier to learn. Any recommendations for or against this and any books that will serve as a good starting point?

 Tags:

   Report

5 ANSWERS


  1. Fortran is a very old programming language. I learned Fortran77 back in 1990-92.

    You may find it hard to find a book on Fortran because very few people use it.

    For the first language, I would suggest that you learn (VBA) Visual Basic For Application in Excel.

    The language is simple and you can make use of Excel spread sheet  for complex formulas and charts.

    Excel is widely use among Engineers because it is powerful.

    Finding a book on VBA is easier than finding a book on Fortran.




  2. First, there is still Fortran development going on in both the areas of new standards, compilers, and code development.  Secondly, there is a wealth of well vetted standard routines to perform a lot of the tasks that you will need for your modeling.  Thirdly, if your field of research still uses Fortran primarily and you are familiar with it, then I don't see any reason to steer you towards another language.

  3. Specific, specialty domains often have languages in which lots of code already exists. I did a bit of scientific programming in FORTRAN. I did actuarial programming in APL (ARIMA models for fun  and profit). However, unless there's a LOT of conveniently available, pre-existing programs and good support for new development in FORTRAN in your current environment, I recommend against FORTRAN.

    If you want good solid, mainstream language well-suited to mathematical and scientific tasks pick C. It has wide support, good, free compilers and development tools. There's a ton of existing, Open Source libraries for doing ALL manner of specialty tasks. C has the virtue that, if you decide to move forward (chronologically, historically speaking) to an object oriented paradigm, C++ is a very logical evolution, and you'll already know a great deal about the purely procedural aspects, datatypes, and control structures.

    The book from which I learned C is old and presumes a solid basic grasp of programming principles - would not be good primer. There is a site that claims to offer some free texts at:

    http://www.computer-books.us/c.php

    Can't vouch the quality, but did I mention "free"?

  4. If Fortran is the industry standard, then by all means learn it. However, you may also want to look into Python as a second language. It is making inroads in a number of fields due to the fact that it is free, flexible, easy to learn, very powerful, expressive, and extensible.

  5. There are essentially 2 things that go in favor of Fortran. One is that it has a huge body of existing routine and packages and existing programs, mostly due to the fact it was the first scientific programming language around, and reinventing the wheel is not that appealing if the only excuse is only that (insert flavor of the month new "hip" language name here) is currently more popular.

    The second reason, which may explain a bit of reason #1 in a sort of after the fact association, is that there is nothing faster and more efficient at crunching number than a properly written and suitably optimized Fortran code (with the exception of something written in assembly, which probably nobody has the 3 lifetime required to write anyway).

    Just be aware that Fortran's speed come with a price: it may be easy to learn, but quite difficult to master (think of it as a formula 1 car, fast but unforgiving). Pay extreme attention to common block mapping, that is where 90% of the errors will reside.

    Fortran is still going to be the language of choice for applications that are minimal in terms of user interface, and spend most of their time running in the background, crunching through massive amount of data, or performing iterations on a slow converging function.

Question Stats

Latest activity: earlier.
This question has 5 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.