First time fortran-lang programmer : advice for a newbie?

For those who work with modern Fortran in the Earth sciences (with/on climate, ocean, vegetation or related numerical models, etc.), I can recommend “Introduction to Modern Fortran for the Earth System Sciences” by Chirila and Lohmann.

Tough question and the answer might depend on one’s background and also what one is trying to achieve. Before even discussing implementations in any language, I’d say you first need to have good foundations, the most important and farther-reaching one being numerical linear algebra. Assuming you just get into the field (say you’re in your first couple of years at university), some of the best resources I know of are:

  • Most of the books and lecture notes by Gil Strang, including Linear algebra for everyone, Introduction to linear algebra, or Computational Science and Engineering.
  • One of my personal favorite is Introduction to Applied Linear Algebra by Boyd and Vandenberghe, which is more recent. All the material taught in the book is directly actionable (i.e. you can actually do practical things with it) and, more importantly, they provide a pdf of the whole book for free. I’m also pretty sure you could fairly easily do all of the numerical exercises with what is currently available in stdlib.
  • Nathan Kutz and Steven Brunton, two friends of mine at UW in Seattle, also have pretty good books. It includes Data-driven modeling and scientific computing and Data-driven Science and Engineering (pdf link). Although the first one dates back to 2013 and makes extensive use of Matlab, I think most of what is covered in the book could be done with stdlib as well. The second one provides Python examples and they provide a pdf of the book for free. Steve and Nathan also have a collection of associated videos on their respective YouTube channels.

There are obviously many other good resources out there. These four however provide a very good balance for beginners between theoretical concepts, high-level algorithms and motivating examples. For more advanced material on numerical linear algebra, I would have to think a bit more. Likewise, for more numerical methods-oriented books (e.g. finite differences, finite elements, etc), it kind of depends on the field. I can however give my personal list later this week with a focus in incompressible computational fluid dynamics.

2 Likes

One good book is Numerical Mathematics by Quarteroni, Sacco and Saleri (or other variants, these guys write a lot). It has matlab snippet for all the procedures explained, and they can be easily translated into Fortran code, and it’s a great intro for numerical analysis.

1 Like

When NR was published in the mid 1980s, it was almost certainly the best and most comprehensive book on numerical methods and algorithms aimed at scientists, engineers, and other nonexperts. However, the authors failed to keep the fortran versions of the book up to date as the fortran language evolved and as new algorithms were added, so any current recommendations would need to point out that glaring fault.

I will leave this thread open for another week or two because it’s been evolving quite a bit and it’s interesting to see the differing opinions and resources for what a beginner to Fortran should do. Also Happy St. Patrick’s Day and thank you again for all your suggestions. I’m limited by budget, but I will see if I can source some of these texts through my local library.

The Numerical Recipes 2nd edition C and Fortran editions are available for free download from https://numerical.recipes/

It is still a useful - if dated - mathematical resource. I wouldn’t recommend it as a Fortran style guide.