Fortran

Guide To Learn

1. Writing reusable code with functions and subroutines

Revisiting the cold front problem

In the previous chapter (section 2.2.2), I introduced the example of a cold front to illustrate the concepts of temperature gradient (change in space) and tendency (change in time). There, I asked you to calculate the change of temperature in Miami, considering the temperatures in Atlanta and Miami, the distance between them, and the speed of the front (figure 3.4). Figure […]

Refactoring the tsunami simulator

In the previous chapter, we made the first working version of what will become a realistic water wave simulator. Contained in a single program, it included data declaration and initialization, arithmetic expressions and assignment to calculate the solution, a do loop to advance the solution forward in time, and a print statement to output the results to screen. With 26 lines […]

Toward higher app complexity

Simple is better than complex. Complex is better than complicated.  –Tim Peters, The Zen of Python Although a mantra of Python, the opening quote applies well to Fortran and programming in general. We always aim for simple, whenever possible. This is especially true in software design, where we often deal with increasingly complex systems. Simple […]

Scroll to top