This book is about using state-of-the-art software--in this case, the R language--to solve oceanographic problems. The use of computer software in this field is relatively new. Oceanography, the study of the physical and biological aspects of the ocean, clearly dates back thousands of years, when humans began to sail with their rafts to go fishing. But it’s only really developed as a modern science in the past century. During World War II, in fact, the US Navy decided to learn more about the oceans to gain operational advantages when fighting submarines or planning amphibious landings. Scientists such as Walter Munk, who is often referred to as the “Einstein of the Oceans,” developed algorithms and tables to predict surf conditions that were used during allied landings in North Africa and the Pacific theater, and on D-Day during the Normandy invasion .
Historically, computations were done manually, as in many other applied sciences. Even when digital computers started to become available, they were not easily accessible. Munk recalls that during the 1950s, when he was working with John Tukey on the spectrum analysis of ocean waves, he was able to access free computing time on an IBM 650 during the 2 a.m. to 7 a.m. shift. To make use of it, he had to leave home at 1:30 a.m., armed with a set of IBM punched cards .
Luckily, in today’s world, powerful computing tools are really for everyone, and students and researchers enjoy a wealth of resources to support their work. Dan Kelley, an experienced professor of oceanography twice nominated for teaching awards, has written this book to explain the modern practice of oceanographic analysis.
Oceanographers mainly use three programming languages: R, MATLAB, and Python. Kelley argues that Python and R are superior to MATLAB, both in ease of use and avoidance of proprietary lock-ins. Wisely avoiding the “religious war” of Python versus R, Kelley simply explains that he made R the focus of his book because he wrote a very complete package in R, called oce, which provides an exceptional toolbox for oceanographers. The idea is that with a stronger toolbox, scientists can spend more time doing science and less time programming.
Oceanographic analysis with R is thus two books in one. The first part, about 100 pages, provides an introduction to the R language. Chapter 1 compares R to other languages used in oceanography, while chapter 2 provides a tutorial with specific examples in oceanography, detailing syntax, graphics, probability and statistics, numerical methods, input and output, and debugging. The second part, chapters 3 to 5, describes the oce package and all kinds of hands-on oceanographic work, covering various subdisciplines such as hydrography, the acoustic propagation of sound in water, and tidal analysis. A section I found most interesting is the one in which algorithms published between 1934 and 1966, by eminent oceanographers such as Redfield, Riley, Wilson, and, obviously, Munk, are implemented in R/oce in an elegant and compact form.
The appendices provide some advice for those who must switch from a different programming language, such as MATLAB, or who handle geospatial projections.
To summarize, while this is clearly a book for specialists, it is very well written and highly usable by interested readers.