Friday, March 8, 2024

Modelling and Hydrological Modelling

These lecture are actually part of the 2024 course in Hydrological Modelling. However because they can be of some more general interest, I am grouping them also here. They try to review the concepts of modelling in general and when applied to hydrology. In the series of lectures there is also a concise overview of catchment processes. The first lecture image, see below, it a Maurizo Cattelan artwork entitled "A donkey among doctors" which is my attitude when I approach the topic. 


The final idea about the practice to do model is expressed in the paper and in the various posts that regard DARTHs which can be find here.  Among people that more reflected on Hydrological Modelling there is certainly Keith Beven [GS]. To get a glimpse of his contributions, please see this other post which contains some of his relevant papers. 

Thursday, March 7, 2024

Stock and flow diagrams, a different way to represent dynamical systems

Stock and flow diagrams (see also here) are  a way to represent dynamical system which is the same area covered by EPN ((Extended Petri Nets). They were brought to my attention by the talk John Baez gave at  Edinburgh Mathematical Society last December. Fortunately the talk is available on Youtube.

Although I find that the visuals of EPN are more expressive and the accompanying infrastructure is easier for engineers to comprehend, I have come to realize that listening to the talk is incredibly instructive when it comes to realize that EPN falls in the objects of category theory. An intriguing aspect explored in the talk is the representation of open systems within stock-flow graphs. In EPN, it is assumed that a flow box not originating from a place indicates that the system is open. Additionally, when one EPN features an outgoing flow labeled A and another EPN has an input flow with the same label, they can be combined to create a composite graph. However, in this presentation, a new rectangular symbol is introduced for the same purpose.
Personally, I find the solution in EPN more intuitive, although it may be considered less abstract. Nevertheless, I have come to realize that a similar graphical approach could prove beneficial in extending EPN to represent not only ODE systems but also PDE systems.

Wednesday, March 6, 2024

On Hydrological Models and their choice (and a use of the AboutHydrology mailing list)

Initially, I was captivated by the visuals that I could incorporate into my presentations. To my pleasant surprise, I discovered that the AboutHydrology mailing list served as a valuable data source. Remarkably, this platform has been active for approximately a decade (I need to verify the exact date of its inception) and has amassed a wealth of information.

Reproduced from Melsen, 2022

Subsequently, I came across two intriguing papers authored by Melsen, delving into the "sociology of selecting a hydrological model." These papers proved to be quite engaging. Additionally, there are other noteworthy publications exploring similar themes. Notably, among the more recent works, Hamilton et al., 2022, and Horton et al., 2023, deserve special mention.  Please find their citation below. In the paper you can easily recover previous relevant literature. 

References

Hamilton, Serena H., Carmel A. Pollino, Danial S. Stratford, Baihua Fu, and Anthony J. Jakeman. 2022. “Fit-for-Purpose Environmental Modeling: Targeting the Intersection of Usability, Reliability and Feasibility.” Environmental Modelling & Software 148 (February): 105278. https://doi.org/10.1016/j.envsoft.2021.105278.

Horton, Pascal, Bettina Schaefli, and Martina Kauzlaric. 2022. “Why Do We Have so Many Different Hydrological Models? A Review Based on the Case of Switzerland.” WIREs. Water 9 (1). https://doi.org/10.1002/wat2.1574.

Melsen, Lieke A. 2023. “The Modeling Toolkit: How Recruitment Strategies for Modeling Positions Influence Model Progress.” Frontiers in Water 5 (May). https://doi.org/10.3389/frwa.2023.1149590.


Friday, February 16, 2024

Summarizing my (with a good company) cryospheric work

The hydrological cycle is significantly influenced by the presence of water in its condensed states in middle and extreme latitudes. Various hydrological parameters change below 0  Celsius, such as water viscosity, thermal capacity, and hydraulic conductivity. Consequently, mainstream hydrology treatments that neglect freezing provide incorrect results in winter, high elevations, and the far north and south for most of the year. In the current state of global warming that threatens the cryosphere which is progressively disappearing, it is even more crucial to address its dynamics


A little of-of-date itinerary can be found in a previous post here. To understand our progress, three milestone theses summarize the work done

  • Matteo's  Together, we worked out the Thermodynamics of non equilibrium for ice-systems and the theory of freezing soils. Matteo implemented also an integrator in GEOtop, not the perfect one, but acceptable. Matteo's 2011 paper is a benchmark paper in the topic. 
  • Stefano's brought GEOtop to some maturity and especially fine tuned the various tools related to snow and ice. Stefano's 2014 paper remains a landmark in our work. 
  • Niccolò's  pushes forward the previous work. Especially remarkable is his work on re-implementing the informatics according to new (for us) concepts in OO programming and using (finally) safe algorithms for the integration of the equations. His WHETGEO and FreeThaw papers are a must read for completeness and clarity.

Our work's focus was primarily on the critical zone, where we modified the Darcy-Buckingham law to account for freezing and thawing and their related hydrological and mechanical effects. We primarily focused on the hydrological effects neglecting the mechanical ones but not neglecting the energy budget, a common practice in hydrology, which is obviously not possible. Consequently, we faced the necessity to simultaneously solve both the mass budget and the energy budget.

The formulation of the equations can be found in the theses and papers cited above, and you will realize that establishing a correct relation between the Darcy scale energy content and the corresponding water (liquid or solid) is the main challenge. Proper physics requires the consideration of interfaces between the phases: air-water-soil-ice. While a complete understanding of this relation has not been yet achieved, some working approximations have been obtained. Looking at the two compartments, snow and ice in the soil, they differ in many aspects, with snow lacking soil and being affected by its aerial origin. Both snow and ice in the soil have their own complexities, which affect their evolution. They often interact and the fate of the soil with or without snow is quite different.

While determining the correct equations would be satisfactory goal for many, it remains unresolved how to numerically estimate these equations. It turns out that these mildly nonlinear equations pose problems when solved using the usual algorithms based on variations of the Newton method. Convergence of the numerical methods is not guaranteed, and many workarounds have been deployed to overcome these difficulties, often leading to issues with mass and energy conservation principles.

Fortunately, Casulli and Zanolli (2010) found a method to address these challenges. The fundamental paper can be found in bibliography, and a progressive approach to its formulation can be obtained by reading Casulli's lecture notes and completed by watching videos in this blog. Ideally, attending Casulli's annual school in Trento, held every second half of January after our GEOframe winter school, would provide the best understanding. Tubini's recent papers are the result of this approach, and FreeThaw and WHETGEO are concrete implementations of these algorithms in Java/OMS/GEOframe.

Another aspect to consider is the implementation of these algorithms in informatics. Concepts related to this can be found in parts of Tubini's thesis and the related papers, especially Tubini and Rigon, 2022.

Finally, as a source of information, all of these models' open-source codes can be found on GitHub, both for the older GEOtop and the more recent GEOframe model components.

References


Casulli, Vincenzo, and ZANOLLI. 2010. “A Nested Newton-Type Algorithm for Finite Colume Methods Solving Richards’ Equation in Mixed Form.SIAM Journal of Scientific Computing 32 (4): 2225–73.

Dall’Amico, Matteo. 2010. “Coupled Water and Heat Transfer in Permafrost Modeling.” Edited by Riccardo Rigon and Stephan Gruber. Phd, University of Trento. http://eprints-phd.biblio.unitn.it/335/.

Dall’Amico, M., S. Endrizzi, S. Gruber, and R. Rigon. 2011. “A Robust and Energy-Conserving Model of Freezing Variably-Saturated Soil.” The Cryosphere. https://tc.copernicus.org/articles/5/469/2011/.

Endrizzi, Stefano. 2007. “Snow Cover Modelling at a Local and Distributed Scale over Complex Terrain.” Ph.D. Thesis, January, 1–189.

Endrizzi, S., S. Gruber, M. Dall’Amico, and R. Rigon. 2014. “GEOtop 2.0: Simulating the Combined Energy and Water Balance at and below the Land Surface Accounting for Soil Freezing, Snow Cover and Terrain Effects.” Geoscientific Model Development 7 (6): 2831–57. https://doi.org/10.5194/gmd-7-2831-2014.

Tubini, N. 2021, June. “Theoretical and Numerical Tools for Studying the Critical Zone from Plots to Catchments.” Edited by R. Rigon and S. Gruber. Ph.D., Dipartimento di Ingegneria Civile, Ambientale e Meccanica, Università di Trento.

Tubini, Niccolò, Stephan Gruber, and Riccardo Rigon. 2021. “A Method for Solving Heat Transfer with Phase Change in Ice or Soil That Allows for Large Time Steps While Guaranteeing Energy Conservation.” The Cryosphere 15 (6): 2541–68. https://doi.org/10.5194/tc-15-2541-2021.

Tubini, Niccolò, and Riccardo Rigon. 2022. “Implementing the Water, HEat and Transport Model in GEOframe (WHETGEO-1D v.1.0): Algorithms, Informatics, Design Patterns, Open Science Features, and 1D Deployment.” Geoscientific Model Development 15 (1): 75–104. https://doi.org/10.5194/gmd-15-75-2022.


Thursday, February 1, 2024

Hydrological modelling 2024

Welcome to the 2024 Hydrological modelling class. To understand better what is below: 
  • storyboard is a summary, usually in Italian, of the lecture
  • A whiteboard is an explanation of a particular topic made on the whiteboard (using Notability on the iPad)
  • Slides are commented in English (since 2021)
  • Videos are available to comment the slides. They are usually recorded during the lectures with no editing at all (which would be too much time expensive). 2024 Videos are uploaded to a Vimeo Showcase that can be found here
  • Additional  information (only for the brave or the curious) and references are in italics
 

2023-02-19 - I  - Syllabus - Introduction 2 Hydrological Modelling 

Here  I introduced the class. Its learning by doing philosophy (altered by the necessity due to COVID-19 times that impose to do first the all the theoretical parts and subsequently all the practical parts hoping that they can be done in presence). 
To begin is also worth to have a little (philosophical) analysis of what a model is. This is what done in the following parte of the lecture
2024-02-22 - Geomorphometry   - Discussion of previous lesson topics. The rational of introducing these concepts  is that catchments are spatially extended and in this course we are interested to deal with catchments hydrology. 

In this first part we deal with the geometrical (differential) characteristics of the topography. Elevations, slopes, curvatures. They will be necessary later to extract the river network and the parts of a catchment.
In this class we define also what the drainage directions are and how they are computed in the case of DEMs (a topography discretized over a regular grid).  From drainage directions are determined the total contributing areas in each point of  a DEM. These two characteristics are eventually used to determine  the channels head and extract the river networkIn turn, the extraction of the channel network allows for the extraction of hillslope and a first definition of  the Hydrologic Response Units (HRU). 
    2024-02-26
    Q&A - 

    2024-02-29 -  Interpolations 
    This lecture, assuming that now you have at least the concepts of what a catchment is and theoretically you know how to extract it and subdivide it in parts, deals with the data to feed catchments hydrology models. Because catchments have a spatial distribution, then also the driving data must be distributed. We need therefore methods of interpolation. 

    2024-03-04 -  Interpolations part II. 
    In this class we try to understand how to estimate the errors over the estimates. Besides we introduce a method (the Normal Score) to avoid to obtain negative values when positive interpolated values are required.
    Q&A - 
    Spatial Interpolation (Vimeo2023)

     Hydrological Models. This is a class about hydrological models, so what are they ?

    The title is self-explanatory. A theoretical approach to modelling is necessary because we have to frame properly our action when we jump from the laws of physics to the laws of  hydrology. Making hydrology we do not have to forget physics but for getting usable models we have to do appropriate simplifications and distorsions. The type of model we will use in the course are those in the tradition are called lumped models. Here we also introduce a graphical tool to represent these models.
    2024-03-06-Hydrological Models 

    For old material give a look to Hydrological Modelling 2023
    2024-03-11
    2024-03-18
     Linear Models for HRUs

    Once we have grasped the main general (and generic) ideas, we try to draw the simplest systems. They turn out to be analytically solvable, and we derive their solutions carefully. From the group of linear systems springs out the Nash model, whose derivation is performed.  Obviously, it remains the problem to understand how much the models can describe "reality". However, this an issue we leave for future investigations.
     A little more on the IUH and looking at the variety of HDSys models

    We introduced previously without very much digging into it the concept of Instantaneous Unit Hydrograph. Here we explain more deeply its properties, Then we observe that there are issues related to the partition of fluxes and we discuss some simple models for obtaining them. Not rocket science here. The concept that we need those tools is more important than the tools themselves. We also observe that linearity is not satisfactory and we give a reference to many non linear models. Finally we discuss an implementation of some of the discussed concepts in the System GEOframe. 

    Hydrology 2024 lab

    The lab is almost half of the class. According to the motto "learning by doing" it covers at least three numerical experiments:

    • Some elaborations with time series
    • The estimation of the Intensity-Duration-Frequency curves
    • A few experiments with infiltration
    • A few experiments with evaporation and transpiration 


     2023-03-04 Introduction to working with Jupyter and Notebooks
    2024-03-12
    • Counting the events and producing their empirical statistics (Vimeo2022)

    Interpolating the Gumbel distribution to annual precipitation maxima

    Hydrology 2024

    The Course of Hydrology 2024 will be 90% similar to last year class with minor modifications.  Indication of tools used etc can be found at the 2023 Index (3 minutes reading). Here you'll find the material of the classes including slides, old and new videos. Hydrology is an exciting field since water is so important for life and human activities. Here a  brief introduction from a National Geographics post

    Companion of this post il the laboratory page on which you find material for your exercises. 

    Classes and related material

    You can find:
    • Storyboards is a summary, usually in Italian, of the lecture
    • Whiteboard is an explanation of a particular topic made on the whiteboard (using Notability on the iPad)
    • Slides are commented in English
    • Videos are available to comment the slides. They are usually recorded during the lectures with no editing at all (which would be too much time expensive). 2024 Videos are uploaded to a Vimeo Showcase that can be found here
    • Additional  information (only for the brave or the curious) and references are in italics

    19 Febbraio 2024 - - Introduction to the course and to hydrology
    Complementary References
    2023-02-20 - Ground based Precipitations and their statistics Separation snow-rainfall - measure of precipitation

    In this part of the class we describe where it rains and how much it rains using statistical concept. One important objective is to understand what are the extreme precipitations for their importance in engineering. 
    2024-02-26 - 2024-02-27  - Statistics of extreme precipitations

     Some reviews on statistics - Return Period
    Extreme precipitations  (Storyboard2020)
    Distributions Storyboard2020

    Determination of Gumbel's parameters
    Extreme precipitations  II
    2024-03-05 -Beyond Gumbel
    A summary about the extreme precipitation estimations (Whiteboard)

    Water in soil and aquifers 
     (Storyboard2020)
    Once precipitations arrive to the ground surface they either infiltrate or generate runoff. We first state how they infiltrate and, actually how water behave in the soil and in the ground. We talk about the complexity of the Earth surface that contains life and call it, the Critical Zone. To study infiltration we introduce the Darcy and Richards equations of which we explain the characteristics.

     - The Richardson-Richards equation  (Storyboard 2020)