Thursday, February 21, 2019

Warredoc Winter School - Hydrology on data rich Hydrology

Last month, Fernando Nardi of the Università per stranieri (University for Foreigners) in Perugia and Warredoc organised a nice and successful Winter School on Data Rich Hydrology.
Many colleagues participated and gave very nice presentations. Here below I am reproducing verbatim the content of the School's pages with links to the pdf of the lectures.


AGENDA

Lunedì 28 Gennaio

Rafael L. Bras, The Era of Data Rich Hydrology
Stefan Uhlenbrook, The WWDR and SDG 6 Synthesis Report

Sessione pomeridiana
Aldo Fiori, Groundwater hydrology and hydrological process mechanics
Marco Marani, Beyond traditional extreme value theory: lessons learned from rainfall and hurricane intensity
Maria Cristina Rulli, The water-food-energy nexus

Martedì 29 Gennaio
Sessione mattutina
Rafael L. Bras, The Era of Data Rich Hydrology
Stefan Uhlenbrook, The WWDR and SDG 6 Synthesis Report
Fabio Castelli, Remote sensing and data assimilation in hydrology

Sessione pomeridiana
Roberto Deidda, Modelling scaling properties of precipitation fields
Salvatore Grimaldi, Hydrologic measurements and novel observation technologies
— Dinner & Social event —

Mercoledì 30 Gennaio
Sessione mattutina
Salvatore Manfreda, Drones in Hydrology (lecture & hands on)
Elena Volpi, Hydrological risk assessment: Return period and probability of failure

Sessione pomeridiana
Andrea Libertino, Advances in the space-time analysis of rainfall extremes
Riccardo Rigon, Hydrologic modelling in a data rich world

Giovedì 31 Gennaio
Sessione mattutina
Daniele Ganora, Data poor vs. data rich cases for flood hazard (lecture & hands on)
Gabriele Freni, Distributed Data quality and urban flood modelling uncertainty

Sessione pomeridiana
Fernando Nardi, Citizen science and big data in hydrology

Venerdì 1 Febbraio
Sessione mattutina
Tommaso Moramarco, Stream flow measurements: ground and satellite observations
Alessio Domeneghetti, Remote sensing data and tools to foster inland water monitoring and flood modeling

Tuesday, February 19, 2019

Ph.D. Miscellanea - Jupyter Notebook with R or Python on Statistics and Hydrology

This blog post is to share some of the notebooks provided by my Ph.D. students on the topics they follow in their Ph.D. classes. Please observe that some of the material are lecture notes by some of my colleagues. You can use them but you should cite the source when you do it.


Sunday, February 10, 2019

My Hydraulic Construction Class 2019

The new class  is obviously based on the one of previous classes:
There are some changes however, partially due to the different calendar. The course is essentially divided in three parts:
  • Rainfall analysis and statistics
  • How to design a storm water management system (SWMS)
  • How to design an aqueduct

Tools


Rainfall analysis and statistics is essential to the design of the storm water system and requires some use of Python in Jupyterlab. Design of the SWMS requires the use of some Python, QGIS 2.18, GISWATER and SWMM softwares. The aqueducts require the use of QGIS and its plugin QEPAnet that implements the tool for estimating pressure water called EPANET.  All these tools are open source.

More specifically:
  • Python - Python is a modern programming languages. It will be used for data treatment, estimation of the idf curves of precipitation, some hydraulic calculation and data visualisation. I will use Python mostly as a scripting language to bind and using existing tools. 
  • QGIS is a Geographic Information System. GIS are an essential tool for who works on landscape or planning infrastructures extended on the territory. 
  • SWMM - Is an acronym for Storm Water Management System. Essentially it is a model for the estimation of runoff adjusted to Urban environment. I do not endorse very much its hydrology. However, it is the most used tools by colleagues who cares about storm water management, and I adopt it. It is not a tool for designing storm water networks, and therefore, some more work should be done with Python to fill the gaps.
  • EPANET Is the tool developed by EPA to estimate water distribution networks. 
Installation Instructions (for Windows) by Daniele Della Torre:

SWMM: http://growworkinghard.altervista.org/epa-swmm-how-to-install-step-by-step/

GISWATER: http://growworkinghard.altervista.org/giswater-11-install-windows/

QGIS: http://growworkinghard.altervista.org/qgis-2-18-how-to-install-step-by-step-on-windows/

As you can infer from the previous lines, the class needs to learn some hydrology, some hydraulics and the use of various softwares. As I try to explain in the Syllabus lesson, the first day, there is no space for exploiting all the possibilities implied by the software, nor even to go very deep in the theory of hydrological processes and even in the design of the systems. The student has to become comfortable with the idea that they (singular they) is going to get an introduction to all these topics and they will need further studies to use professionally the received information.  

Foreseen Schedule


T -  stands for a mostly theoretical class
L -  stands for a class in the lab


Precipitation analysis and statistics (and an intro to Python scripting)

2019-02-25 -

2019-03-04
2019-03-07
2019-03-11
  • L - Estimation of Extremes with Python
    • Exercise: Using the examples of the last Lab, draw a Gumbel distribution.
    • Exercise: Select randomly from a Gumbel distribution and empirically shows the effects of the central limit theorem.
  • For estimating the Gumbel distribution parameters:
  • Exercise assignment
2019-03-14

Storm Water Management System Design


2019-03-18 -  T - Introduction to Storm Water Management System Design
2019-03-21 T - Estimation of the flood wave 
2019-03-25 
2019-03-28
2019-04-01
2019-04-04 - First report due date

   L - QGIS - GISWATER
  • Intro and installation of SWMM
2019-04-11 L- 
  • Play around with SWMM
2019-04-15 L - 
  • Working on the  project

2019-04-18
  • Intermediate Exam

Aqueducts

  • Work in progress

My Hydrology Class 2019

To have an idea about this class, please look at the Syllabus slides below.  This year the class will be a little different from the last year: there will be more hydrology and less statistics.  Laboratory work will be (mostly) concentrated in May and June. March and April will be mostly spent to develop the theoretical parts.
Lectures  and lab classes will be recorded and uploaded on my YouTube channel.
The intermediate exam will be written with 3 questions about the topic treated to which the student will be asked to answer with text, figures and formulas. The final exam will be a discussion of the exercises provided by the students int the form of Jupyter notebooks plus a short Python exercise. Each of the exercises will be discussed separately and by booking an appointment with the professor before the formal date of the exam or at the day of the final exam. The Pico touch-screen at the first floor of the Mesiano building will be used for the presentations.


Used Software

There is no engineering without using models. During the class will be used various open source softwares and resources:
All these resources are free, besides being open. For installations requirements, please see the GEOframe winter school material here. For understanding a little more about this material, please look at "Getting started with Docker OMS and Jupyterlab" post.

Foreseen Schedule

Material uploaded is subject to modifications prior to the schedule date

2019-02-27

2019-03-06  - Ground based Precipitations and their statistics Separation snow-rainfall - measure of precipitation
2019-03-08  Extreme precipitations. 
Determination of Gumbel's parameters
2019-03-13

T -Water in soil. Darcy-Buckingham. Hydraulic conductivity. Soil water retention curves.
2019-03-15 Richards equation and its extensions 
  • L - Introduction to Python and Jupyterlab
2019-03-20 - Hillslope Hydrology and Runoff production
  • Hillslope hydrology and Runoff production
2019-03-22
  • Hillslope hydrology and runoff production
2019-03-27 - Evaporation generalities

2019-3-29  - Evaporation from soils and Transpiration

2019-04-05 - Snow hydrology


2019 - 05 - 01 and 03 -  Lab Work on Precipitation extremes

2019 -05 08 and 10  - Lab work on infitration (1d)
2019-05-15 and 17 -2D Richards simulations and runoff production

2019-05-22 and 24 - Student work under professor assistance

2019-05 29 and 31 - Estimation of radiation in a single location with GEOframe tools.
2019-06-05 and 07  - Evaporation and transpiration

2019-06-12 and 14 - Work with students

Wednesday, February 6, 2019

On dimensional analysis (from Terry Tao's blog)

Terence Tao is a Fields' medalist. " Timothy Gowers remarked on Tao's accomplishments:[12]

Tao's mathematical knowledge has an extraordinary combination of breadth and depth: he can write confidently and authoritatively on topics as diverse as partial differential equations, analytic number theory, the geometry of 3-manifolds, nonstandard analysis, group theory, model theory, quantum mechanics, probability, ergodic theory, combinatorics, harmonic analysis, image processing, functional analysis, and many others. Some of these are areas to which he has made fundamental contributions. Others are areas that he appears to understand at the deep intuitive level of an expert despite officially not working in those areas. How he does all this, as well as writing papers and books at a prodigious rate, is a complete mystery. It has been said that Hilbert was the last person to know all of mathematics, but it is not easy to find gaps in Tao's knowledge, and if you do then you may well find that the gaps have been filled a year later."  [Source Wikipedia]

Therefore I was happy to find that he wrote on his blog dimensional analysis (and, implicitly about  the Pi Theorem). 

Here below I am getting verbatim the introduction of his blogpost:

"Mathematicians study a variety of different mathematical structures, but perhaps the structures that are most commonly associated with mathematics are the number systems, such as the integers or the real numbers . Indeed, the use of number systems is so closely identified with the practice of mathematics that one sometimes forgets that it is possible to do mathematics without explicit reference to any concept of number. For instance, the ancient Greeks were able to prove many theorems in Euclidean geometry, well before the development of Cartesian coordinates and analytic geometry in the seventeenth century, or the formal constructions or axiomatisations of the real number system that emerged in the nineteenth century (not to mention precursor concepts such as zero or negative numbers, whose very existence was highly controversial, if entertained at all, to the ancient Greeks). To do this, the Greeks used geometric operations as substitutes for the arithmetic operations that would be more familiar to modern mathematicians. For instance, concatenation of line segments or planar regions serves as a substitute for addition; the operation of forming a rectangle out of two line segments would serve as a substitute for multiplication; the concept of similarity can be used as a substitute for ratios or division; and so forth.

A similar situation exists in modern physics. Physical quantities such as length, mass, momentum, charge, and so forth are routinely measured and manipulated using the real number system (or related systems, such as if one wishes to measure a vector-valued physical quantity such as velocity). Much as analytic geometry allows one to use the laws of algebra and trigonometry to calculate and prove theorems in geometry, the identification of physical quantities with numbers allows one to express physical laws and relationships (such as Einstein’s famous mass-energy equivalence ) as algebraic (or differential) equations, which can then be solved and otherwise manipulated through the extensive mathematical toolbox that has been developed over the centuries to deal with such equations.

However, as any student of physics is aware, most physical quantities are not represented purely by one or more numbers, but instead by a combination of a number and some sort of unit. For instance, it would be a category error to assert that the length of some object was a number such as ; instead, one has to say something like “the length of this object is yards”, combining both a number and a unit (in this case, the yard). Changing the unit leads to a change in the numerical value assigned to this physical quantity, even though no physical change to the object being measured has occurred. For instance, if one decides to use feet as the unit of length instead of yards, then the length of the object is now feet; if one instead uses metres, the length is now metres; and so forth. But nothing physical has changed when performing this change of units, and these lengths are considered all equal to each other:


It is then common to declare that while physical quantities and units are not, strictly speaking, numbers, they should be manipulated using the laws of algebra as if they were numerical quantities. For instance, if an object travels metres in seconds, then its speed should be



where we use the usual abbreviations of and for metres and seconds respectively. Similarly, if the speed of light is and an object has mass , then Einstein’s mass-energy equivalence then tells us that the energy-content of this object is





Note that the symbols are being manipulated algebraically as if they were mathematical variables such as and . By collecting all these units together, we see that every physical quantity gets assigned a unit of a certain dimension: for instance, we see here that the energy of an object can be given the unit of (more commonly known as a Joule), which has the dimension of where are the dimensions of mass, length, and time respectively.

There is however one important limitation to the ability to manipulate “dimensionful” quantities as if they were numbers: one is not supposed to add, subtract, or compare two physical quantities if they have different dimensions, although it is acceptable to multiply or divide two such quantities. For instance, if is a mass (having the units ) and is a speed (having the units ), then it is physically “legitimate” to form an expression such as , but not an expression such as or ; in a similar spirit, statements such as or are physically meaningless. This combines well with the mathematical distinction between vector, scalar, and matrix quantities, which among other things prohibits one from adding together two such quantities if their vector or matrix type are different (e.g. one cannot add a scalar to a vector, or a vector to a matrix), and also places limitations on when two such quantities can be multiplied together. A related limitation, which is not always made explicit in physics texts, is that transcendental mathematical functions such as or should only be applied to arguments that are dimensionless; thus, for instance, if is a speed, then is not physically meaningful, but is (this particular quantity is known as the rapidity associated to this speed).

These limitations may seem like a weakness in the mathematical modeling of physical quantities; one may think that one could get a more “powerful” mathematical framework if one were allowed to perform dimensionally inconsistent operations, such as add together a mass and a velocity, add together a vector and a scalar, exponentiate a length, etc. Certainly there is some precedent for this in mathematics; for instance, the formalism of Clifford algebras does in fact allow one to (among other things) add vectors with scalars, and in differential geometry it is quite common to formally apply transcendental functions (such as the exponential function) to a differential form (for instance, the Liouville measure of a symplectic manifold can be usefully thought of as a component of the exponential of the symplectic form ).

However, there are several reasons why it is advantageous to retain the limitation to only perform dimensionally consistent operations. One is that of error correction: one can often catch (and correct for) errors in one’s calculations by discovering a dimensional inconsistency, and tracing it back to the first step where it occurs. Also, by performing dimensional analysis, one can often identify the form of a physical law before one has fully derived it. For instance, if one postulates the existence of a mass-energy relationship involving only the mass of an object , the energy content , and the speed of light , dimensional analysis is already sufficient to deduce that the relationship must be of the form for some dimensionless absolute constant ; the only remaining task is then to work out the constant of proportionality , which requires physical arguments beyond that provided by dimensional analysis. (This is a simple instance of a more general application of dimensional analysis known as the Buckingham theorem.) [Continue reading on Tao's blog]