Part IX: Real-World Fortran
"Scientific software is written by scientists, not software engineers — which is both its great strength and its persistent weakness."
Knowing the language is not the same as knowing how the language is used to build real things. A production scientific code is not a clever program; it is a hundred thousand lines organized so that a team of people, most of whom will never meet, can extend it for decades without it collapsing under its own weight. It has a build system, a test suite, documentation, version control, and a directory structure that a newcomer can navigate. It is engineered. Part IX is about that engineering — the part of computational science that the physics courses never teach and that every research group needs.
We tour the anatomy of a genuine scientific code so you can find your way around one; we cover the software-engineering practices — testing, documentation, continuous integration, reproducibility — that separate trustworthy science from "it worked on my machine"; and then, in the capstone, everything you have learned comes together. The heat solver you began in Chapter 2 is now modular, validated, optimized, parallel, and visualized, and you present it exactly as you would a piece of research: problem, method, validation, results, performance. It is the proof that you did not just read this book — you can do the work.
What You Will Learn
Chapter 36 — Anatomy of a Real Scientific Code. How large Fortran projects are organized — drivers, solver and physics modules, I/O and utility modules — and how to navigate a hundred-thousand-line codebase without getting lost.
Chapter 37 — Testing, Documentation, and Software Engineering. Unit testing with pFUnit, regression tests, continuous integration, documentation with FORD, and the reproducibility practices that make computational results credible.
Chapter 38 — Capstone. Your complete parallel scientific simulation, from physics to publication: assembled, validated against an analytical solution, performance-analyzed, visualized, and written up as a paper would be.
How This Part Fits
Part IX draws together modules (Chapter 8), error handling (Chapter 13), the numerical core (Chapter 24), and the parallel implementations (Part VIII). The capstone is the terminus of the entire book and of the running project — everything converges here. After it, Part X lifts its eyes to where the language, and your career with it, are heading.
Time Investment
| Chapter | Title | Difficulty | Est. hours |
|---|---|---|---|
| 36 | Anatomy of a Real Scientific Code | Intermediate | 5 |
| 37 | Testing, Documentation, Software Engineering | Intermediate | 5 |
| 38 | Capstone: Your Complete Parallel Simulation | Advanced | 8 |
| Part IX total | ~18 hours |
Begin with Chapter 36 and the question every new hire faces on day one: how do you find your way around a hundred thousand lines of someone else's Fortran?