Friday, April 17, 2015

The man who planted trees -part I

It was a few years ago that I came across the beautiful and inspiring movie  “The man who planted trees”  (in italian here)[1] . 
Read it or watch to it, it is a pleasure of a eco-novel which I find particularly adapt to Spring time. 
The novel raises several eco-hydrological issues, and in particular it poses a question to me: does planting trees change so greatly the hydrological cycle (and the ecosystem) ?  

Ecosystem Services (from the hydrological point of view)

From another point of view, a modern way to ask the same  question would be: which kind of ecosystem services can be obtained with a careful management of the environment, and  when the hydrological cycle is positively managed ? And, what kind of ecosystems services are activated or dumped as a consequence of soil cover change ?

Ecosystem services cover a broad range of agents, but in this case, I would restrict the focus to  understand the interactions between waters and vegetation (and, possibly opened to consider the carbon fluxes). 

It is believed that vegetation can serve for natural hazard and water cycle regulation. There is a generic consensus that forest ecosystems play a significant role in the prevention of soil erosion.  Specifically by cutting surface run-off and storing water they decrease the effects of extreme weather events and natural hazards like floods, storms, avalanches and landslides. Also they are believed to have an action of filtering waters producing cleaner waters and providing  groundwater recharge.  But how much of these beliefs can be quantitatively assessed ? 

The questions can be moved from forests to agricultural landscapes, a provisioning service themselves, without changing much of the hydrological aspects. The spatial unit, in this case is the cadastral unit, or something similar to it. As well as forests, agricultural fields can contribute to the carbon budget, to water quality, especially when they are riparian. 

Again the question is: how can we quantify it, in order to guide landscape management, precision agricolture, and doing forecasts on the effects of changes of soil use (and BTW the impacts of climate change) ?

So, why do not ask to  hydrologists [2] ;-) what they can say about the effects of vegetation on the hydrological cycle ? 

To any hydrologist it is clear that the key hydrological effects are related to evapotranspiration, of which I discussed in several posts. Dealing with it  there are several aspects to account for, among which I name three:

- Canopy transpiration (which can be differentiated in several layers: for instance, grass and plants are different for the way they uptake water). Usually it depends on the height of canopy, leaf area index (LAI), root depth, phenology  and plant's functional  specific parameters. Now there is quite an amount of literature on those parameters, but its real robustness and applicability is unknown.
Plants are different, but  plant types are really so different or it does exists an underlying optimization principle which ever optimize the use of water resources and therefore evapotranspiration for an ecosystem ? Some experimental evidence is going in this direction: but it is clearly a matter of equilibrium and time scales. Among plants there are differences, but it is not certainly possible to say that, for example, pine woods transpire more than larches: too many factors are playing a role. Dimension, characteristic and locations of the trees play possibly a major role than tree species and, this case may be it is the tree specific phenology the major source of difference among trees that share the same landscape.

- Soil evaporation (from bare soil and from below the canopy). It could appear pretty simple with respect to the thermodynamics of plants. Somehow pretty simple. However, whilst it affects only the surface layer, it is controlled by the water potential gradient of the soil column if atmospheric demand is sufficient. As recent papers by Dani Or and coworkers showed.   So very it is very coupled with bottom conditions. Evaporation from soils,  with their own biology,  is not always less than transpiration. In many conditions could be more, and separating it from canopy behaviour is not as simple. 
However, also the interactions,  with the overlaying atmosphere cannot be given for easily estimated. Either for soils and plants.

- Therefore, it is necessary to considering  a better description of the Boundary layer turbulence (which can be treated at different levels of approximations, also depending on the considered time and spatial scales).
 Per se, ET is a flux, a molecular diffusion driven flux, that we have at the surface of soil, of leaves, of water, or when it comes from sublimation, of snow or ice. The flux obeys to the laws of irreversibile thermodynamics processes, and is commanded by gradients of chemical potential. However, ET, as treated in hydrology, is  lumped together with transport, and theoretically derived from conceptualisations of the fluxes conceived a few decades ago. So, even if not simple, better quantitative estimates could derive by addressing fluxes and transport separately and numerically, which could actually benefit both the description of  stomatal and soil resistances, and of aerodynamics.

[1] - Giono, J. - The man who planted trees - L’uomo che piantava gli alberi, 1953
[2] - And I asked in particular to Giacomo Bertoldi

Wednesday, April 15, 2015

Best practices for Scientific Computing

I was actually looking for other stuff, but I across this paper on Plosone entitled:

Best practices for Scientific Computing, by Wilson et al., 2014

Enjoy it ! One of the Authors, Titus Brown has a blog that we follow (see the Related blog)

Wednesday, April 8, 2015


To who is learning Java I also suggest to apply to the two courses at Coursera called

They are the product of the work of  Kevin Wayne and Robert Sedgewick, and are a good example of how to implement algorithms in Object Oriented language (and in a scientific context), and examples are in Java. I listen to some of the classes and they are nicely implemented, even if programming always require a specific application, i.e. writing yourself the code, it is a nice exercise even just to listen to. Particularly interesting I found the use of generics and data structures, if you do want just to understand when it can be interesting to use them.

On Sedgewick's site, additional material can also be found.

Wednesday, April 1, 2015

Five steps into Reproducible Research

I am worried about Wuletawu being worried about the steep path in doing reproducible research. However,  taking inspiration from Tim-Berners Lee  five star/steps into open data I tried to implement a similar five steps sequence for RR:

@ Do not wait! Make your stuff available on the Web (whatever format) under an open license^1.

@@  Make it available with documentation (e.g. a README file for any data set and for any model)

@@@ Provide examples of runs, and give some reference. Structure your documentation. Include figures and their making. 

@@@@ Use URLs and providers like Github to store code and data, so people can point at your stuff, and browse it freely^2

@@@@@ Maintain a user group (and answer to questions when asked). Provide any run you do on the web with the appropriate metadata^3,4. 

Then you start to be a professional  of RR and you can face more complex task, and using structured tools like those presented in the COURSERA classes brought to my attention by Wuletawu.

1- Same as Tim Berners-Lee - Waiting to have it in better shape will delays the publication forever, and your contribution will be lost (like tears in rain).  
2 - Almost the same as in Tim Berners-Lee

Tuesday, March 24, 2015

Probabilità in pillole

Per imparare bene la teoria delle probabilità, non c'e' dubbio lo studio approfondito di qualche buon libro è necessario. Per una piccola bibliografia personale, si veda il post "Learn Statistics and Probability!" Ma per una ripasso in pillole, ecco quanto detto e fatto a lezione:

1 - Introduzione (Audio 2015: 6Mb)
2 - Assiomi (Audio 2015: 12.6 Mb)
3 - Domini discreti e Spazi metrici (Audio 2015: 11.3 Mb)
4 - Distribuzioni uniforme e gaussiana univariate (Audio 2015: 13.9 Mb)
5 - Distribuzioni univariate di interesse idrologico (Audio 2015: 7.9 Mb)
6 - Random sampling
7 - Il teorema del limite centrale e la legge dei grandi numeri (Audio 2015: 4.2 Mb)

Altre risorse:

Le slides tutte assieme: Un ripasso di probabilità.

Audio 2014:

I Assiomi, Bayes etc. - 22Mb;
II - Distribuzioni di Probabilità - 5.6 Mb).

Qui un sintetico manualetto con alcuni temi "non standard" (dovuto a Falcioni Vulpiani).

Monday, March 23, 2015

Le precipitazioni

Ecco le slides divise sulle precipitazioni divise per argomenti.

1  - La circolazione generale e i gradienti barici
2  - Il gradiente adiabatico di temperatura
3  - La stabilità atmosferica
4  - L'evoluzione giornaliera dello strato limite
5  - Meccanismi di formazione delle precipitazioni

6  - Un po' di riassunto e di sintesi (Audio 2015. 18.3 Mb)
7  - Le caratteristiche delle precipitazioni al suolo (Audio 2015. 12.3 Mb)
8  - Le precipitazioni estreme e le curve di possibilità pluviometrica (Audio 2015. 14.9 Mb)
9  - La distribuzione di Gumbel (Audio 2015. 9.9 Mb)
10 - Gumbel - Metodo dei momenti (Audio 2015. 5 Mb)
11 - Gumbel - Massima Verosimiglianza (Audio 2015. 13.8 Mb)
12 - Gumbel - Minimi Quadrati (Audio 2015. 3.8 Mb)
13 - Test di Pearson (Audio 2015. 6.5 Mb)
14 - Chi quadro (Audio 2015. 5.3 Mb)
15 -  GEV (Audio 2015. 8.8 Mb)
16 -  Calcolo delle linee segnalatrici di possibilità pluviometrica con R^3
17 - - La misura delle precipitazioni (e gli errori della misura, secondo Lanza et al., 2005) - Audio 2014 (12.4 Mb);

Gli audio del 2014:

6/7 - Audio: Generalità (33.9 Mb);
8 - Precipitazioni estreme (19.7 Mb);
9 /11 - Gumbel Distribution, metodo dei momenti, metodo della massima verosimiglianza (13.2 Mb);
12 - Metodo dei minimi quadrati (5.3 Mb).
14 - Chi Quadro (20.7 Mb)


^1 - Il mio post su R può servire per partire. Sul sito di R si trovano varie risorse per imparare ad usare R. Un gruppo italiano di utenti di R è Rante e li' vi si trova anche un manuale introduttivo ad R.  Tra gli altri strumenti, in inglese, ci sono quelli che potete trovare qui.   I contributi ad R si susseguono così velocemente che ogni giorno ce ne sono di migliori. Quindi tenete d'occhio il web. C'e' anche una versione del libro di Matloff, The Art of R programming.

^2 -  Trovate al link il file delle portate 1990-2005.txt  e il file della Pluviometria di Paperopoli (Unix/Mac o  MS-Windows) utilizzati a lezione. Qui, invece,  lo script di R con tutti i comandi eseguiti nella lezione del 2 Aprile 2012

^3 Lo script di R relativo alla lezione del 19 Aprile 2012
     Gli script di R relativi alla lezione del 25 Marzo 2013: I e II
     Lo script di R della lezione del 15 Aprile 2013 relativi alla derivazione delle curve di possibilità    pluviometrica. Qui il notebook creato con knitr dello stesso script

Gli script di R (da eseguire in sequenza) per il calcolo delle curve di possibilità pluviometrica di Paperopoli.

Esempi di relazione e materiale correlato

Una relazione sulle curve di possibilità pluviometrica
- Di Aaron Iemma (qui): in realtà bastava citare la teoria statistica, ma Aaron ha voluto essere qui un pò scholar. Buona anche perchè Aaron ha fornito una serie di script per riprodurre tutto quanto ha fatto, mutata mutandis (qui gli script).


Albertson, J., and M. Parlange, Surface Length Scales and Shear Stress: Implications for Land-Atmosphere Interaction Over Complex Terrain, Water Resour. Res., vol. 35, n. 7, p. 2121-2132, 1999

Burlando, P. and R. Rosso, (1992) Extreme storm rainfall and climatic change, Atmospheric Res., 27 (1-3), 169-189.

Burlando, P. and R. Rosso, (1993) Stochastic Models of Temporal Rainfall: Reproducibility, Estimation and Prediction of Extreme Events, in: Salas, J.D., R. Harboe, e J. Marco-Segura (eds.), Stochastic Hydrology in its Use in Water Resources Systems Simulation and Optimization, Proc. of NATO-ASI Workshop, Peniscola, Spain, September 18-29, 1989, Kluwer, pp. 137-173.

Burlando, P. e R. Rosso, (1996) Scaling and multiscaling Depth-Duration-Frequency curves of storm precipitation, J. Hydrol., vol. 187/1-2, pp. 45-64.

Burlando, P. and R. Rosso, (2002) Effects of transient climate change on basin hydrology. 1. Precipitation scenarios for the Arno River, central Italy, Hydrol. Process., 16, 1151-1175.

Burlando, P. and R. Rosso, (2002) Effects of transient climate change on basin hydrology. 2. Impacts on runoff variability of the Arno River, central Italy, Hydrol. Process., 16, 1177-1199. 

 Coles S.,‘‘An Introduction to Statistical Modeling of Extreme Values, Springer, 2001

 Coles, S., and Davinson E., Statistical Modelling of Extreme Values, 2008

Foufula-Georgiou, Lectures at 2008 Summer School on Environmental Dynamics, 2008

Fréchet M., Sur la loi de probabilité de l'écart maximum, Annales de la Société Polonaise de Mathematique, Crocovie, vol. 6, p. 93-116, 1927

Gumbel,  On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling, Phil. Mag. vol. 6, p. 157-175, 1900

 Houze, Clouds Dynamics, Academic Press, 1994

Kleissl J., V. Kumar, C. Meneveau, M. B. Parlange, Numerical study of dynamic Smagorinsky models in large-eddy simulation of the atmospheric boundary layer: Validation in stable and unstable conditions, Water Resour. Res., 42, W06D10, doi:10.1029/2005WR004685, 2006

Kottegoda and R. Rosso,  Applied statistics for civil and environmental engineers, Blackwell, 2008

Kumar V., J. Kleissl, C. Meneveau, M. B. Parlange, Large-eddy simulation of a diurnal cycle of the atmospheric boundary layer: Atmospheric stability and scaling issues, Water Resour. Res., 42, W06D09, doi:10.1029/2005WR004651, 2006

Lettenmaier D.,  Stochastic modeling of precipitation with applications to climate model downscaling, in von Storch  and, Navarra A.,  Analysis of Climate Variability: Applications and Statistical Techniques,1995

Salzman, William R. (2001-08-21). "Clapeyron and Clausius–Clapeyron Equations" (in English). Chemical Thermodynamics. University of Arizona. Archived from the original on 2007-07-07. Retrieved 2007-10-11.

von Storch H, and Zwiers F. W, Statistical Analysis in climate Research, Cambridge University Press, 2001

Whiteman, Mountain Meteorology, Oxford University Press, p. 355, 2000

Misura e rappresentazione dei dati idrologici

Ecco qui la presentazione sui dati idrologici, suddivisa in parti:

Tutto il blocco di argomentii assieme nella versione 2014. Audio (21.6 Mb)


  • Agnoli, P.,  Il senso della misura, la codifica della realtà tra filosofia, scienza ed  esistenza umana, Armando Editore, 2004            
  • Agnoli, P., Breve introduzione storica alle prime unità di misura, , 2006, last retrieved 2011/03/18
  • AA.VV, Le misure nella scienza, nella tecnica, nella società, Manuale di metrologia,  a cura di S. Sartori,   Paravia, Torino,1979
  • AA. VV,  Le misure di grandezze fisiche, a  cura di E. Arri e S. Sartori, Paravia, 
  • Torino,1984 
  • Burroughs, W., J, Weather Cycles,  Cambridge U. P.,  2003
  • Grünewald, T., Schirmer, M., Mott, R., & Lehning, M. (2010). Spatial and temporal variability of snow depth and ablation rates in a small mountain catchment. The Cryosphere, 4(2), 215-225. doi:10.5194/tc-4-215-2010
  • Loreti, M., Teoria degli Errori e Fondamenti di Statistica: Introduzione alla Fisica Sperimentale, 2006,, last retrieved 2011/03/18
  • Roth, K. (2007). Soil Physics Lecture Notes (p. 1-340), 2007,, last retrieved 2011/03/18
  •  Shuttleworth, W. James (January/February 2008). "Evapotranspiration Measurement Methods". Southwest Hydrology (Tucson, AZ) 7 (1): 22–23. Retrieved 2009-07-22.
  • Western, Andrew W. (2005). "Principles of Hydrological Measurements". In Anderson, Malcolm G.. Encyclopedia of Hydrological Sciences. 1. West Sussex, England: John Wiley & Sons Inc.. pp. 75–94
  • Tabony, R. C.  (1979), A spectral filter analysis of long period records in England and Wales, Meterol. Mag. 108, 97-119 
  • Zambrano-Bigiarini, M. (2010). On the effects of hydrological uncertainty in assessing the impacts of climate change on water resources, 1-293.

Links to web sites