Thursday, June 21, 2012

Listening to Donald Knuth talking

Two day ago, I attended to a seminar by Donald Knuth. A mythical figure who wrote some of the best -ever books in Science (The Art of Scientific Computing), implemented TeX (which I use for scientific writing and for anything that contains formulas: well I use LaTeX after having use TeX between '88 and '89), METAFONT, promotes literate programming, and claims that program should be read as literature (I kind of agree with it). He also wrote some other book that I will probably buy sometimes in the future, like Concrete Mathematics [pdf].

The occasion was SAT'12, i.e. a conference on satisfiability (look at wikipedia also here:, and the first part was on his interpretation of the subject.

I was not able, obviously I would say, to understand to core arguments DK presented, but at the same time, I could observe the structure and the organization of his talk.

First, for good or bad, he used everywhere a self-made notation, and self-developed tools. For good because things appeared magic, for bad because introducing extra efforts for understanding the meaning of what he was saying.
Second, he did not paid any attention to do "a nice presentation", in the sense of using the "right way" presentations' medium: his slides were full of words and numbers. No drawings and schemes to facilitate any understanding. No simplifications to convey the few concept that our mind can retain. However, like a mantra, we were eventually captured in the rite.

Differently from me, which I usually think in geometrical or analytical terms, his speech (and his mind ?) seems to stick with discrete numbers. Sequences of number and bytes. Like Pytagoras would have made, I believe.

One of the words that he repeated more was probably debug(ging). In fact any passage and many numbers he showed were finalized to control how the programs work (for obtaining the desired results, but also, to minimize computer memory use, i.e. work better). He relativized the meaning of program efficiency  which he declined in the sense of number of memory accesses, and not the time in which a code is executed, that could be affected by the  use of cache memory,  parallelization, compilers, and many other accidents.

After a brief interval, he answered to more general questions. This would have been mine, if I would have dared to make it: what do you think of object oriented program and techniques ?

However, he, in answering one of the questions, said that he prefer C-- over C++ that he was never able to learn proficiently. So, this confirmed my impression by  reading his works. Not only his mind is "numeric", in the sense of discrete numbers, but also "procedural".

But obviously, as the third principle of Psycohistory is not true ;-),

(There is a third underlying axiom of Psychohistory, which is trivial and thus not stated by Hary Seldon in his Plan: that Human Beings are the only sentient intelligence in the Galaxy.)

there could be something else out there. Anyway it was wonderful.

Wednesday, June 20, 2012

Old water contribution to streamflow: Insight from a linear Boussinesq model

This is a paper by Aldo Fiori one one of the most interesting issues in Hydrology, just appeared in Water Resources Research (Fiori, 2012). I already talk on this issue in the blog one year ago or so. Now Aldo comes back with a new paper which I will start to read avidily.

This is an excerpt from his  introduction, with some references:

"The understanding of the main physical processes which rule runoff generation in catchments is limited by the so-called ‘‘old water paradox.’’ The latter states that a (sometimes significant) fraction of the runoff volume after a rainfall event is pre-event, or ‘‘old.’’ Experiments with passive tracers suggest that most of the water contributing to stormflow is pre-event [Neal and Rosier, 1990; Sklash, 1990; McDonnell, 2003; Kirchner, 2003; Botter et al., 2010], with percentages often close to 75% of the total flow [Buttle, 1994]. This experimental evidence, which seems to invalidate most of the existing rainfall-runoff models, have been explained by means of a few mechanisms [Beven, 2002]. Among the latter is the propagation of pressure waves with high celerity [e.g., Beven, 1981], the capillary fringe-ridging hypothesis [see, e.g., Sklash and Farvolden, 1979 ; Gillham, 1984 ; McDonnell, 1990 ; Cloke et al., 2006; Fiori et al., 2007], and transmissivity feedback or macropore flow [McDonnell and Buttle, 1998]. The issue is still a matter of debate [McDonnell et al., 2010], and the principal physical processes controlling the release of old water and the partition between old and new water are still poorly understood. This problem has a crucial impact on several processes of interest in hydrology, for example, the development of meaningful rainfall-runoff models and the analysis of solute transport in catchments, which is often performed in terms of travel time distribution [e.g., McGuire and McDonnell, 2006]. Among the processes which may control the age of water we point here at the ‘‘potentially under-appreciated importance of old ground- water input to streams,’’ and ‘‘we thus need to have a better understanding of where and when old groundwater inputs are important’’ (both statements by McDonnell et al. [2010])."

On the side of pressure wave, I would add the reference to the work by Rasmussen et al., (2000) which refers to an experiment of percolation through saprolite, and the  paper by Torres et al. (1998) where these pressure waves are seen in the field (see also the Commentary by Torres 2002).

Certainly in producing a retardation in travel times concurs also the slowness of flow in unsaturated conditions (e.g. Lanni et al., 2012a,b which apparently talk about shallow landslides, but, in fact, talk also about hillslopes' residence time) but still they do not explain enough of the very large age of water in streams.

However,  measuring travel times and interpreting them is not all that easy (e.g. Rinaldo et al. 2011, with an important reference to Niemi, 1977), and maybe some measurements should be rethought.

Talking about vague references (to me, obviously), some work by Jean Yves Parlange, on fast propagation of water in soils, could be interestingly related to this topic.  But this is just a stub for future literature investigations (for instance the paper on sound waves referred here should be related to the fast propagation of pressure waves).

In any case, again a lot of stuff to read.


Beven, K. (1981), Kinematic subsurface stormflow, Water Resour. Res., 17, 1419–1424.

Beven, K. J. (2002), Rainfall-Runoff Modelling, The Primer, 360 pp., John Wiley, Hoboken, N. J.

Botter, G., E. Bertuzzo, and A. Rinaldo (2010), Transport in the hydrologic response: Travel time distributions, soil moisture dynamics, and the old water paradox, Water Resour. Res., 46, W03514, doi:10.1029/ 2009WR008371.

Buttle, J. M. (1994), Isotope hydrograph separations and rapid delivery of pre-event water from drainage basins, Prog. Phys. Geogr., 18(1), 16–41.

Cloke, H. L., M. G. Anderson, J. J. McDonnell, and J. P. Renaud (2006), Using numerical modelling to evaluate the capillary fringe groundwater ridging hypothesis of streamflow generation, J. Hydrol., 316, 141–162.

Fiori, A., and D. Russo (2007), Numerical analyses of subsurface flow in a steep hillslope under rainfall: The role of the spatial heterogeneity of the formation hydraulic properties, Water Resour. Res., 43, W07445, doi:10.1029/2006WR005365.

Fiori, A. (2012), Old water contribution to streamflow: Insight from a linear Boussinesq model, Water Resour. Res., 48, W06601, doi:10.1029/2011WR011606.

Gillham, R. W. (1984), The capillary fringe and its effect on water table response, J. Hydrol., 67, 307–324.

Kirchner, J. W. (2003), A double paradox in catchment hydrology and geo- chemistry, Hydrol. Processes, 17, 871–874.

Lanni C., J.J. McDonnell, L. Hopp, R. Rigon, 2012. Hydrological controls on shallow landslide triggering: the role of soil depth and bedrock topography. Earth Surface Processes and Landforms, in print (see

C. Lanni, M. Borga, R. Rigon, and P. Tarolli, Modelling catchment-scale shallow landslide occurrence by means of a subsurface flow path connectivity index, Hydrol. Earth Syst. Sci. Discuss., 9, 4101-4134, 2012,

McDonnell, J. J. (1990), A rationale for old water discharge through macro- pores in a steep, humid catchment, Water Resour. Res., 26 (11), 2821– 2832.

McDonnell, J. J., and J. M. Buttle (1998), Comment on ‘‘A deterministic empirical model of the effect of the capillary-fringe on nearstream area runoff. 1. description of the model’’ by Jayatilaka CJ, Gillham RW (J. Hydrol. 184 (1996) 299–315), J. Hydrol., 207, 280–285.

McDonnell, J. J. (2003), Where does water go when it rains? Moving beyond the variable source area concept of rainfall-runoff response, Hydrol. Processes, 17(9), 1869–1875.

McDonnell, J., et al. (2010), How old is the water ? Open questions in catchment transit time conceptualization, modelling and analysis, Hydrol. Processes, 24(12), 1745–1754.

McGuire, K. J., and J. J. McDonnell (2006), A review and evaluation of catchment transit time modelling, J. Hydrol., 330, 543–563.

Niemi, A. J. (1977), Residence time distribution of variable flow processes, Int. J. Appl. Radiat. Isotopes, 28, 855–860.

Neal, C., and P. T. W. Rosier (1990), Chemical studies of chloride and sta- ble oxygen isotopes in two conifer afforested and moorland sites in the British uplands, J. Hydrol., 115(1–4), 269–283.

Rasmussen, T.C., Baldwin, R.H. Jr.,  Dowd, J. F., and  Williams, A.G., Tracer vs. Pressure Wave Velocities through Unsaturated Saprolite, Soil Sci. Soc. Am. J. 64:75–85 (2000).

Rinaldo, A. Beven, K. J., Bertuzzo, E., Nicotina, L., Davies, J., Fiori, A., Russo D. and G. Botter G., Catchment travel time distributions and water flow in soils, Water Resources Research, vol. 47, p. -, 2011.

Sklash, M. G., and R. N. Farvolden (1979), The role of groundwater in storm runoff, J. Hydrol., 43, 45–65.

Sklash, M. G. (1990), Environmental isotope studies of storm and snowmelt runoff generation, in Process Studies in Hillslope Hydrology, edited by M. G. Anderson and T. P. Burt, pp. 401–435, John Wiley, N. Y.

Torres R, Dietrich WE, Montgomery DR, Anderson SP, Loague KM. 1998. Unsaturated zone processes and the hydrologic response of a steep, unchanneled catchment. Water Resources
Research 34(8): 1865– 1879.

Torres R., A threshold condition for soil-water transport, Hydrol. Process. 16, 2703–2706 (2002) DOI: 10.1002/hyp.5060

Tuesday, June 19, 2012

Stochastic Soil Water Dynamics, and Ecohydrology, According to Amilcare Porporato

Last March 19 and 20, 2012, was there was the occasion to celebrate Ignacio Rodriguez-Iturbe' 70. In Princeton a lot of friends met and some interesting seminars on the topic covered and/or initiated by Ignacio took place. All of this fantastic material should be available soon on Princeton's web sites. Meanwhile they format the videos, I am summarizing here the first of the talks, the one given by Amilcare Porporato (on the right  in the picture - with purple jacket- with Eric VanMarcke on the left).

The idea behind Amilcares (Ignacio's own, and others like Luca Ridolfi, Paolo d'Odorico and Andrea Rinaldo, naming just the seniors of the group) is assuming a stochastic forcing of the soil water balance as given by rainfall (Ignacio worked a lot on  random model of precipitation, e.g., see the classic Random Function and Hydrology with Raphael Bras) incorporated into a probabilistic description of soil water balance. Soil moisture, in fact, is thougth as the key driver of ecohydrological, biogeochemical and hydrometeorological processes and what comes as a consequence. According to Amilcare, the progenitor of this research has to be found in the paper by P. Eagleson, 1978, and followed by some other relevant contribution by Bras and Cordova, 1981, Rodriguez-Iturbe et al., 1991, Milly, 1993 and Rodriguez-Iturbe et al., 1999.

To these pioneering works followed several works of "generalizations": D'Odorico et al., 2000, Porporato et al., 2006, containing the interannual variability and the "superstatistics"; Salvucci et al., 2000, with experimental verifications; Laio et al., 2001 with a more realistic loss function; Porporato et al., 2004 with classification of soil water balance; Daly et al., 2004, introducing arguments on the plant photosynthesis; Ridolfi et al., 2005,2006 including the water table and the capillary rise.

In the whole set of these papers the strategy followed was:

• Extract low-dimensional components of the dynamics;

• Surrogate external forcing and internal heterogeneities (high-dimensional components) with suitable noise (probabilistic description)

• Use minimalist models:
– analytical solutions;
– general relationships among fundamental groups;
– Coupling with other processes (plant,nutrients, etc.)

• Interpreting more complete simulations and schemes

Other papers cited in the presentation were: Daly et al. AWR, 2008; Gollan et al., 1985 (about the stomata response); Federer, 1979 (about a simple plant-atmosphere model), Porporato et al.,  2004, Daly and Porporato, 2010 (studying analitical steady state solutions of the master equation derived from the application of the assumptions above).

All the previous papers deal with local, point dynamics. However, some papers also have some spatial dynamics and/or descrition. Just looking at the vertical profile: Celia et al., 2001; Laio, 2006, D'Odorico and Ridolfi, 2000. Looking at the spatial soil moisture variability and about scaling of soil moisture: Rodriguez-Iturbe et al., 1995; Isham et al., 2006; about spatial Poisson processes: Manfreda et al., 2006 ; Using a Reynolds averaging approach: Katul et al., 2002; Albertson and Montalto, 2003; looking at the role of topography: Caylor et al., 2007; Instanbulluoglu and Bras et al., 2006.

Some papers, finally, tried to link soil moisture with the rainfall processes and precipitation recycling (D'Odorico and Porporato, 2004; Porporato and D'Odorico, 2004)

The above about the recent past: enough, I think for a novel reader.

However, the more recent work try to embrace a complexity of interactions of which an example is the work he made with Vico: Vico and Porporato, WRR 2010; AWR 2011a,b; Manzoni and Porporato, EOS (2006), Ecology (2012) an other papers of which you can find the reference and sometimes the pdf below.


Albertson, J. D., and N. Montaldo, Temporal dynamics of soil moisture variability: 1. Theoretical basis, Water Resour. Res., 39(10), 1274, doi:10.1029/2002WR001616, 2003.

Bras, R. L. and J. R. Cordova (1981), Intraseasonal water allocation in deficit irrigation, Water Resour. Res., 17(4), 866–874, doi:10.1029/WR017i004p00866 ?

Caylor K.K, Manfreda S. and Rodriguez-Iturbe, I., On the coupled geomorphological and ecohydrological organization of river basins, Advances in Water Resour., 28, 69-86, 2005

Daly, Edoardo, Amilcare Porporato, Ignacio Rodriguez-Iturbe, 2004: Coupled Dynamics of Photosynthesis, Transpiration, and Soil Water Balance. Part II: Stochastic Analysis and Ecohydrological Significance. J. Hydrometeor, 5, 559–566

Daly E. Oishi A.C., Porporato A., Katul G., A stochastic model for daily subsurface CO2 concentration and related soil respiration, Advances in Water Resour., 31,987-994, 2008

Daly and Porporato, Effect of different jump distributions on the dynamics of jump processes, Phys. Rev. E., 2010

D'Odorico, P., L. Ridolfi, A. Porporato, and I. Rodriguez-Iturbe (2000), Preferential states of seasonal soil moisture: The impact of climate fluctuations, Water Resour. Res., 36(8), 2209–2219, doi:10.1029/2000WR900103.

D'Odorico, P. and Porporato, A., Preferential states in soil moisture and climate dynamics, PNAS, 2004

Eagleson, P., Climate, Soil, and Vegetation 3. A simplified model of soil moisture movement in the liquid phase, Water Resour. Res., 14(5), 1978

Federer, C. A. (1979), A soil-plant-atmosphere model for transpiration and availability of soil water, Water Resour. Res., 15(3), 555–562, doi:10.1029/WR015i003p00555.

T. Gollan, N. C. Turner and E. -D. Schulze, The responses of stomata and leaf gas exchange to vapour pressure deficits and soil water content, Oecologia, 65 (3), 365-362, 1985

Guswa, A. J., M. A. Celia, and I. Rodriguez-Iturbe, Models of soil moisture dynamics in ecohydrology: A comparative study,Water Resour. Res., 38(9), 1166, doi:10.1029/2001WR000826, 2002

Isham, V., Cox, D.R., Rodríguez-Iturbe,  I., Porporato, A., Manfreda, S. (2005).
Mathematical characterization of the space-time variability of soil moisture, Proceedings
of the Royal Society A: Mathematical, Physical and Engineering Sciences, 461(2064),

Istanbulluoglu, E. and R. L. Bras (2006), On the dynamics of soil moisture, vegetation, and erosion: Implications of climate variability and change, Water Resour. Res., 42, W06418, doi:10.1029/2005WR004113

Katul, G., P. Wiberg, J. Albertson, and G. Hornberger (2002), A mixing layer theory for flow resistance in shallow streams, Water Resour. Res., 38(11), 1250, doi:10.1029/2001WR000817.

Katul, G., Porporato, A., and Orem R., Stochastic Dynamics of Plant-Water Interactions., Annu. Rev. Ecol. Evol. Syst. 2007. 38:767–91

Laio, F., A. Porporato, C. P. Fernandez-Illescas, and I. RodriguezIturbe, Plants in water-controlled ecosystems: Active role in hydrologic processes and response to water stress, IV, Discussion of real cases, Adv. Water Resour., 24(7), 745–762, 2001.

Laio, F. (2006), A vertically extended stochastic model of soil moisture in the root zone, Water Resour. Res., 42, W02406, doi:10.1029/2005WR004502.

Manfreda, S. and I. Rodríguez-Iturbe (2006), On the spatial and temporal sampling of soil moisture fields, Water Resour. Res., 42, W05409, doi:10.1029/2005WR004548.

Manzoni, A., and Porporato, A., Soil Biology and Biochemistry, A theoretical analysis of nonlinearities and feedbacks in soil carbon and nitrogen cycles, Volume 39, Issue 7, July 2007, Pages 1542–1556 (

Manzoni, S.,  Schimel, J.P, and Porporato, A., Responses of soil microbial communities to water stress: results from a meta-analysis, Ecology, 2012, (doi: 10.1890/11-0026.1)

Milly, P. C. D. (1993), An analytic solution of the stochastic storage problem applicable to soil water, Water Resour. Res.,29(11), 3755–3758, doi:10.1029/93WR01934
Porporato, A. & D'Odorico, P. (2004), State transitions driven by state-dependent Poisson Noise, Phys. Rev. Lett. 92

Porporato, A., Daly, E., Rodriguez-Iturbe, I., Soil Water Balance and Ecosystem Response to Climate Change, The American Naturalist, 164(5), 2004

Porporato, A. , Vico, G. , Fay, Philip A., Superstatistics of hydro-climatic fluctuations and interannual ecosystem productivity, NAL, 2006

Rigby, J.R and  Porporato, A., Simplified stochastic soil-moisture models: a look at infiltration, Hydrol. Earth Syst. Sci., 10, 861-871, 2006

Rodriguez-Iturbe, I., P. D'Odorico, F. Laio, L. Ridolfi, and S. Tamea (2007), Challenges in humid land ecohydrology: Interactions of water table and unsaturated zone with climate, soil, and vegetation, Water Resour. Res., 43, W09301, doi:10.1029/2007WR006073. ???

Rodriguez-Iturbe, I., D. Entekhabi, and R. L. Bras (1991), Nonlinear Dynamics of Soil Moisture at Climate Scales: 1. Stochastic Analysis, Water Resour. Res., 27(8), 1899–1906, doi:10.1029/91WR01035
Rodriguez-Iturbe, I, A. Porporato, L. Ridolfi, V. Isham, and D.R. Cox, Probabilistic modelling of water balance at a point: the role of climate, soil and vegetation, PRSA, 1999

Ridolfi, L., P. D'Odorico, F. Laio, S. Tamea, and I. Rodriguez-Iturbe (2008), Coupled stochastic dynamics of water table and soil moisture in bare soil conditions, Water Resour. Res., 44, W01435, doi:10.1029/2007WR006707.

Rodriguez-Iturbe, I, Gregor K. Vogel, R. Rigon, D. Entekhabi, F. Castelli and A. Rinaldo, On the spatial organization of soil moisture fields, Journal of Geophysical Research, 22(20), 2757-2760, 1995

Salvucci, G. D. (2001), Estimating the moisture dependence of root zone water loss using conditionally averaged precipitation, Water Resour. Res., 37(5), 1357–1365, doi:10.1029/2000WR900336

Tamea, S., F. Laio, and L. Ridolfi (2005), Probabilistic nonlinear prediction of river flows, Water Resour. Res., 41, W09421, doi:10.1029/2005WR004136.

Vico, G. and A. Porporato (2010), Traditional and microirrigation with stochastic soil moisture, Water Resour. Res., 46, W03509, doi:10.1029/2009WR008130.

Vico, Giulia and Porporato, Amilcare, From rainfed agriculture to stress-avoidance irrigation: I. A generalized irrigation scheme with stochastic soil moisture, Advances in Water Resources, vol 34 no. 2 (2011), pp. 263--271.

Vico, G. and Porporato, A., From rainfed agriculture to stress-avoidance irrigation: II. Sustainability, crop yield, and profitability, Advances in Water Resources, vol 34 no. 2 (2011), pp. 272--281.

Sunday, June 10, 2012

91 video tutorial for learning R

You can find them at:


The scientific "validation" of hydrological models

The title is controversial. Obviously both in epistemology and hydrology. A Reviewer of one of my recent papers asked for us taking away any recurrence on the word validation. The same asked a coauthor of another paper.  But, since I am not afraid of the word,  let's agree that with this word I do not mean anything ontological but instead  I try to indicate a grid of rules that identify a process of scientific knowledge accumulation which  could be accepted by the community of scientists as a "good practice" to do science.

The entire presentation of the talk can be found, as usual on SlideShare, here. In this post, I summarize instead its main points.
I did not face the problem directly but analyze two models, the GIUH model (in its width function version) and the Topmodel (Beven and Kirkby, 1979).

What I observed is that they gained the status of good scientific model from:

- having been tested by different researchers group independently  from the theoretical point of view: they tested the consistence of the assumptions on which the models were built, and their formal mathematical structure (the simplicity of the algorithms involved allowed in fact multiple implementation of the theories);
- field campaigns that tested the correspondence of model's results with measures (with respect to hydrograph reproduction);

In the case of GIUH,

-  Furthermore   the assumptions  was  derived from some general physical principle (e.g. minimum energy dissipation theories).

I also showed that both the models are wrong with respect to some set of measures, i.e. tracer measures for the GIUH, and measures of soil moisture distributions in hillslopes for the Topmodel. Nevertheless, I argue that they remain good models, when applied respecting their assumptions, and for limited scopes.  Their generalizations, on the other hands, are indicated by their own failure.

So models that can be falsified (in Popperian style) are good scientific examples, and what is validated is a shared procedure that make our knowledge to increase about phenomena. These models, in particular, even falsified remains good tools, (which, however, should not be abused) because built with simplicity in mind (remember the Occam's razor), and therefore maintain a reasonable success in describing a well defined set of users' cases.

In fact we deliberately do simplifications and errors in hydrology, with the scope to obtain simple and fast models, on the opposite of complex and slow ones, with the hope that their errors cancel each other (“ You cannot deny that our universe is not a chaos; we discern in it beings, things, stuff that we name with words. These beings or  things are forms, structures endowed with a certain stability; they fill a certain portion of space and perdure for a certain time", R. Thom, 1975) because  reality has built-in scales, and different laws at different scales.
When searching  for reconstructing a unique hydrograph at the closure of a basin, it could be reasonable to think that this canceling of errors can happen for the nature itself of the process which collects information (water) all around a basin and concentrates (sums) it at the outlet (as discharge).  In other cases, that simplifications work and that errors cancel could not be so heuristically defendable.

In general, when building our models, we should have a clear and disenchanted vision of their limits,  a theory for their errors, and the idea of the measures (if we do not have controlled experiments) to falsified them. The best would be to have a theory correlating the information (of the signal) we need to reproduce  with the complexity of the model needed to get it, so we do not exaggerate with detailed descriptions of the (micro-)physics, at finer scales, which are not required at the larger ones.

However, if models need to be simple they should not be simpler (as A. Einstein said). Therefore we should give attention to those phenomena which are not well described and add complexity when needed. In turn, when adding complexity,

- any model addition should be tested independently and not just on the basis of the benchmark quantities (like discharge) that were already investigated by testing the simpler model (i.e., if we add discharge with a snow-melt model, we should test directly and independently the snow-model before, and have the certainty -!- that snow was really present in the catchments, and that it, in fact, did melt).

A further note regards the code.  Meanwhile more complexity is required, models becomes more complicated in their equations,  and more and more models' code becomes the "real thing" that is used to do prognoses (the real model).  Therefore models' code should be open, and open to third parties inspections. I talked other times on this issue in this blog (e.g., and I will not repeat myself again.

I finished my talk with some rhetorical polemics with those (great indeed) hydrologists who discuss restless about validation and uncertainty, instead of trying to do better models. But this was actually just for fun.