UniversitÓ di Bologna



Oxford University Press

This study presents concepts and problems in soil physics, and provides solutions using original computer programs. It provides a close examination of physical environments of soil, including an analysis of the movement of heat, water and gases. The authors employ the programming language Python, which is now widely used for numerical problem solving in the sciences. In contrast to the majority of the literature on soil physics, this text focuses on solving, not deriving, differential equations for transport. Using numerical procedures to solve differential equations allows the solution of quite difficult problems with fairly simple mathematical tools. Numerical methods convert differential into algebraic equations, which can be solved using conventional methods of linear algebra. Each chapter introduces a soil physics concept, and proceeds to develop computer programs to solve the equations and illustrate the points made in the discussion. Problems at the end of each chapter help the reader practise using the concepts introduced. The text is suitable for advanced undergraduates, graduates and researchers of soil physics, water resources management and hydrology. It employs an open source philosophy where computer code is presented, explained and discussed, and provides the reader with a full understanding of the solutions. Once mastered, the code can be adapted and expanded for the user's own models, fostering further developments. The Python tools provide a simple syntax, Object Oriented Programming techniques, powerful mathematical and numerical tools, and a user friendly environment.
Readership: Teachers, professors and students at universities, as well as researchers in private and public sectors.


2015. "The combination of theory and computer code make this a unique text and reference book for experienced scientists and students alike." - Markus Flury, Professor of Soil Physics and Vadose Zone Hydrology, Washington State University, USA.

2015. "Soil Physics with Python puts a wealth of knowledge about the quantitative functioning of a key environmental system, soils, into the reader's hand. This knowledge is readily operational through the provided code for the widely used open source language Python. The solutions cover a range of important processes, including the transfer of water, solutes, heat, and gases within soils as well as the soil-atmosphere coupling. Maybe most importantly, they entice the reader to expand and adapt the provided solutions and thereby capacitate him or her to implement and independently explore concepts of the still challenging soil physical processes." Kurt Roth, Professor, Institute of Environmental Physics, University of Heidelberg, Germany.

2016. "...Overall, I believe that the authors have rendered an extremely valuable service to the soil physics community with the publication of this nicely written and appealingly presented text, which I wholeheartedly recommend to soil physics students of all ages. I will definitely not hesitate to use it as a textbook in my own courses. If this great book were adopted widely, it would help train a new generation of soil physicists armed with a very solid understanding of what it really means to use computers to describe soil physical processes, and who would not be at the mercy of commercial software developers to satisfy their computational needs. At this stage, soil physics desperately needs such skilled people to move forward." Philippe Baveye, Professor, AgroParisTech, Paris, France.
Review of Soil Physics with Python: Transport in the Soil Plant Atmosphere. doi:10.2136/vzj2015.12.0162br. Vadose Zone Journal. doi:10.2136/vzj2015.12.0162br. PDF

Python versions and programs

The programs described in the book are downloadable here. The programs listed and described in the book were written for Python 2.7 and Visual Python 6. Python 2.7, libraries and modules needed to run the programs can be downloaded below. Many Python libraries for Windows (including Cython) can be found at the website http://www.lfd.uci.edu/~gohlke/pythonlibs/ or at the official Python website.
We are now in the process of converting all the programs for Python 3.7 and Visual Python 7. We recommend installing the Anaconda Python distribution Anaconda Python distribution with Python version 3.7 or later and Visual Python 7. It is recommended to run the programs by typing IDLE in the terminal of Anaconda, or using the IDE Spyder. From IDLE open the programs (usually the main.py file) and run it.
In the third column of the table below (Updates), updated versions (NEW) for Python 3.7 and Visual Python 7 are downloadable. For consistency with the printed book, the original code are retained and updates are presented separately.

Programs Python 2.7-Visual Python 6 Python 3.7-Visual Python 7
PSP_boxCounting PSP_boxCounting.zip PSP_boxCounting_NEW.zip
PSP_capillaries PSP_capillaries.zip PSP_capillaries_NEW.zip
PSP_basicProperties PSP_basicProperties.zip PSP_basicProperties_NEW.zip
PSP_sedimentation PSP_sedimentation.zip PSP_sedimentation_NEW.zip
PSP_gasDiffusion PSP_gasDiffusion.zip PSP_gasDiffusion_NEW.zip
PSP_thermalConductivity PSP_thermalConductivity.zip PSP_thermalConductivity_NEW.zip
PSP_heat PSP_heat.zip PSP_heat_NEW.zip
PSP_travelTimeAnalysis PSP_travelTimeAnalysis.zip PSP_travelTimeAnalysis_NEW.zip
PSP_waterRetentionFitting PSP_waterRetentionFitting.zip
PSP_columnWaterContent PSP_columnWaterContent.zip
PSP_Poiseuille PSP_Poiseuille.zip
PSP_unsaturatedConductivity PSP_unsaturatedConductivity.zip
PSP_MillerMiller PSP_MillerMiller.zip
PSP_infiltrationRedistribution1D PSP_infiltrationRedistribution1D.zip
PSP_triangulation PSP_triangulation.zip PSP_triangulation_NEW.zip
PSP_Criteria3D PSP_Criteria3D.zip PSP_Criteria3D_NEW.zip
PSP_Criteria3D_Cython PSP_Criteria3D_Cython.zip
PSP_evaporation PSP_evaporation.zip
PSP_coupled PSP_coupled.zip PSP_coupled_updated.zip
PSP_soluteTransportAnalytical PSP_soluteTransportAnalytical.zip
PSP_soluteTransportNumerical PSP_soluteTransportNumerical.zip
PSP_transpiration PSP_transpiration.zip
PSP_boundaryLayerConductance PSP_boundaryLayerConductance.zip
PSP_circle PSP_circle.zip
PSP_averageTair PSP_averageTair.zip
PSP_weatherData PSP_weatherData.zip
PSP_CelsiusFarhenheit PSP_CelsiusFahrenheit.zip
PSP_soilTemp PSP_soilTemp.zip
PSP_numericalDerivation PSP_numericalDerivation.zip
PSP_numericalIntegration PSP_numericalIntegration.zip
PSP_GaussElimination PSP_GaussElimination.zip
PSP_ThomasAlgorithm PSP_ThomasAlgorithm.zip
Download all programs PSP_ALL.zip
Additional programs               Zipped file with PDF
PSP_coupled_dateTime PSP_coupled_dateTime.zip
PSP_MonteCarloIntegration       PSP_MonteCarloIntegration.zip
PSP_Plot       PSP_Plot.zip
Software and packages       MS Windows Macintosh
Python 2.7.6 Python 2.7.6 for Windows Python 2.7.6 for Mac
Python 2.7.6 for 64-bit Python 2.7.15 for Windows Python 2.7.15 for Mac
Cython 2.7.6 for 64-bit Cython for Windows Cython for Mac
Visual Python Visual Python for Windows Visual Python for Mac
Matplotlib Matplotlib for Windows Matplotlib for Mac
Python Imaging Library PIL for Windows PIL for Mac
Six (for Matplotlib) Six for Windows
Pyparsing Pyparsing for Windows
Dateutil Dateutil for Windows