Showing posts with label JGrass-NewAGE. Show all posts
Showing posts with label JGrass-NewAGE. Show all posts

Monday, December 30, 2019

Using GEOframe-NewAGE for operational modelling

Finally we did it ! Thanks to ARPA Basilicata and the work of my co-authors, Marialaura Bancheri  (GS) and Salvatore Manfreda (GS)  this long term objective of mine had a first realisation. We think GEOframe is a brilliant platform for operational hydrology, due to its flexibility and expandability.
we did not produce much new science with this paper. However, I think the introduction is brilliant, the explanation of how the models work of unsurpassed clarity, thanks to the use of EPNs, and, obviously, the system informatics really outstanding. You can find below the Figure representing the core modelling structure with this graphic system.
 Below you also find the representation of  how routing was implemented.  The latter figure shows how a dam was inserted in modelling. Because the EPN is actually reflected into the internal informatics, based of Net3, the dam can be inserted or excluded, according to what we want to simulate, without breaking the model, just on the basis of scripting.
It will be interesting from now on to monitor  how the system actually work in the operational context, and we will give proper information of it in the future. The paper is open access on Water, and you can see it here.

Tuesday, October 1, 2019

Discharge predictions on the Netravati River Basins using GEOframe-NewAGE

Giuseppe Formetta (GS) started to collaborate with some Indian colleagues for predicting discharges of Netravati River Basins. He used a modelling solution out of those from GEOframe-NewAGE to get his results and and presented the results at the last meeting of the Italian Hydrological Society held in Bologna. You can see the results of this work in the slides below.

He used CHIRPS data for precipitation and substantially a version of Hymod for any HRU to get runoff. Results are quite interesting.

Sunday, August 26, 2018

Winter School on the GEOframe system

The course for doctoral students, post docs and young researchers in Hydrology, Forestry, and related disciplines will cover the simulation of the hydrological cycle of catchments of various sizes with the GEOframe system. To know about GEOframe and GEOframe-NewAGE, please refer to here.

They say that all models are wrong but useful. However, with better tools you forecast and decide better.

The course will enroll at most thirty students and will be held at the Department of Civil, Environmental and Mechanical Engineering of Trento from January 8 to January 18 included.
The course will be of totally 68 hours (8 a day) of which 34 (4 each day) will be dedicated to laboratory and personal work under the supervision of tutors. The course includes as option to get an exam certification, upon the completion of an exercise, to have doctoral credits.

Subscription at: https://webmagazine.unitn.it/en/evento/dicam/44808/geoframe-newage-winter-school

Instructors

  • Riccardo Rigon
  • Michele Bottazzi
  • Niccolò Tubini
with material prepared by
  • Giovanna Dalpiaz
  • Marialaura Bancheri


The  topics treated has been:


Why choosing GEOframe over other models/platforms ? I would say for:
  • Flexibility: GEOframe is not a model but a system of components that interact at run-time. You can chose among various components options for any of the processes.
  • Expandability: If you like to program, with a little investment in Java you can write your own component and make them to interact with the others without having to reinvent the wheel.
  • Parallelism. Components work in parallel when their tasks do not interact, but this is transparent for you (we call it implicit parallelism). 
  • Spatial discretisation. A catchment is subdivided in parts (HRU) which can be modeled separately and are computed in parallel. The network structure is used to achieve the spatial parallelism. Its spatial modularity can be used to add/cut part of the basins without having to redo the spatial analysis, for doing multisite calibration, to progress the analysis of a larger basin in parts that are assembled together eventually.
  • Beyond-state-of art components.  Besides traditional approach to processes, we implemented a few new ideas for all the processes we covered.
  • Reliability.  GEOframe is currently used for the flood forecasting in real time by Regione Basilicata. It is not just a system for research that does not work in real cases. 
  • Tracers studies. Not treated in the school are present tools for doing tracers studies,
  • Process based modelling.  Not treated in the school, we have tools for integrating Richards equation in 1D, and we are developing tools for integrating it in 2d and 3d coupling it with the energy budget. These components will be able to interact with the other. We also started new developments on freezing soil and snow modelling.

The cost of the course for early subscribers is 270 Euros which includes lunch and parsimonious coffee-breaks  Member of SII, The Italian hydrological Society have a discount of 20 Euros. Cost of late subscribers (after November 15, 2018) is 370 Euros. 

After November 15 some work will be required to participant in order to setup their tools for running GEOframe. Installation of Java (version 8), installation of the Object Modelling System console, Installation of Python and Python notebooks, testing the use of some file formats. After the accomplishment of the requirements, students will be allow to bring their own study cases at the School.

Who wants to have early information or clarifications can write to me: riccardo.rigon at unit.it. Subscription page at:

https://webmagazine.unitn.it/en/evento/dicam/44808/geoframe-newage-winter-school

Wednesday, April 11, 2018

GEOframe-NewAGE becomes operational

Marialaura Bancheri after her Ph.D. defense mainly worked at university of Basilicata in Potenza under the supervision of Professor Salvatore Manfreda (GS) to apply GEOframe-NewAGE infrastructures to the realtime forecasting of discharges in Basilicata region. Salvatore presented the result of their work at EGU Wien 2017. Please below, find the presentation about the system implemented.
Clicking on the figure, you can access the slides. The work in Basilicata is a great achievement, even if only a few of the potentialities of the system were exploited.


Monday, April 2, 2018

GEOFRAME-NewAGE (a.k.a. JGrass-NewAGE) main publications

Please find below the main papers and the Ph.D. dissertations related to the GEOFRAME-NewAGE system. (You can find general information on GEOFRAME NewAGE starting from this post).

13 - Bancheri, Marialaura, Riccardo Rigon, and Salvatore Manfreda. 2019. The GEOframe-NewAge Modelling System Applied in a Data Scarce Environment. WATER 12 (1): 86. 

12 - Bancheri, M., Serafin, F., Bottazzi, M., Abera, W., Formetta, G., & Rigon, R. (2018). The design, deployment and testing of Kriging models in GEOframe. Geoscientific Model Development Discussions, 1–31. http://doi.org/10.5194/gmd-2017-310

11 - Bancheri, M., A flexible approach to the extimation of water budgets and its connection to the travel time theory, Ph.D. Dissertation, 2017

10 - Abera, W; Formetta, G.; Brocca, L.; Rigon, R.; Water budget modelling of the Upper Blue Nile basin using the JGrass-NewAge model system and satellite data, Hydrol. Earth Syst. Sci., 21, 3145-3165, 2017,https://doi.org/10.5194/hess-21-3145-2017

9 - Abera, W; Formetta, G.; Borga, M.; Rigon, R.; Estimating the water budget components and their variability in a Pre-Alpine basin with NewAge-JGrass, Advances in Water Resources, 2017

8 - Abera, W. - Modelling water budget at a basin scale using JGrass-NewAge system, Ph.D. Dissertation, Università di Trento, 2016

7 - Formetta, G., Bancheri M., Rigon R., Performances of site-specific parameterizations of longwave radiation,  Hydrol. Earth Syst. Sci., 20, 4641-4654, 2016, http://www.hydrol-earth-syst-sci.net/20/4641/2016/
doi:10.5194/hess-20-4641-2016

6 -  Formetta G. ,  Antonello A. , Franceschi S. , David O., Rigon R.,  Digital watershed representation within the NewAge-JGrass system. Boletin Geologico y Minero, 125 (3): 371-381, 2014. ISSN: 0366-0176

5 -  Formetta G., David O., Kampf S., Rigon R., Snow water equivalent modeling components in NewAge-JGrass, Geosci. Model Dev., 7, 725-736, 2014

4 -  Formetta G.,  Antonello A., Franceschi S., David O., and Rigon R., Hydrological modelling with components: A GIS-based open-source framework, Environmental Modelling & Software, 5 (2014), 190-200}

3- Formetta, G.,  Hydrological modelling with components: the OMS3 NewAge-JGrass system, Doctoral Dissertation, Università di Trento, 2013

2 -  Formetta G., Rigon R., Chavez J.L., David O., The short wave radiation model in JGrass-NewAge System, Geosci. Model Dev., 6, 915-928, 2013, www.geosci-model-dev.net/6/915/2013/, doi:10.5194/gmd-6-915-2013

1 -  Formetta, G., Mantilla, R., Franceschi, S.,  Antonello A., Rigon R., The JGrass-NewAge system for forecasting and managing the hydrological budgets at the basin scale: models of flow generation and propagation/routing, Geoscientific Model Development, Volume: 4 Issue: 4 Pages: 943-955, DOI: 10.5194/gmd-4-943-201, 2011

NewAGE is based on the Object Modelling System whose main reference is the following:

0- David, O., Ascough, J.C. II, Lloyd, W., Green, T.R., Rojas, K.W., Leveasley, G.H., Ahuja, L.R., A software engineering perspective on environmental modeling framework design: The Object Modeling System, Environn. Modelling & Software, 201-213, 2013

P.S. - The system has been formerly named Jgrass-NewAGE but we though it was better to avoid possible misunderstandings with the GRASS community (that we deeply love) and changed the name. Besides, GEOFRAME better interprets the spirit of the new components than JGrass.

Wednesday, March 28, 2018

GEOtop (PDE based) vs NewAGE (ODEs based)

This is a the oster we'll present at Tübingen on April 5 during the 2018 Hydromod Conference. It argues about process-based modelling and lumped modelling, intending that the first type of models solve partial differential equations (PDEs), the second (ODEs).

Clicking on the figure above you can access the pdf of the file and read the Q-codes, if you like. Q-codes refers to other posts in abouthydrology. Therefore as an alternative you can browse the blog for them.

Friday, December 22, 2017

Estimating water budgets with JGrass-NewAGE

We already talked about water budgets, and the papers of ours that deals with it (see below). Because in this Fall AGU meeting there was a dedicated session, we presented an abstract:

Recently we presented two papers one dedicated to the estimation of the water budget components in a small, basin, the Posina catchment [Abera et al., 2017], and the other in a large basin, the Blue Nile [Abera et al., 2017b]. Closing the budget in the two cases was different. Worth to say, it was much more difficult to close the budget at Posina, since at the large scale satellite platform can reasonably help to validate the results. At the smallest scale ground measurements usually available do not guarantee the closure of the budget without making additional hypothesis and remote sensing data cannot give very much help.  The hypothesis that we made is that the groundwater storage comes back to the initial level after a certain time, that we called Budyko time, TB. This time can be fixed arbitrarily, for instance, to five years and then varied to assess, through these trials the uncertainty of the budget. The large scale case was largely supported by remote sensing data, instead, either for calibration and/or validation. This contribution explains how we actually did, clarifies some aspects of the informatics necessary to obtain it and openly discusses the issues risen in our work. We also consider varying configuration of the water budget schemes at the subbasin level, and how this affects the estimates.
Finally we analyse the problem of travel times [e.g. Rigon et  al., 2016a, Rigon et al, 2016b]  as it comes out from considering the multiple fluxes and storages and discuss how much they can be realistic. All considerations and  simulations are based on the JGrass-NewAGE system [Formetta et al., 2014] and its evolution presented in Bancheri [2017].

As we say in the presentation, we could not talk about the travel times. However there are several other places where you can find about, here. 
Clicking on the above Figure, you will see the presentation that was used in NewOrleas. However, on Youtube, we uploaded an extended version with comments. 

References

Abera, W., Formetta, G., Borga, M., & Rigon, R. (2017). Estimating the water budget components and their variability in a pre-alpine basin with JGrass-NewAGE. Advances in Water Resources, 104, 1–18. http://doi.org/10.1016/j.advwatres.2017.03.010

Abera, W., Formetta, Brocca, L., & Rigon, R. (2017), Modelling the water budget of the Upper Blue Nile basin using the JGrass-NewAge model system and satellite data. Hydrol. Earth Syst. Sci., 21, 3145–3165, 2017

Rigon, R., Bancheri, M., & Green, T. R. (2016). Age-ranked hydrological budgets and a travel time description of catchment hydrology. Hydrology and Earth System Sciences, 20(12), 4929–4947. http://doi.org/10.5194/hess-20-4929-2016

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, July 26, 2017

The post-contemporary flood forecasting systems

This is the presentation that has been held at University of Calabria in Cosenza, July 27, 2017. The presentation builds upon several other presentation present in this blog, and discusses the issue of designing a modern flood forecasting system. Actually I distinguish post-modern, contemporary and post-contemporary systems. Of the latter a short manifesto is given.
Clicking on the figure above the reader can access the first (Italian) version of the presentation. The English version can be seen and downloaded at this link. Once downloaded, the pdf contains links to publication and other relevant presentations. With respect to the Italian version, the English version contains a few small variations. One, in particular, was suggested by Daniela Biondi. She suggested that in my Manifesto for the post-contemporary flood forecasting systems, I should add the estimation of errors in forecasting. Suggestion that I fully endorse.

Monday, July 10, 2017

A look back to go forward with JGrass-NewAGE

Let's give a look to the last two papers to delineate what is missing. They are all about the use of the JGrass-NewAGE system.


The key aspect of the whole treatment of the water budget is the closure strategy based on the Budyko hypothesis. This has been obtained by a suitable adaptation of the previous Adige-Hymod component that has to be futher cleaned: closing the budget in this way should become more easy and "normal”.  Notably, the method implies that we cannot easily account for cc, unless we let TB increase or decrease with time. However, there is no clear way to obtain this sliding TB from cc simulations.
Another aspect that distinguishes Pp is the use of MODIS for assessing the snow cover. That method would require a better definition, and a standardization of procedures which, again, is missing.
A weak point of this procedure is that ET does not depends on soil cover  characteristics. These characteristics have to be introduced appropriately, for instance giving plants' properties, which include foliage and some plants and roots dimensions which  affect water flows.

Other questions  involve the amount of simplification made when considering an HRU as the basic unit, and how a forcing attributed to a single point (inside a HRU) is representative of the variability of the whole area. Esemplificative is the case of the ET response, obtained by a single point or a small group of points inside the HRU and not by processing all the points. 
With respect to this, the original (version 0) of JGrass-NewAGE was more farsighted by introducing the  energy index calculator components. This OMS component was set to estimate the ratio of radiation received a single pixel inside the basin in a prescribed amount of time (i.e. a month, a year) with respect to a reference pixels. Then, when working in “real time” this factor was used to estimate (approximately) the radiation of the whole HRU on the basis of the single estimate of the reference point and saving, therefore, a lot of computational time. This type of simplifications should/could be reintroduced back again and used when relevant (for instance in Pp this should have been irrelevant for temperature, since its small variation inside each HRU). 


Besides what already said for the Pp that is valid also for BNp, there is to talk, for this paper, about satellite data. All the procedures to obtain those data were performed by using R scripts which are not reproducible and/or not well designed and/or not designed to be available to third parties. To make that research really sparkling, it would be necessary that those scripts and procedures would become real OMS components to be connected with the other ones that constitutesthe core of the paper.

The second point, obviously, is the use of very large HRU that was made: more than 400 square kilometers each on average (not so big, just as large as a square of 20 times 20 km). Therefore the arguments used in Pp, where HRU are of a few kilometers estension, are much more important here: how the sub grid variability of forcings like radiation affects the final results ?
Another aspect not well investigated is how the routing scheme used  affects the results. Clearly in a so large basin, this has to be investigated more thoroughly. Our tools have several routing schemes, including an integrator of a 1d de Saint-Venant equation. Using them could have some importance for the final assessment of our work.

Beyond this, another question arises: can we use those data and those results (in Pp and BNp) as benchmarks for future develpments of our system ? If not, this would be a big wound in our claim to do replicable research.


So, Let's get our sleeves back. 

Friday, March 10, 2017

The tale of open source codes

Prologue

Why did I choose to produce with the people directly working with me (ph.D students, master students, postdocs) open source software ?

- because is good for science
- because I am paid by a public institution
- because it is a neutral conditions that can serve the rights of all the participants (in particular mine of freely use and modify the software at my will an defend myself from who, people or institution, would like to close the software, even against me). On the other side,  my intention is clearly that my projects serve as a seed for developments of my students (or others) who can freely use the products of my research and maintaining it alive beyond me and despite me. *

I use GPL (for its interpretation, see here) but many others licences could work.

A declaration

In this way, I think, I have the right to claim to be able to use or peruse the software outcomes from my group. I declare that I want to use “fair play” rules, but, it should be clear that these rules cannot extend to limit my research freedom. People who claim the participation to papers where they give no contribution, except having producing the code that we produced together, have wrong arguments. People who claim to be involved in projects or researchers, without any other reason that I want to use the software they contribute (under GPL), have wrong arguments.
Neither they can claim that I have to warn and tell them personally what I am going to do in my research with the common code, for having their consent.
They would be right to protest, only if I would not enlighten their contribution on previous work properly.
My research for my own belief is actually very public and its evolution too. It can be found at the abouthydrology blog. My core research is shared with my teamwork. This includes just the people of whom I have direct responsibility for age and rule (Master students, Ph.D. students and postdocs) and whom I sustain with funding, my own time and ideas.

With all others, including my masters, and my former students, colleagues, friends, women and men that like my research topics and achievements, and me, I can have collaborations. This means that we can share part of our views, beliefs, discussions, fightings, friendship, papers, parts of code. However our own agendas, in this imperfect world, do not coincide, and if they do, this happens for an incredibly short time. It seems it is a declaration of distance, but it is just consciousness of how life works, and the first step to start an effective and respectful collaboration.

Q&A

Can my students refuse to develop OS software ?
No, as soon as it is the product of common intellectual efforts in which they, maybe, write the code, but I will say what to write.

Do I start collaborations in which not OS code can be developed ?
Never say never. However there should be very strong reasons because, from my side, I to support this. Certainly in projects there could be partners that develop non open source software, but this falls in the responsibilities of who gives the financial support.

Is the requirement of open sourceness enough ?
No, it isn't. Open Sourceness is useless if not followed by good practices of using open repositories and collaborative modalities of action.

Can my students refuse to learn these practices ?
For the common work no. I am not responsible for the rest. I tend to fully book their time, though.

Do I start collaborations where these practices are not followed?
I would prefer not, but I do. Certainly collaborations can be at different levels and rarely they are about co-producing software. I would not participate to joint projects where I put ideas and expertise and others write closed codes, unless they pay me or my group a lot. Really a lot. I can participate to projects where other subjects put their ideas, or ideas from literature, in their own closed code, and I put mine in OS codes. However, the situation I prefer would be a common production, as a community, of open source codes.

My own use cases

Here below I summarised (with quite large simplifications) my software history in order to further justify what I wrote above.

Professor means who puts science, time, and money (funds derived by projects). Student means who puts time and science. Companies means they put time and money and business related efforts. Agents, Subjects are generic actors of the play (they can be either students, professors or someone else). Community is the informal group that happened to gather around the projects and, eventually,  evolve them.

Case 0

Professor Z writes the initial library. On top of that A builds radiation budget. Student B writes surface water flows. Student C implements soil-atmosfere interactions. Students D writes vadose zone components. Student E writes snow treatment. Student F rewrites snow components, then rewrites most of the codes interacting with student G and student H. Student I writes codes for landslides triggering treatment. Student G writes a small but important portion of the a little but successful part of the freezing soil hydrology. Professor L hires F. F continues to rewrite parts. G start a huge operation of cleaning the code, moving it to C++, uploading it to an open repository. C comes back and starts to use the code in his research and occasionally hires H to do some ancillary work for treating data. In meantime G  has founded a company where the common code is the basis of the business. M company, initially hired by L, works on the code to refactor and enhance it. M works collaboratively with G and F. M to setup continuos integration. Student N starts to produce executables for the main operating systems and eventually on Cooker (fictional name). M embraces immediately this philosophy.


Case 1

Professor Z writes the initial library. Z writes more than fifty tools for terrain analysis. Student A (not the same as above) ports them to a major Open Source GIS. Z and A start the construction of a new GIS, say JG. Initially JG contains just the the terrain analysis tools and some simple hydrological model. They start to do schools for financing their project. This works for some years. Student B, in the meanwhile, has joined the crew and A & B funded the company AB. They live with schools, supports from a main project of Z and other resources (a main research projects). A cleans the tools' suite and inaugurates the name JGT for them. Z uses JGT in his classes.
Z, A, and B decided to join the development of UGIS. Some research projects supports them together with resources raised by the company AB on its own. Students C and students D write some further modules. UGIS  funding disappears, and UGIS slowly becomes an almost inactive project. AB brings JGT to an intermediate product ST. Z continues to USE JGT in his classes. AB finally joins the development of a new GIS, say GS.
(In the middle,  A adds new tools, AB wrote an Android app, Aapp, and expands its business. Aapp is not  related to JGT, but worth to mention). During the years A and B get a Ph.D. whose topics are related to the GIS work. Student E with a small effort brings back JGT also to a platform, OI that Z uses with his students.

Case 2

Thanks to an unexpected financial support from project 00, Professor Z hires a five students to build from the scratch a new modelling platform. For this new software enterprise, he and company AB (funded by his former students A and B) chooses the open source framework OI. He hires former student C, to help software developments and former student D and E for the general management of the project and data gathering, respectively. C works more on improving and enriching JGT (see case 1 above) which serves as a basis for the terrain analysis functional to modeling. A and B develop a full suite of model components (the new paradigm) for: temperature and rainfall interpolation, rainfall-runoff, evapotranspiration and various tools to visualise components' inputs and outputs. AB also designs and populates an SQL database that contains all the data of the projects. The projects 00 ends. The Institution that supported the project close it in a drawer.

With other financial support, former 00 project's tools are maintained in life. Open source framework OI is changed for open source framework OM with a notable reduction of code lines (but it is a huge code effort, indeed, almost entirely on AB shoulders). With embracing OM, also starts a research collaboration with professor U and W.

Student E comes into play. He realises that rainfall-runoff does not work well. AB company has to survive on its own and cannot give very much support (https://vimeo.com/144089061). E implements a new rainfall-runoff model. AB, however, hires F for a small project where he works on radiation. Eventually, E refactors F's work and highly expands it. E adds a new snow modelling component and does/refactors evapotranspiration. In doing this (pouring sweat and blood) he, however, has the guidelines of the open sources codes already written. E spends some periods at U and W. E also refactors and enhances the Kriging code. Eventually E graduates and starts his career as post-doc elsewhere. In the meanwhile he finalises his research in a series of papers.
Student G comes. He does not have programming skills, but quietly learns to use the components of E and produces some interesting papers where E is co-author.
A new student, H, comes into the game. She works first on radiation on top of E code, then she starts to implement tools for travel time analysis and another rainfall-runoff component.
Student L comes. He  has a strong attitude for informatics. He brings-in new ways to manage projects. H and L implement the OpenOpenSoftware repository, and the site BeatifulGEO (names are fictional, but tools real). H refactors the old code,  and together with L (who, sort of, leads the learning process), introduces design patterns for increasing code reusability. L provides the trickery to have continuous integration on OpenOpenSoftware using GETIT and connects software deployment to ISTOREIT to store official versions of the components. Students M and N come in to stage and start to use the code. Professor Z (with the help of H) starts to use the components with his students for his classes. Student L evolves the original OM capabilities to allow for more flexibility and to increase the computational power of the models. H brings-in her models into the new infrastructure.

Discussion and Conclusions

The above is a summary (where, I say again, I simplified many passages) of my main software enterprises. Could have they been evolved all differently (and better) if I would not have applied an open source strategy ? Probably yes, but I should have constrained the students to a contract about the property of the software. In this way I would have deprived my students of parts of their own work.
At the same time, I could not have left the software simply to them. The histories themselves show that I built my own work and research on the software we develop, and being free to use it and modifying it was a necessity. If I have needed to ask permission to use it, to sign a contract or so with someone (for instance who gave financial support), all the development would have been much more difficult to pursue. The same apply for other Actors who invested time and resources in the software development just because it was open. They are usually singles or low budget companies that could not have afforded expenses related to other type of licenses and be subjected to limitation of the software use.
Other researchers used the model. Being it free and open source was a clearly an added value for them.

Keeping the software close and commercial, besides not having scientific reasons (which require the contrary), would have obliged me to change myself in a businessman and turned away from my science. There are several cases of scientists that turned to captains of companies. But, for instance Stephan Wolfram, a gifted scientist, did not give very much contributions to science after he devoted his energies to MathematicaMathematica (probably the best computing environment ever) itself is his main achievement (which is not depreciable), despite his own claims on "New kind of Science"s.
The overburden required for managing a commercial software is not for all and has its own dynamics, that personally I  could not bear.

The fact that my code is free and open source has allowed (not without difficulties) self-instruction of new incomers. Various Agents had the possibility to start experiments and investigate new directions of development. Nobody needed to ask for starting them. Asking is a process that would have decreased dramatically people or groups pro-activity.

The Community had benefits from this policy. In some cases, single Actors could have thought that their contribution was not recognised enough and did not give to them an advantage. Their argument is  flawed. All of them had advantages from the collaborative environment and nobody (me included) could have produced what s/he has achieved without building on the shoulder of others and other open source projects.

Forgetting the above, some feel that their work is not enough protected, and being all open source, newcomers can more easily jump in and take advantage of their work.
Uncertainty on future, a competitive society, the pure necessity to find something that pays you for a decent life incline even to bests to a moderate selfishness or a moderate parasitic behavior. They do not want to give back to the community, after having got a lot from it, and act defensively.

Well, this behavior is absolutely possible if their developments do not use the original code that was produced as GPL. In particular, the components strategy used in project 2 above allows for building on top of the open source material new, undisclosed material, that anyone can use for his/her own profit, with a non open license.
I have to warn, however, that if the moderate parasitism grows too much, enthusiasm that is always necessary decreases,  the projects die, the source of benefits disappears and the community falls.

I would say that a mild parasitism is functional to the community if it is necessary to sustain the collaborative Subjects, and if eventually the Subjects give something back to the community. Parasitic Subjects themselves act in favour of the community by spreading and advertising the products, and sooner or later this will be bring benefits back (so do not blame them, they are, in any case, part of the stream).

Some Subjects actually wants an opaque management of the GPL philosophy in which people maintain an informal (but they pretend recognized) property of the software that goes beyond the copyleft and the intellectual recognition of their contribution. This would imply, in their mind: preferential redirection of funds towards them; involvement in papers or conferences contributions that use their code; veto power towards actions of thirds.
These desiderata are based on misunderstandings. It is clear that they will be involved in papers, conference, and decision. Any (wo)man and community of good-will will apply this policy in their favour, if they do not grow too greedy. But these actions are not mandatory and not even necessary. GPL does not implies them.

To be more clear, especially in hydrology, the market out there treats our model and softwares as a fungible commodity, that is, the market tends to treat all the codes as equivalent or nearly so with no regard to who produced them. (I think this is wrong, highly wrong, when brought to an excess).
But also the internal market, inside the community, treats them as commodities, meaning that, it would be dysfunctional, it would cause a waste of precious time, but any contribution is perceived as a thing that can be replaced (this is part of the not said history of 0,1,and 2 projects). Everybody is important nobody is necessary.


The A. paradox

One common argument of reluctant open sourceres  is: “I did not have still tapped the results of my own work and I should share it (statement 1)”, or "if I share it, others will use it without me and I will have no personal gain(statement 2)".
The first danger can be overcome, by an appropriate delay of the disclosure of documentation and explanatory material (I would not argue that keeping industrial secrets is useless, in general, however). That is: it is matter of having strategies that prevent the negative cases. In our field, however, being everything perceived as a commodity (see above) nobody will care to use our model or achievement instead than another one that gives what is (wrongly perceived) as similar, especially if our code is not known. Being open source with proper support actions helps model spreading.
Besides, looking at my histories (see also here), software changes fast and is, by no means, immutable. Histories 0,1, and 2 are signed by change. So the advantage one has with a new code in hands is ephemeral. In my own estimates you have just a a year of advantage for small codes, and a few years of advantage with a large and complex code. This small advantage, if you are smart, can be appropriately managed and used to produce new and more innovative code and so on. (Open sourceness is against stagnation).
Often, however, it is not the the fear of far away threats that makes problems, but the fear of close by Agents. Guy A fear that B in the group who came in after her/him, will get positions or funding with his/her work. I would say that this could happen but it is difficult. In a fair (not fear) competition A always wins over B, if the quality of B can just be attributed to codes that A developed. The real problem is when B is much better that A. But in that case, having A work for B is not important. B will get rewards instead than A almost always. For A, the best thing, in the medium range, is to collaborate with B.
What, finally I really call the A. paradox is in statement (2). If it is so easy to grab your work, then it would be equally easy to anyone to replicate it. Therefore your work is not giving to you any competing advantage, even if you keep it secret for a while. If it is not easy to grab, then, who wants to use it proficiently needs you. So you are the winner, not because you keep your code top secret, but because all the issues it solves require a complex expertise that only you, the author can have. So ….

Epilogue

Professor eventually Z disappears. Not because he dies (please do exorcisms), but because his role, in the growing group of people around projects has become more and more marginal. Subjects also acquired maturity and as well as the will to maintain the advantages that the work has produced with respect to competitors.
This passage requires that the initially informal community establish as a formal Community (they wrote here for Academics) with its rules, etiquette, and wise management. This, in turn, requires Subjects coordinate and share alike their views, plan together new developments, plan events to make the common work to grow. Balkanisation of the code (which GPL could allow) and internal conflicts (never avoidable, having the Subjects different agendas) should be managed appropriately, and this requires clear agreements, smart actions, good will, and wise arguments.
If the community grows, everybody would be safer, because cooperating is better than competing (see also coopetition).
A partial adoption of the Open Source strategy is instead very useless. Open source codes that are practically not available (as those that are open source but not freely downloadable) cannot grow a healthy community and, sooner or later, die.

* A final note

Actually even if in my intention is a project also for my students, not a few of my students do not deeply endorse it. Reasons for this can be, maybe found in their personal history, the chemistry of their bodies and minds, or something else, which is hidden to me. So far, I  overreacts feeling myself betrayed, when they dismiss in what I believe it is right. So, probably my attitude is not is not correct. Sons do whatever they want, and probably they are right to try to find their way. So I have to conclude that the above is MY dream, and I will not be upset anymore, if my academic sons search their own in a different way.

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

Wednesday, February 1, 2017

Modelling the water budget of the Upper Blue Nile basin using the JGrass-NewAge model system and satellite data

This paper must be read after its companion on rainfall published in Atmospheric Research. There we were concerned with rainfall estimates over the large areas of Upper Blue Nile (UBN). Here we move on to estimate all the other components of the water budget. A similar goal was searched at small scales and with different tools, in this other paper about Posina catchment. So the paper can be considered sort of complimentary and covering a range of possibilities allowed by the JGrass-NewAGE system.

The paper abstracts reads: 
"The Upper Blue Nile basin is one of the most data-scarce regions in developing countries, hence, the hydrological information required for informed decision making in water resources management is limited. The hydrological complexity of the basin, tied with the lack of hydrometerological data, means that most hydrological studies in the region are either restricted to small subbasins where there are relatively better hydrometeorological data available, or at the whole basin scale but at very coarse time scales and spatial resolutions. In this study we develop a methodology that can improve the state-of-art by using the available, but sparse, hydrometerological data and satellite products to obtain the estimates of all the components of the hydrological cycle (precipitation, evapotranspiration, discharge, and storage). To this scope, we use the JGrass-NewAge system and various remote sensing products. The satellite products SM2R-CCI is used for obtaining the rainfall inputs; SAF EUMETSAT for cloud cover fraction for proper net radiation estimation; GLEAM for comparison with estimated ET; and GRACE gravimetry data for comparison of the total water storage amounts available. Results are obtained at daily time-steps for the period 1994-2009 (16 years), and they can be used as a reference for any water resource development activities in the region. The overall long term mean budget analysis shows that precipitation of the basin is 1360 ±230 mm per year. Evapotranspiration covers 56% of the yearly budget, runoff is 33%. Storage varies from minus 10% to plus 17% of the budget. "
The manuscript was submitted to HESS and went trough  a first round of revision (see the Discussion page). A revised manuscript was submitted. Please find below (on Zenodo):
The paper is now accepted and available at the HESS site.
   

Thursday, October 27, 2016

Working with us

After the scaring version, the practical version.  To incoming Ph.D. students

Dear *,

working with us means using our models
Both of them have a consistent history that involves also quite a group of publications. Their main information can be found following the links.


GEOtop,  to say the complete thruth, has a group of video tutorial (in Italian) that you can find here. University of Calabria paid Mountain-eering for doing them, so please use them with confidentiality.

Looking in perspective, I am working to a new incarnation of GEOtop in components. As I already explained here.  There will be then, a convegence of tools towards OMS3 and its evolutions.

So what I suggest ? First start to study the models at the links above. Willing to learn a computer language, start with Java. To start, read here.  To continue, go here.

In this language I invested quite a lot during the years. Why I choose Java can be found here.
I wrote it four years ago, but the concepts are still valid.  Recently I become more moderate, and opened to other languages. Here my opinion.

Friday, September 23, 2016

The Adige database or the database NewAGE

This is to introduce the Adige database that collects as many possible data about the Adige river.  It is the result  of many years of work (involving Alberto Bellin (GS, RG), myself (GS, RG), Bruno Majone (GS), Francesca Villa, Hydrologis and many others), across various projects the latter of which are the CLIMAWARE project and GLOBAQUA ones . It contains geometries (it is a spatial database), time series, intakes and outakes data. It is a gold mine for whom wants to dig into it.
The presentation is due to Stefano Tasin, one of my master students, and it is in Italian.  However the slides could be understandable also by those who have a knowledge of SQL or want to get it, after some little effort. Clicking on the figure above you access his presentation pdf. Tables in the database are documented here
The database is in sqlite and spatialite, expandable and, I hope to find someone who can legally maintain it and offer it as open data.  The whole DB is contained in a ~1.5 GB file called NewAgeDB.sqlite.

Friday, August 19, 2016

Estimating the water budget components and their variability in a Pre-Alpine basin with JGrass-NewAGE

This paper shows the estimation of whole water budget in a 100 hundred square kilometers catchment of the Prealps, the Posina catchment.  The challenge here is to close the water budget with a coarse-grained model. The basin has alla the complexeties such a basin can have, and snow has to be taken into accounts.
Input data available are discharges measured in several gauges and hydrometeorological data measured in twelve meteo stations. However, evapotranspiration is not explicitly measured, neither are the water table levels.

The paper starts with treatign carefully the water inputs, and, chosing Kriging as a method for interpolation, detailed how to do it with the new tools offered by Jgrass-NewAGE (all the posts here).  It also discusses the separation of precipitation in snow and rainfall, and illustrates a way to do it by using MODIS data. Closing the water budget further requires some trick for separating water storage in soils and evapotranspiration. The paper devises a method for doing it, in assuming that the water storage is nullified after an appropriate set of years, called Budyko's time. The final outcomes is a reasonable estimate of any of teh components of the hydrological cycle at various time scale, and spatially distributed according to a partition of the catchments in hydrologic response units (HRU), as those depicted in the figure above. In any case, you can have the details of the story by reading the paper itself, by clicking on the figure or here.
Information related to this paper can also be found in the post dedicated to Abera's Ph.D. defense.
The preprint has been submitted to Advances in Water Resources.

Update

The paper was revised. Answer to reviewers, complimentary material and the new paper itself, can be found on Zenodo.

Update 2 - The paper was accepted for publication in Advances in Water Resources. You can find it here.

Wednesday, July 20, 2016

OMS Summer School 2016 - What we actually did

This is what we actually did at the Summer School on OMS3. Here you will find slides and material (actually, it is already presented in the Colorado State University site), but I will document here a little more.  (The material of the Winter School 2019 is quite more informative that this, which is left however for completeness)

Instructors

Wuletawu Abera (University of Trento, Italy)
Olaf David (Colorado State University, Fort Collins, US)
Giuseppe Formetta (Centre for Ecology and Hydrology, Wallingford, UK)
Tim Green (Agricultural Research Service, Fort Collins, US)
Greg McMaster (Agricultural Research Service, Fort Collins, US)
Scott Peckham (University of Colorado, Boulder, US)
Riccardo Rigon (University of Trento, Italy)
Francesco Serafin (University of Trento, Italy)
Marialaura Bancheri (University of Trento, Italy) 



Monday -  Introduction, Component-based Modeling Concepts 

09:00 - 12:30 Scope of the class
  • Class introduction (Rigon) - I could not be present, so someone talk in my place. 
          I think what I would have to tell you is here.
          Other information on Naming things in hydrology is here. However, Scott's                presentation 2 is pretty informative.
14:00 - 17:30 Getting Started with OMS(David)

Tuesday -  OMS Introduction

09:00 - 12:30 
  • Component Integration (David)  Presentation 
  • The Water tank example (Peckham, David) 
        watertank.pdfwatertank.zipwatertank_example.pdf

      The water tank  example is very simple, but very illustrative of what a model is. Today there is a         tendency to think lumped models as a set of tanks with rules for moving water. I will do a post             soon for it.

14:00 - 17:30 OMS Basic Building Blocks (cont.) Step By Step 
  • Project structure, components, simulations, file formats, annotations, etc. (Overviewexamples.zip )
  • Simulation Development. (scripting, testing, component connectivity, Examples
  • Thornwaite Waterbalance Model example
References: Annotations, DSL, CSV, OMSConsole

Wednesday Modeling Applications I

09:00 - 12:30 Hydrological modelling JGrass-NewAGE (Abera)
         Presentation, LWRB.zip, DMW.zip

14:00 - 17:30 Model calibration algorithms in NewAge-JGrass(Formetta)

        Presentation, prj-adige.zip, prj-snow.zip

References on JGrass-NewAGE can be found here. References on the Horton Machine can be found here. Maybe for most of you is a mystery what Pfafstetter numbering is. You can find information here. If someone has further doubts on components, they are documented on the GEOFRAME blog. If you do not have experience with calibration algorithms, you could start from some recent paper by Hoshin Gupta.

Addedum. Giuseppe added also a presentation of what he did on simulating landslides triggering with GEOtop (by embedding it in OMS3).

Thursday Modeling Applications II 

09:00 - 12:30 Agricultural Ecosystem Services (AgES) Watershed Model (Green)
      Presentation, Ages-Brazil.zip
  • Model Description  
  • How to run AgES in the OMS Console (Quick Start)
  • Brazil case study (streamflow)
  • Colorado, USA case study (distributed soil moisture)
AGEs is a "storages" based model, meaning that, as many other modern models, is based on the concept of intercommunicating storages. Physical contents are highly parameterised, but the model works. One of the model characteristic, which is common to other agricultural-oriented hydrological models, is the subdivision in small parcels with multiple communications among them (called Hydrologic Response Units). Interesting also the slides regarding the complexity of models.

14:00 - 17:30 Plant growth modeling with AgES (McMaster)
     Presentation