Showing posts with label OMS3. Show all posts
Showing posts with label OMS3. Show all posts

Tuesday, June 3, 2025

OMS Runner Library: Streamlining Hydrological Model Execution

 The OMS Runner Library v1.2.2 represents a significant advancement in hydrological modeling workflow automation, specifically designed to simplify the execution of OMS3 (Object Modeling System) simulations. For hydrologists and water resources engineers working with GEOframe and OMS3, this Python library addresses the seamless integration and execution of simulation models across different computing platforms. What follows assume a lot of knowlege that you can get by looking to some of our Winter Schools or some of our lab classes as  Physical Hydrology (in Italian) or  Biosphere Atmosphere and Climate Interactions. 

What is OMS3?

The Object Modeling System (OMS3) is a Java-based framework widely used in environmental and hydrological modeling. It provides a robust platform for developing, coupling, and executing complex simulation models. However, working with OMS3 often requires dealing with Java classpaths, configuration files, and platform-specific execution commands – tasks that can be time-consuming and error-prone, especially for researchers focused on scientific analysis rather than software engineering.

The Solution: Python Integration

The OMS Runner Library bridges this gap by providing a comprehensive Python interface for OMS3 operations. This is particularly valuable because Python has become the lingua franca of scientific computing, with most hydrologists already familiar with its ecosystem of tools like pandas, matplotlib, and Jupyter notebooks.

The library automatically handles the complexities of Java environment detection, ensuring that Java JDK 11 is properly configured across Windows, macOS, and Linux systems. This cross-platform compatibility is crucial for research teams working in diverse computing environments, from field laptops running Windows to high-performance computing clusters running Linux.

Please find:

Version 1.2.4

Version 1.2.2

Key Capabilities

One of the library's standout features is its intelligent simulation management. It can automatically discover simulation files within a project, maintain configuration databases, and execute models either individually or in sophisticated batch processing workflows. For hydrologists working with multiple scenarios – such as climate change impact assessments or calibration procedures – the parallel execution capabilities can reduce computational time.

The library supports various execution patterns: sequential processing for dependent simulations, parallel execution for independent model runs, and asynchronous background processing for long-running computations. This flexibility allows researchers to optimize their workflows based on available computational resources and modeling requirements.

Practical Applications

In practical hydrological applications, this translates to significant productivity gains. A researcher studying watershed responses to different precipitation scenarios can now set up dozens of model runs with just a few lines of Python code, monitor their progress through Jupyter notebooks, and automatically collect results for analysis. The library's integration with popular Python data analysis tools means results can be immediately processed, visualized, and shared.

Users can explore more about GEOframe's capabilities and latest developments at the GEOframe blog, where detailed tutorials and case studies demonstrate advanced hydrological modeling workflows.

The comprehensive logging and error handling features are particularly valuable in operational hydrology contexts, where model reliability and traceability are paramount. The library maintains detailed execution histories, facilitates debugging, and provides clear diagnostic information when issues arise.


Friday, September 9, 2022

Commanding OMS3 simulations from the Command Line (or from a Jupyter Notebook)

 The normal way to start OMS3 simulation is the use of its console. However, it could be convenient to command project simulations directly from the command line of a terminal (in Windows, in Mac OS, Linux users  know what a terminal is). 



The presentation above (click on the Figure) explain how to do it. Jupyter Notebooks can also be used as terminal. The presentation connects to a Notebook where it is done

Monday, October 25, 2021

Driven by Francesco and Olaf, one step in surrogate modelling

 This is one of the paper to which I was more spectator than a real player. However, my name appears among the contributors because I was somewhat crucial for the project to succeed. The idea that bother many is that hydrological models aren too complicate and we need more simple models that get almost the same results. This is the rational for this work that was part of Francesco Serafin Ph.D. Thesis. 

The main ideas was to get into OMS3/CSIP framework an artificial neural network (ANN) system that could surrogate the hydrological models. Surrogate means that it can reproduce most of the dynamic features of the model training the ANN and then making using it. The roadmap is simple but the realization involves several steps that the paper delineates.


So, here it is our paper and its abstract: Serafin, Francesco, Olaf David, Jack R. Carlson, Timothy R. Green, and Riccardo Rigon. 2021. “Bridging Technology Transfer Boundaries: Integrated Cloud Services Deliver Results of Nonlinear Process Models as Surrogate Model Ensembles.Environmental Modelling and Software[R], no. 105231 (October): 105231.

Environmental models are often essential to implement projects in planning, consulting and regulatory institutions. Research models are often poorly suited to such applications due to their complexity, data requirements, operational boundaries, and factors such as institutional capacities. This contribution enhances a modeling framework to help mitigate research model complexity, streamline data and parameter setup, reduce runtime, and improve model infrastructure efficiency. Using a surrogate modeling approach, we capture the intrinsic knowledge of a conceptual or process-based model into an ensemble of artificial neural networks. The enhanced modeling framework interacts with machine learning libraries to derive surrogate models for each model service. This process is secured using blockchain technology. After describing the methods and implementation, we present an example wherein hydrologic peak discharge provided by the curve number model is emulated with a surrogate model ensemble. The ensemble median values outperformed any individual surrogate model fit to the curve number model. 

Friday, November 6, 2020

The State-of-Art and the perspectives for next GEOframe research

These are the contents of an e-mail I sent to a friend and colleague to push forward our collaboration. Despite it has been written to a specific person, I think some of the topics can be on general interest for the topics it covers. At least for who is interested in Hydrological Modelling.

Dear Friend,
 
I am trying to simplify here the objectives of my research in order to see where we can find convergence of aims and goals.

Overall, I want to pursue a tight connection between the theory of hydrological processes and their sound (replicable, robust, reliable) implementations (see also here for other explanations). Actually, I work both on the theory and on the implementation. Soon in my career, I realized that a poor implementation of a correct theory often produces wrong results and moreover its incorrect falsification brings credits to flawed ideas (the case of  "tranchant" judgments on Richards equation, based on unreliable integrators is one of the cases). I also grew the idea that, differently from some other colleagues, I wanted to build not just doing-programming but programming-system products (e.g. - Brooks, 1975), i.e. reusable software on which other people can build new knowledge (yes, the idea that building on each others shoulders, and working that way, possibly having the couple of smart intuitions, we can arrive where only the giants, usually arrive). 


My main goal is to build better models than those existing, more controllable, and less prone to devastating bugs. My research tends to be more “methodological” than applied. It is exactly this approach that moved me towards OMS3. It, in comparison with other options, followed by successful colleagues, presents a clean design, support for models’ controllability, encapsulation of modelling solutions, easy and ordered reuse of modules, intrinsic documentation with annotations, support to technical issues, like parallelization and calibration, without overwhelming the hydrologist concentrated on physics. Besides, a wise use of components, could help to dose information to the users and set it visible only when and where required.

Coming to the practice of my research, I focused mainly to two types of models, those I call Hydrological Dynamical Systems (HDSys), mainly based on the solution of multiple coupled non-linear, non-autonomous, ordinary differential equations, and those that have the space variables explicit and solve partial differential equations. From a different perspective, my goal has been to cover entirely the various aspects of the hydrological budget (often including terrain and soil/sediment) not only focusing, as traditional models do, one some or one of the aspects, like discharge or evaporation, or infiltration, or groundwater. Coupling the water with the energy budget, has been an objective of both the types of modelling, especially, but not only, because temperature is easily measurable, even from remote sensing. Tracers, Nutrient and pollutants, were never deeply considered, except recently, but they are part of my modelling tools since many years.

For a community to grow around the previous ideas, some key tools are still missing. The points below summarize: i) what I envision is needed from different perspectives/users; ii) what futures OMS developments should potentially consider. Some of these points are already being reached with the work we did, some are planned to be implemented, for some others we need your support to reach a critical mass and make them happen.

Power User side:
  • Smoothing out some part of the process to deploy a modelling solution to a specific concrete catchment. With students of the GWSs and Hydrological modelling class the two processes of extracting the HRU and interpolating the data were instructive but too much detailed and cumbersome.
  • Using the console is easy and usually hassle-free. However, because we use mostly Jupyter notebooks for the treatment and analysis of inputs and outputs this is a further environment to learn. Using Docker and the command line inside Jupyter could be a choice but with Docker we had hard times on Windows. A console inside Jupyter would be the best choice.
  • In general, a convergence of our tools with those tools people use the most, as Jupyter, decrease the learning curve and developer commitment to bring in and maintain tools.
  • Some ancillary tools for “joining” catchment studied by different people are required
  • calibration revealed to be a time-consuming effort that needs parallelization and speed-up.
  • Probably a server or a “hub” to store and retrieve the collective work, including parameterisations, inputs and so on.
  • Manage the possibility of having multiple treatments of the same catchments would also be required sometimes in the future.

For institutional user
  • Connections to Delft-Fews could be an option to investigate.
  • Our group needs also to experiment with CSIP .
  • A distribution of all the material and the code, through some tool like Anaconda would be desirable.
  • They need dedicated interfaces. For they, modifying parameters and models structure should be not be an option as for researchers or power users
  • Scalability of the computing effort should be the standard (and this should include Net3)

Developers: 

  • Source code should be available on public repository like Github
  • To improve developer appropriate/specific documentation for them should be a continuous effort

Potential developer/researchers

  • When they come from Environmental Engineering or sciences, they usually are familiar with Python, R or Matlab. They do not have notions of OO programming, nor of basic software engineering background. Therefore, appropriate material providing all of this knowledge should be produced. I started with a Java for Hydrologist 101 but I am far to have completed it.
  • They are not comfortable to use tools like Git, Github, Docker, Unit tests, and other commons tools which are necessary for software carpentry and collaborative work. Therefore, some training course on these should be also provided .

The above is more a wish list which we are keeping in mind. Frankly we do not have yet the all the competence to treat them all. As you see I did not list any machine learning tool: but this does not mean that we are not looking to them. For the moment is just safe for us to concentrate to enhance and bring to an optimal state what we have and publish that ten of papers that we have in production on he work we have already done. We are looking for resources though and, resources arriving, we could also think to statistical/machine learning methods to be introduced. One thing to be remarked is that GEOframe-NewAGE can easily replace PRMS. The module we have, usually, are different from those PRMS has, but implementing them the very same way PRMS does should be VERY easy, if this is the goal. A greater integration with AGEs would be also advisable. The main differences to be treated for compatibility are the IO. For now, we often stick with complex data formats but abstract the algorithms from them is an objective we have in mind. Mostly we had to follow our way so far to be sufficiently comprehensive. To be sincere, IMHO, some parameterisation of the processes inside AGEs are simply old hydrology, not currently supported by researchers but, yes, still in use by practitioners (which worldwide use SWAT, though). In all I mentioned I forgot to mention the work by Daniele Dalla Torre that ported SWMM to OMS3. That is a thread that is, at present in a dead end but it can come back alive any time.

Below, I give further information on: i) the reasons why we use OMS; ii) the new components I mentioned before or we are going to develop.

When I arrived to OMS3, my most recent achievement was a stable version of GEOtop, a model that solves the water and energy budget, as its foundational paper told. After 15 years, GEOtop remains quite unique in the panorama of “process-based” models. It in fact includes what is usually present in other process-based models, i.e. an integrator of Richards, Groundwater and Surface water equations, with what usually appears in soil, vegetation, atmosphere models. Besides it has a solid model for snow height evolution, used operationally all over the Alps, and freezing soil, which constitutes a third type of process-based model usually cared by a different scientific community. I’ve certainly sinned arrogantly in doing what others still not do, even with much larger resources, and I will probably go to hell for that. GEOtop has a decently extended literature and I could have capitalized better its treasures, but I preferred to move on, because while I was getting GEOtop stable I’ve been also touching its limits.

Its monolitic structure made of thousands lines of code, made it not easily modifiable and improvable with incoming research and understanding.

Its ambition to cover all the areas of hydrological modelling have made exploding the number of input parameters a fact that most researchers found overwhelming. Introducing competing ideas to model some of the processes became practically impossible and any science advancement nullified.

That’s why I was looking from an intrinsically modular system that could resolve the above issues and boost collaborative work, and that’s why I moved to OMS3 in 2008.
I would have stick with that GEOtop objective but in the same year had quite unexpectedly financial support for studying the management of draughts of river Adige. GEOtop was impractical for that use because of its inability to be calibrated and some flaws in its subsurface-surface water interactions. Necessity brought to the implementation of GEOframe New Age version 0.

In the subsequent decade I and collaborators worked on the GEOframe model perspective, faster to calibrate and, nevertheless quite complete from the point of view of processes integration. For many ancillary parts of the system, it was reinventing the wheel again from scratch but this finally produced the mature product that GEOframe-NewAGE is today. It was conceived for using the natural spatial fractal - graph-like structure of rivers for distributing spatially the hydrologic response unit (HRU) physics and computation. The main driving idea behind GEOframe is that we do computation on a graph nodes which exchange mass and energy according to the interactions among parts described by graph's connections. These nodes can be spatially distinct entities, like hillslopes and HRU, or concurrent processes like discharge and transpiration. In principle an engine under the hood is responsible for distributing the computation along the graph, while the hydrologist takes care of describing the processes with the appropriate degree of refinement. This had a first implementation with Net3 but I believe can be improved in several directions. Before Net3, sure, river networks were schematized as graph, but their topology was hardcoded and no variation was possible in the spatial structure of the model without disrupting the whole. With Net3 the topological structure of the connections can be modified just before the run time, inserting or eliminating human infrastructures, diversions, new nodes of calculation, lakes, reservoirs.

Net3 opened also to the possibility for different researchers to work simultaneously on different part the catchments (actually of the graph) enabling the possibility for a sort of “crowd modelling action” to cover the whole Earth with GEOframe based modelling performed by a crowd of researchers or simply trained people. Clearly for this an infrastructural work is still missing but potentially it could provide a collective works that highly surpasses the present global scale hydrological applications which are based on rough characterization of parameters and scanty local reanalysis of data which is not possible, even for large research groups. The first application of this modeling strategy will be the application of the model to the river Adige, separated in a thousand or more HRU of which we have, so far, some work done by the students of my course of Hydrological Modelling. River Adige is relatively small (10^4 square kilometers) but a variety of climate situations and anthropic activities and settlements that make it very challenging to be modeled. Eventually the simulations will be extended to the whole Alps and beyond.

From the point of view of interacting components, GEOframe has many: the traditional set of tools coming from Hydrologis for terrain analysis; a set of Krigings for interpolation of hydrometeorological variables, the estimation of shortwave and longwave radiation including shadows and topography effects, interception of rainfall by canopies, three simplified models for snow water equivalent modelling, various tools for reservoirs-like modelling (a la PRMS), Muskingham-Cunge and 1d deSaint Venant propagation, Priestley-Taylor, Penman-Monteith and a new model called Prospero which implements a revision due to Penman-Monteith by Schymanski and Or. All the models can make use of LUCA and PSO tools for calibration and the dedicated papers constitute a guideline for their use.
Giuseppe and I just hired a coupled of Ph.D. student and, they, among the other stuff, will work on data assimilation and possibly on some OMS issues.
Did I abandoned then process based modeling? Not at all, the original plane to build the new GEOtop 4.0 is actually very alive.
The nucleus are the tools growing around WHETGEO. At present we have:
  • An integration of Richards 1D with and without temperature, decoupled and coupled with the Energy budget (return the soil temperature profile)
  • An integration of Richards equation 2D (hillslope profile, for instance). No coupling with the energy budget yet.

These tools make leverage on terrain analysis, radiation estimation, interpolation of data, estimation of Evaporation and Transpiration already present in GEOframe but have a gridded domain instead that an HRU separation. With respect to GEOtop, the integration algorithms are completely redesigned around the Newton-Casuli-Zanolli (NCZ) algorithm for Richards, and an appropriate implementation of the grids where topology and geometry are separated. In GEOtop a more traditional Newton-Krylov (NK) algorithm was used whose convergence is not granted a priori and the equations were written for a structured (regular) grid which causes artifacts into the results. Using appropriate design patterns, a twofold objective was obtained: to make room for changes in parameterisations of the equations and, and to maintain as simple as possible (but not too simple) the contents of the inputs. The use of standard formats like NetCDF for outputs contained the number of otherwise exploding output files. The input and output format were decoupled from the algorithms though, in order to maintain flexibility for changing the outputs format. As seen many components developed for GEOframe-NewAGE could be reused for WHETGEO and, in fact, in the foreseen future, also the Net3 infrastructure could be possible used to aggregate various hillslopes simulated by independent WHETGEO runs.
Because I have experience with them and notwithstanding the opinion of many colleagues, I do not see in fact that the lumped reservoir models can cope with those processes which have a well definite spatial history. Remote data is a new frontier and, besides, WHETGEO is fully able to exploit them.

Evolving Prospero will bring into WHETGEO green waters and vegetation and GEOtop 4.0 will be much greener than GEOtop 3.0. This achievemente is almost there. Carbon cycle evolution, forestry and crop, will be a set of ODEs attached to sites, either described as a grid cell or a HRU. Their mathematics is quite the same that for HDSys, with just a different interpretation of the parameters. Transport of tracers and pollutants, via the advection dispersion equation is also almost obtained, because these equations belong to the same family of the heterogeneous transport of heat in porous media that we have already implemented.
Giuseppe in his magic hat has already setup models for hillslope stability analysis that just wait for the 2D and 3D WHETGEO to be tested (the first) and fully implemented (the second). But the 3D solution is more a problem of drawing the grid than everything else with respect the 2D solver.
A possible threat to this WHETGEO is its computational burden. The algorithms are efficient but a high-resolution three-dimensional grid has potentially millions of nodes and simulations are time consuming. Parallelizing its core routines in a way that does not clash with the other forms of parallelism present if OMS3 will be a challenge.
Therefore, what I foresee in the next years is these tools to get maturity and to be used by a potentially large set of users. GEOtop 4.0, built on WHETGEO, Prospero, and other tools would be a really operational tool for instance for landslide risk early warning; for the detailed soil moisture account for precision, regenerative agriculture; for small catchments runoff and sediment production (the latter a feature to be implemented), and obviously would be a great tool for studying any aspect of the critical zone, in any climate past present or future. At the present we cannot foresee when we could add accurate modules for snow (like those or better than those already in GEOtop) but the modules already present in GEOframe could be used easily on a pixel base to surrogate them. Calibration tools for WHETGEO process-based modules, I think, will require some adjustment of the calibration tools now present in OMS3 and we did not try anything about yet.
This mail was pretty long but, I hope it serves to clarify my point of view and the legacy I have with my previous research, I also included Tim in the mail, because I thin he can be interested on many of the research I exposed. Thanks to the friendship we have, I hope the way to strengh our past collaboration in a few future objectives where we can find reciprocal satisfaction.

All the best,

ric (and the guys)

Monday, February 3, 2020

4 Researchers Who Want to Develop Hydrological Models Without Reinventing the Wheel

Maybe you can save efforts and you do not need to reinvent the wheel. Therefore I wrote about our project that lasts since almost fifteen years. We use an open infrastructure, the Object Modelling System v. 3 and developed an open system, called GEOframe that has unmatched capabilities to be expanded while not wasting the old work done and maintaining your independence as developer.

The best way to understand OMS and see how it works is probably to give a look to the material of our last winter School on our system GEOframe. Specifically, this is the page of introduction to OMS. But also starting from installations of the material can give insights.
There you can find links to the OMS v3 pages at CSU and original material. Our choice of OMS and Java was long meditated. This was my assessment almost ten years ago. This is instead the assessment made by NIWA six years ago.

Here  you can find some thinking about the choice of programming  languages. We use, in practice, a mix of Python and Java. Python for treating and visualizing data. Java for writing our models.
When properly used Java is not so slow (twice slower of well written C++) and was favored by having an incredible suite of tools helping proper programming, project building and code maintenance that make the experience to develop in C++ a poor one. Python (specifically some of its libraries) and the Jupyter lab are instead a very nice experience for treating data and, besides, is supported by a vibrant community of developers, even among hydrologists, who really make the experience better and better everyday. Python is also becoming a “lingua franca” among scientists and this makes less difficult and steep to share results. I have a couple of pages to introduce Python to hydrologists that you can access starting from here. For what regards of Java one can start from here.
In any case Java is not mandatory for the use of OMS. Also FORTRAN and C++ codes can be used: NIWA did it with FORTRAN, but we never tried it.

OMS code is distributed with the MIT Open Source license. It is not available on a public repository though, but Olaf David, its chief architect, gave us access to it and does not have problem to give it to others. I recognize that this is a limitation but with more users, it would not be so difficult to get a branch of the source code in a public repository, I guess.
Our own source code is at the GEOframe components Github repository. The software is under GPL3 and the repository is open to anyone willing to collaborate.

The structure of the OMS allows to easily add components with any type of licence, the one more suited to you, and does not oblige you to release the software under the GPLv3 license.
Worth to mention is that OMS has a server side companion, CSIP of which you can find any information here.

Once Olaf David mentioned to me that the overall cost of OMS was closely 10 million of dollars. From my side I guess i invested around 1 million and more on developing GEOframe and its ancestors, Just to give a measure of the investment needed for such an enterprise. But building on top of them is now much less expensive and much more immediate.
Our current task are finishing the 1D-2D-3D solving of Richards equation (extended to treat groundwater and surface waters) and its coupling with the energy budget, evaporation and vegetation dynamics. This would replace our older GEOtop in two years, except for snow modelling for which we do not have started anything so far. We have also ongoing work for hillslope stability and a well established set of tools for doing lumped modelling, including the estimation of travel times and tracers/pollutants concentrations. Some other developments, more on the side of informatics were done by a former students of mine and are reported in his Ph.D. Dissertation. It contains also some work on neural networks.
For the future, an effort should be made to bring OMS to Java 9, which, I think, could make the code more understandable. Classes are a good thing but understanding the connection between them is what matters. Java 9 Modules should help to get the code more clean, and Gradle should do the rest for external libraries.  A few years go I started to dig into the code. I could not complete the task for my limited time but I believe one Java programmer can master OMS3 code in six intense months or so.  I also envision that, having a good project, OMS could be completely embedded in Jupyter lab making it usable through it making its use more familiar to a multitude of users. 

Obviously, we are willing to give any help, if you join us. I hope this information can help you to make your decisions.

Tuesday, September 17, 2019

Advances in Richards 2D presentation at the Italian Hydrological Society meeting

The work of Niccolò Tubini is going who already developed a very solid Richards1D (with ponding),  code coupled with the energy budget is proceeding towards a 2D version on unstructured grids coupled, at present with a 1D de Saint-Venant equation. This is the summary of the work done so far given at the Italian Hydrological society meeting in Bologna.

Actually the de Saint-Venant coupling is not yet ready but it will be very soon. Stay tuned. Click on the figure for getting the presentation.

Thursday, June 27, 2019

GEOframe Winter School 2020 - It is time to apply !


The second edition on the Winter School on GEOframe will be held between January 8 and 17, 2020 in Trento, Italy.  The course is devoted to Ph.D. Students, Post-docs, Young researchers (and Professionals!) interested in estimating all the components of the hydrological cycle (rainfall, evapotranspiration, snow-melting, and river discharge).  The system they will learn allows to work out very small catchments and continental basins as well (e.g. Abera et al., 2017a,b) up to build operational solutions as the one used in in Basilicata.

The aim of the course is to enable participants to run their own simulations and eventually on their own catchments and estimate the hydrological budget components.
With respect to the 2019 Winter School, there will be more practice and more detailed work on evapotranspiration and rainfall-runoff. It will be much more focused on exercises and on getting the water budget performed under various hypotheses on models' structure.


Website for the enrollment go here.

For the hole definitive material of the School go here


Teachers will be:

Prof. Riccardo Rigon, Ph.D.
Prof. Giuseppe Formetta, Ph.D.
Marialaura Bancheri, Ph.D.
Michele Bottazzi, Ph.D. candidate
Niccolò Tubini, Ph.D. student
Daniele Dalla Torre, research assistant


The provisional topics will be:

To have an idea of the topics, the interested researchers should give look at the material (slides, video etc. of the 2019 Winter School).  The material of the first three days remains very similar (but refined) to the old one. Therefore, for students is possible also to participate only to the second week (at the same cost, but saving some lodging) but, in that case, is mandatory to follow the on-line courses and tutorials  relative of 8-9-10 January topics and having done the exercises before December 15. We will offer prompt online support to them up to that date and no support whatsoever on the same topics later or  between 13-17 of January for clear reasons of course efficiency and organisation.  The refined material of the first three days will be available on the Winter School website  from November 15, 2019.

With respect to the 2019 School, there will be more practice and more detailed material on Evapotranspiration and Rainfall-Runoff. For every 40 minutes of talk there will be 70 minutes of supervised exercise for a total of 8 hour a day of activities. 

Cost of the School is 350 Euros for who will subscribe before November 15, 400 Euros for others. A discount of 20 Euros is granted to fellows of the Italian Hydrological Society (subscriptions for students are available at the IHS-SII site for 10 Euros to students and 20 to seniors). Who attended the last year school can participate free of charge, upon subscription. Inclusive of the costs will be coffee breaks and lunch at the Cafeteria of Department of Civil, and one social dinner for all the schoolmates Environmental and Mechanical Engineering. 

Website for the enrollment go here.

For any further information, please fill free to contact me at riccardo.rigon <at> unitn.it

Friday, January 18, 2019

Material for the GEOframe Winter School - Opinions on (hydrological) modelling

At the end day of the school there is the place for some opinions o modelling. These were expressed many other times in different posts but collected here in three different parts.

Some references

Thursday, January 17, 2019

Material for the post Winter-School-on-GEOframe

Dear All students of the Winter School on GEOframe. Was a pleasure to have you in Trento and a pleasure to see you work so hard for two weeks. On the organizer side, I have to thank my Ph.D. students Michele Bottazzi, Niccolò Tubini, Giovanna dal Piaz for their work and support. I have also to thank my former Ph.D. students Marialaura Bancheri and Francesco Serafin (almost former) for their support in the background. I also thank my former student Giuseppe Formetta and those who contributed in the past to this successful story (see here). For various reasons they were not present at this school, but they are absolutely part of our community.
It is important for us to have feedbacks from you and critique too, if they are constructive. Please address them to the mailing list of the School.

Now I hope that you complete your exercises, and let me to reuse your results for educational purposes. Let me know your opinions. With someone more interested, we can investigate a way to work around some topic and produce a paper on what you are doing.
If you want to go beyond in your knowledge, when you have assimilated well the GEOframe philosophy and tools, with your exercises,you can try Java. To start you can give a look to the Java 101 course for hydrologists. Is by far incomplete but in the next months I will work to add material (by me and collaborators) to bring people to contribute profitably to GEOframe. Our codes remans free and inspected at Github.
I indicated various book for self-instructions on Java that you can find here. I have other on OSF here that you can access upon request. We will certainly help you either at distance or in Trento, if you want to spend a period working with us.

So, again, was a pleasure to meet you.

Friday, January 11, 2019

Material for the GEOframe Winter School - Radiation budget

After having spent time on preparatory topics, but before facing the hydrological processes, we need to cope with solar radiation. The topic was already treated in other posts. However not often in English.

Some very elementary slides about the sun:

Now some more complicate topics
Documentation of the components
Exercises illustrated by Jupyter notebooks by Michele Bottazzi
References

Corripio, J. G. (2002). Modelling the energy balance of high altitude glacierised basins in the Central Andes. Ph.D Dissertation, 1–175.

Corripio, J. G. (2003). Vectorial algebra algorithms for calculating terrain parameters from DEMs and solar radiation modelling in mountainous terrain, 17(1), 1–23.

Formetta, G., Rigon, R., Chávez, J. L., & David O. (2013). Modeling shortwave solar radiation using the JGrass-NewAge system. Geoscientific Model Development, 6(4), 915–928. http://doi.org/10.5194/gmd-6-915-2013

Formetta, G., Bancheri, M., David, O., & Rigon, R. (2016). Performance of site-specific parameterizations of longwave radiation. Hydrology and Earth System Sciences, 20(11), 4641–4654. http://doi.org/10.5194/hess-20-4641-2016

Wednesday, January 2, 2019

Material for the GEOframe Winter School - Catchments and Hydrologic Response Units delineation

The second day of the Winter School on GEOframe is dedicated to the watershed delineation and hillslope extraction. First the relevant concepts are given. Then GEOframe (Horton Machine) tools are used to get the desired results.
Requirements: if not already done, install numpy and rasterio with anaconda. These will be used to visualise the maps produced by the OMS Horton Machine tools.

Day 2 actual schedule ... We recovered something from the first day.

Work in progress

Saturday, December 8, 2018

Material for the Winter School on the GEOframe System - Installations

The Winter School on the GEOframe system is approaching.  In this webpost you will find all the preparatory material of the school indexed.

Installations

You are not assumed to know Python or Java to participate to the School. However programs runs on Java.. We will not do any Java programming though.  Input/Output of models will be treated by using some scripting in Python. We will communicate the appropriate notions during the classes. However, for the interested there are plenty of courses on the web (for instance this comes from SciPy 2018. Other from SciPy here.)
  • Java. GEOframe and OMS are written in Java and they require to have installed Java on your computer. Here you can find instructions to install Java on your computer.  OMS need Java 8 JDK.  Please note that you need the Java Development Toolkit (JDK) installed not the Java Runtime Environment (JRE).  The official Oracle's pages are here. You can watch several videos for Windows: here. Googling you can get videos for your platform.
  • We are going to use Docker for our modelling. Therefore you need to install it (here for Linuxes) on your computer. To quickly understand what Docker is, you can see here. Or read this tutorial. This video could be useful too. The knowledge of Docker required will be extremely elementary. You will not be required to do Docker applications. You simply use one and, at the end, is just matter of executing a command. 
  • During the School we will use Jupyter and Python 3 for data management and visualisation. It would be great if you could arrive
    • The post at this link contains all the information needed. For installation of the software, we suggest Anaconda. For any problem contact us through the mailing list. 
    • To understand what a Jupyter notebook is about, please see its manual. However, we will use Jupyterlab.  (You can see a YouTube video about here).  One can think that Jupyter was heavily based on the look-and-feel of Mathematica notebooks: but Jupyterlab is a step ahead to something different. Installing Anaconda, you also have already installed Jupyter notebook. So you have just to try it issuing the command: 
      • Jupyter notebook
  • You still do not know what to do with it, but we will lear step by step during the Winter School
  • Finally, at least for MacOs user, due to a bug either in the Docker or in GEOtools, it is necessary to use the OMS Console.  You can download the beta 3.5.62 release from here.
  • If you want to further with Jupiter and Jupiterlab, you can  install BeakerX. For its installation, please follow verbatim the instructions here. The instructions given at the main page of BeakerX are incomplete ;-).

Thursday, August 31, 2017

A flexible approach to the estimation of water budgets and its connection to the travel time theory

This blogpost contains the Marialaura Bancheri (in this blog) dissertation for ending her doctoral studies. There is a lot of material inside that goes from how to do better hydrological models,  to doing it, to implement and deploys some OMS3 components.  Really a lot of material.
https://zenodo.org/record/858495#.WagcLNMjHwc

Clicking on the figure above, you can access the draft of the manuscript uploaded on Zenodo.  Here below, please find the Abstract of the manuscript:

Abstract

The increasing impacts of climate changes on water related sectors are leading the scientists' attentions to the development of comprehensive models, allowing better descriptions of the water and solute transport processes. "Getting the right answers for the right reasons", in terms of hydrological response, is one of the main goals of most of the recent literature. Semi-distributed hydrological models, based on the partition of basins in hydrological response units (HRUs) to be connected, eventually, to describe a whole catchment, proved to be robust in the reproduction of observed catchment dynamics. 'Embedded reservoirs' are often used for each HRU, to allow a consistent representation of the processes. In this work, a new semi-disitrbuted model for runoff and evapotranspiration is presented: five different reservoirs are inter-connected in order to capture the dynamics of snow, canopy, surface flow, root-zone and groundwater compartments.
The knowledge of the mass of water and solute stored and released through different outputs (e.g. discharge, evapotranspiration) allows the analysis of the hydrological travel times and solute transport in catchments. The latter have been studied extensively, with some recent benchmark contributions in the last decade. However, the literature remains obscured by different terminologies and notations, as well as model assumptions are not fully explained. The thesis presents a detailed description of a new theoretical approach that reworks the theory from the point of view of the hydrological storages and fluxes involved. Major aspects of the new theory are the 'age-ranked' definition of the hydrological variables, the explicit treatment of evaporative fluxes and of their influence on the transport, the analysis of the outflows partitioning coefficients and the explicit formulation of the 'age-ranked' equations for solutes. Moreover, the work presents concepts in a new systematic and clarified way, helping the application of the theory.
To give substance to the theory, a small catchment in the prealpine area was chosen as an example and the results illustrated.
The rainfall-runoff model and the travel time theory were implemented and integrated in the semi-distributed hydrological system JGrass-NewAge. Thanks to the environmental modelling framework OMS3, each part of the hydrological cycle is implemented as a component that can be selected, adopted, and connected at run-time to obtain a user-customized hydrological model. The system is flexible, expandable and applicable in a variety of modelling solutions.
In this work, the model code underwent to an extensive revision: new components were added (coupled storages water budget, travel times components); old components were enhanced (Kriging, shortwave, longwave, evapotranspiration, rain-snow separation, SWE and melting components); documentation was standardized and deployed.
Since the Thesis regards in wide sense the building of a collaborative system, a discussion of some general purpose tools that were implemented or improved for supporting the present research is also presented. They include the description and the verification of a software component dealing with the long-wave radiation budget and another component dealing with an implementation of some Kriging procedure.

Wednesday, August 30, 2017

OMS 3 essentials

OMS3 stands for Object Modelling System version 3 (see also this page here). Now it has also a server-side companion called Cloud Service Integration platform, CSIP. You can find information about OMS3 here:
A version of OMS3 source code is here.

For more general information you can browse the various dedicated posts in this blog.


https://contemplatingmontessori.wordpress.com/2011/11/14/platonic-solids/

For running it, you have to perform various installations. If can go to to the easiest path provided by 
Otherwise, if you prefer to go through all the details, give a look  to the short notes below. 

  • Java. GEOframe and OMS are written in Java and they require to have installed Java on your computer. Here you can find instructions to install Java on your computer. OMS need Java 8 JDK. Please note that you need the Java Development Toolkit (JDK) installed not the Java Runtime Environment (JRE). The official Oracle's pages are here but we now want to use AdoptOpenJDK (see why here). Recently, for simplify these installations,  and the companion installations of the system GEOFrame built upon OMS3, we have used the Anaconda Environment, here
There are various ways to use OMS. The most important two are using Docker or using the OMSConsole (the latter is not really up-to-date). Please notice that the OMS console still works for Java 8, while the Docker version can work with the most recent Java version (this does not implies that your OMS components work with it, if they contain some dependence on old Java versions).

References

To have a recent overview of the subject jointly with our GEOframe stuff, one can also give a look to 
Further information

Our development regarding the Net3 (Francesco Serafin's work): https://alm.engr.colostate.edu/cb/repository/24720 

Hopefully they will merge soon in an official release. All the "alm" repo at present require a password that can be asked to Olaf David (odavid <at> colostate. edu) col.

Saturday, May 20, 2017

ARS-AGEs is finally public

That is a news that I was waiting since a long time. AGEs is one of the other models that is based on the Object Modelling System infrastructure, and therefore a possible source of available components in our modelling based on GEOframe and JGrass-NewAGE tools.  I always beg for they to do this step, in order to have a clear basis on which to start collaborations and convergences. Finally they did.
Please, click on the image above for accessing the Bitbucket public repository.  They write:

"The Agricultural Ecosystem Services (AgES) model is a modular, Java-based spatially distributed environmental model which implements hydrologic/water quality simulation components under the Java Connection Framework (JCF) environmental modeling framework."

Actually, I do not like the word "JCF" which I do not know what exactly means, but is, anyway, a step forward openess that I appreciate.

Monday, April 10, 2017

Open-source software for simulating hillslope hydrology and stability

This is the material of the SC34/NH10.2 ECS: Open-source software for simulating hillslope hydrology and stability
by Giuseppe Formetta, Francesco Serafin, Riccardo Rigon, Raffaele Albano and Luigi Lombardo (co-conveners)

session of the  2017 EGU meeting in Wien.
For all of this work it is necessary to download a number of softwares.

Wednesday, February 22, 2017

JGrass-NewAGE: the first Potenza lecture

This is the presentation of JGrass-NewAGE structure and achievements. A lot of posts were dedicated to it. But there is always space for new perspectives and details, since it is a work in progress where talented students of mine put all of their efforts.
JGrass-NewAGE has grown to a stable and operational set of OMS components, documented in the GEOframe blog. We also developed good practice for software design and traceability of our efforts meanwhile that could be interesting to know.
Aficionados will recognize (by clicking on the figure) that the presentation contains various topics already largely spread in other posts. However, there are a few small little things that could be interesting. Or, BTW, the arrangement given here to the matter, can clarify some choices that could have been seen obscure in other occasions (the slides are in Italian but contain link to other material and papers in English).

Monday, February 6, 2017

Hydrology 2017

This year I decided to introduce strong news in my Hydrology course.  Not only a change of topics, but also a change of perspective. I increased widely the hours in the lab (up to 60%) of the class, and I arranged the lectures in a way that they could be followed by a three hour laboratory. Almost no lecture will be without numerical experiments. Another innovation is the use of Python instead of R.
I made this because of the large endorsement Python had among hydrologist and because:

  •  its object oriented structure is much more firm than the R one. 
  •  Besides, Python seems to be easy to learn by engineering students. 
  • Some of my colleagues seem to agree to converge toward the use of Python in their classes
R remains the first choice to do statistics. However, we have limited time. The class is 60 hours, and the material to convey a lot.
Here it is the foreseen schedule of the class:
Corso di Idrologia 2017

Legend: T - Theoretical lecture  - L - Laboratory class (this can include theoretical parts, but mostly students will exercise with tools)
  1. T - Introduction to the class
  2. T - A terrain analysis  primer. 
  3. L - Introduction to QGIS. Introduction to the JGrasstools in OMS.
  4. T - A little of Statistics and Probability. 
  5. L -  Delineation of catchments' characteristics with JGrasstools and QGIS.
  6. T - Precipitations. Mechanisms  of formation of precipitation. Ground based statistics. Extreme precipitations. 
  7. L - Intro to Python - Loading/reading files. Time series and their visualisation. (See Notebook 0 an 1 here.)
  8. T - Extreme precipitation statistics (parameters' estimation)
  9. L - Estimation of extreme distributions parameters. (See Notebook 2 to 5 here.)
  10. T -  Radiation (YouTube 2017). 
  11. L - Estimation of shortwave and longwave radiation in a catchment (data, executables, sim files are available through Zenodo. Who is interested in the source code and further information, plese refers to GEOframe or the Github GEOframe components site). 
    • A brief rehearsal of the matter given by Michele Bottazzi (M.B.) (YouTube)
    • Estimation of solar radiation with JGrass-NewAGE components (YouTube) by M.B. Part I
    • Estimation of solar radiation with JGrass-NewAGE components by M.B. (YouTube) Part II
  12. T - Spatial interpolation of environmental data
  13. L - Practical spatial interpolation of rainfall and temperature.  
  14. T - Water in soils. - Darcy-Buckhingham law- Soil water retention curves and hydraulic conductivity. 
  15. L - Numerical experiments on soil water retention curves and hydraulic conductivity.
  16. T -  Richards equation and its extensions.
  17. L - Experiments with a Richards 1D simulator
  18. T - Elements of theory of evaporation from water and soils - Dalton. Penman-Monteith. Priestley-Taylor
  19. T - Estimation of evaporation and Transpiration at hillslope scale
  20. L -  Estimation of evaporation and transpiration at catchment scale
  21. T - Water movements in a hillslope and runoff generation
  22. T - On the impact of climate change on the hydrological cycle (YouTube2017)
Verifications and tests 2017