Fortran is not a dead language. It runs every national weather service, the climate models, the computational fluid dynamics codes in aerospace, the quantum-chemistry packages, and the majority of the world's high-performance computing workloads. Introduction to Fortran Programming is a free, open textbook that teaches Modern Fortran from Hello, world to parallel supercomputer code, and explains why the language persists — array semantics, the absence of pointer aliasing, and the aggressive compiler optimization those properties permit.
It is written for physicists, chemists, engineers, and earth scientists who inherit Fortran in their research codes; for computational scientists who need performance beyond Python or MATLAB; and for anyone maintaining legacy FORTRAN 77 who wants to modernize it without breaking it. Forty chapters across ten parts move from installing a compiler through to running MPI code on a cluster. Part I covers the foundations — program structure, types, control flow, arrays, procedures, and modules. Part II covers the features that define Modern Fortran: derived types, pointers, generic interfaces, object-oriented programming, and the array intrinsics that give the language its expressive power. Part III addresses interoperability and the ecosystem, including binding to C, calling Fortran from Python, build systems, and libraries. Part IV is devoted to legacy code: reading fixed-form FORTRAN 77, understanding COMMON blocks and implicit typing, and migrating safely.
Part V applies the language to numerical methods — linear algebra, interpolation, quadrature, differential equations, and random numbers. Part VI covers formatted, unformatted, and stream I/O plus NetCDF and HDF5. Part VII is performance: profiling, cache behaviour, vectorization, compiler flags, and the optimizations that actually matter. Part VIII covers parallel programming across OpenMP, coarrays, and MPI, with GPU offloading. Part IX examines real-world Fortran in weather, climate, and engineering codes, and Part X looks at where the language is going.
A progressive project runs through every chapter: you build a two-dimensional heat-equation solver from a fifty-line serial program into a modular, validated, optimized, parallel simulation that writes publication-quality output. Every example is free-form Modern Fortran with implicit none, modules, and explicit intent, compiling cleanly with gfortran 10 and later, shown with its compile command and expected output. Fourteen appendices supply a syntax reference, intrinsic-function tables, compiler-flag guides, a FORTRAN-77 translation dictionary, a parallel-programming reference, and the complete solver code, alongside a full instructor guide.