Introduction
Fortran is the oldest programming language still in use today. Through the 1970s it was used for most computing, and it still remains the dominant language of high-performance and numerical applications in science and engineering--linear algebra, fluid dynamics, orbital mechanics, weather and ocean prediction, and others. If you looked up a weather forecast this morning on your app or in the newspaper, you’ve used Fortran yourself! Virtually all weather, ocean, and climate prediction models are written in Fortran. It’s natively parallel, has strong array facilities, and allows various programming styles including procedural, object-oriented, and functional. This tried and true language has an international (ISO) standard and is being actively revised every several years, the latest revision being Fortran 2018.
This ebook features three chapters from my own book, Modern Fortran: Building Efficient Parallel Applications, which will guide you though core features of Fortran by building a simple tsunami simulator. The first part will teach you the very basics of the language--variables, data types, control flow, and arithmetic operations and assignments. At the end of it, you’ll have a minimal working application. In the second part, you’ll learn all you need to know about Fortran’s functions and subroutines for better organization and reuse of your code. Finally, in the third part, you’ll learn about Fortran modules which will allow you to package your variables, functions, and subroutines, as well as distribute your code as a software library. At the end of this ebook, you’ll have gained the basic (and marketable!) skills you need to write in-demand, modern Fortran applications.