ground- water, geo- statistics, environmental- engineering, earth- science

Mindstorms: Playing and Learning from Mistakes

without comments

Seymour Papert lays down the foundations of his philosophy about programming and about learning in his book Mindstorms: Children, Computers, and Powerful Ideas was heavily involved with the creation of the programming language “Logo” (downloadable here). The main use of this programming language is education in general and learning to program as a side effect. It seems like no coincidence that the name of “Lego Mindstorms” is related to Papert’s book’s title, given that the ancestor of the Lego kit was programmed in Logo.

“Logo” in Python

There is a python module called “turtle” in python, that mimics the capabilities of Logo. This is what I used to create the figure below. There are many more examples online, f.ex. here. The point of turtle and Logo is to provide an interface that is easy to grasp, but that allows to build stepwise more and more complex things. I’ve seen an implementation of Tetris using turtle.

“Das Haus vom Nikolaus” drawn with turtle in python.

Learning and Playing

One of the first points of Papert is that the modern car was not created based on an analysis of the bad things of horse-powered coaches. Rather it happened because some people played around, “experimented” is probably a nicer word. Directly related to playing is the fact that you make mistakes. Which according to him is nothing bad as long as the mistakes are recognized and fixed. Unfortunately, some people are afraid of making mistakes. Papert calls this “Mathophobie”.

In that sense, Papert argues that it is a good thing if a (young) learner is following epistemology, following two approaches

  1. take “the novel”, the things to be learned, and provide a context with something already known
  2. take “the novel”, embrace it and adopt it, and make based on it something new.

The computer, and the turtle, or any programming language offer a valuable tool for playing, because it is very easy to fix mistakes! Hence, computers and programming can take away the fear of making mistakes! This sounds like such an awesome thing, but then, debugging can be quite painful! ūüėČ

Mistakes in Hydro-Geo-Logy

Unfortunately, I am aware of only a very limited number of reported failures in hydro-geo-logy. “The Court of Miracles of Hydrology: can failure stories contribute to hydrological science? is one example. They build on Popper instead of Papert, but go along a similar vein. And in that issue of the journal there is a list of papers that deal with hydro-geo-logical mistakes. One example are models that are “right for the wrong reasons”.


Keeping all this in mind will hopefully make me a better teacher in the coming term, but also hopefully keeps me constantly reminded to try out things, if nowhere else than in the code editors! When using Computers, I look a lot at data, process data, and analyze the results. Sometimes, it is quite astounding, it almost seems magic to me, that this entire process works. Inevitably, errors occur, and they need to be found and fixed.

Written by Claus

September 24th, 2015 at 9:51 am

Posted in

Presenting at Heterogeneity Conference in Valencia (MADE site)

without comments

I will be presenting at the AGU Chapman Conference “The MADE Challenge for Groundwater Transport in Highly Heterogeneous Aquifers: Insights from 30 Years of Modeling and Characterization at the Field Scale and Promising Future Directions” website.

Details my talk at the Chapman Conference
date Monday, October 5, 2015
time 04:00 PM – 07:00 PM
location Blue Auditorium at the Research Park, located on the campus of the Universitat Politècnica de València
title of talk ‚ÄúModelling Non-Linear Spatial Dependence with Applications to MADE Hydraulic Conductivity Data‚ÄĚ
authors Claus Haslauer, Geoff Bohling

The MADE site is one of three sites world wide, where very detailed measurements of aquifer properties and solute transport movement within these aquifers were taken. The other two sites are in Borden, Canada and Cape Cod, Massachusetts. The detail of monitoring was very fine for hydrogeologic applications, e.g. via test well installations used to sample aqueous geochemical parameters, that some people argue that those wells influence the properties of the aquifer (see Figure below).

MADESite1995 blog
The MADE site in 1995; Image by Geoff Bohling

A review of the first 25 years at the MADE site is given by

C. Zheng, M. Bianchi, and S. M. Gorelick, ‚ÄúLessons Learned From 25 Years of Research at the MADE Site.,‚ÄĚ Ground Water, vol. 49, no. 5, pp. 649‚Äď662, Sep. 2011. URL

Written by Claus

September 9th, 2015 at 10:17 am

Posted in

10 Minutes of Yoga (or Programming) Per Day

without comments

I knew it through experience. I knew it from Malcolm Gladwell’s 10,000 hour rule, stating that you need about that number of hours of practice to excel in anything. It is tough. I feel like I had a lot of those hours spent in front of the piano, and I feel like i am not much further then when I started.

In my daily work, I do a lot of programming. By now, I would say I feel mostly comfortable in python. But, I am no computer scientist, and not a developer of a programming language. I once had a roommate who wrote an operating system for a term project. So at least I feel like I can gauge the work involved. What I try to get to is this this recent tweet from one of the key ipython developers. How awesome is this?

One year of constant commits to github
One year of constant commits to GitHub by minrk.

Also interesting is that not everything is dark green. It can not be. 10 minutes of Yoga per day are better than 30 minutes once per week!


So my goal is to program from now on at least 30 minutes per working day.

I played around with various tools to help me keep track of things. I feel like I can’t commit to one repository I have some stuff on repos that I host myself on a server, some on github, some on bitbucket. “I done this” looked very promising, but then my notes sit somewhere and can’t easily access or process them. I settled for now on a simple list in OmniOutliner, which exports to OPML, and which syncs between my smartphone and my computer. I will keep you posted on how I progress!

update 2015-Sep-08:

Michael Tsai just posted on a similar issue

Written by Claus

August 21st, 2015 at 3:31 pm

Posted in

Automatically Prepare Email (Mail, OS X): Sender, Recipient, GPG Encryption Checked

without comments

Sometimes, I enjoy doing something that does not belong to my core area of expertise, at first glance. Still it is fun to figure out how something works ūüėČ

Here is the “problem” I decided to address: – frequently, I send emails to “recipient_x_”. – The content of these messages should be encoded via pgp. I use gpg tools, which I like because their seamless integration into apple mail. Depsite this seamlessness, I have to click on a button to tell mail to encrypt the message, every time I want to send an email. Granted, I could encrypt by default, but among my typical recipients, the ones that use pgp are in the minority. And yes, I am still using apple mail, despite some interesting new kids on the block (MailMate at the forefront). I do use the add-ons mail tags and mail act on though. – I want to send this email from a particular email account

These tasks seems to be ideal for automation, I must have captured the macpowerusers bug. Typically I do most of my scripting with python. I dislike solutions that are bound to something specific like a given operating system. Despite recent discussions about the state of the mac, I don’t foresee myself to be using anything else in the near future. Hence, I started looking into automator, which has a few mail related tasks available, such as selecting the account. However, it has no way to automate gpg.

The next step was to look into applescript. I’ve looked a bit into it in the past, when I created latex based pdfs as notes for omni outliner. Generally, an applescript can be associated with a keyboard shortcut. Keyboard maestro, which I own since a little while, offers similar functionality, with improved user-friendliness. So now, when I am in mail, I just have to type cmd - opt - E, the script is executed, and I get a window as shown below. The three areas highlighted by red rectangles are adapted according to variables in the script.

Template of an email draft generated with the applescript. Fields marked with a red rectangle are filled by executing the script.

Feel free to check out my script on github.

Written by Claus

January 11th, 2015 at 6:35 pm

Posted in

AGU presentation

without comments

Next week is AGU week!

I will be taking part again this year. If you want to see me, my poster presentation is a good opportunity:

date Wednesday, 17 December 2014
time 01:40 PM – 06:00 PM noon
location Moscone West, Poster Hall
ID: H33E-0866
title of talk ‚ÄúIncorporating Locally Averaged Distributions Based on Categorical Land-Use Information into Point Estimation‚ÄĚ
session Multiscale Interactions and Structures in Soil-Vegetation-Atmosphere-Systems: Monitoring, Modeling, and Data Assimilation Posters
authors Claus Haslauer, Theresia Heißerer, András Bárdossy

You can find my ePoster also online. Feel free to contact me, if you can’t make it on wednesday afternoon. I’ll also be trying to be active on twitter. Looking forward to see you all! ūüėČ

Written by Claus

December 12th, 2014 at 6:43 pm

Posted in

Spatial Copula Workshop

without comments

A couple of weeks ago, I spent two days in M√ľnster, at the Institute for Geoinformatics, and attented the Spatial Copula Workshop organized by Benedikt Gr√§ler from the University of M√ľnster and Claudia Czado, from the Chair of Mathematical Statistics at the Technical University of Munich.

Participants of the Copula workshop at the University of M√ľnster.

The nice thing was to present to a room full of people, and everybody at least had a basic understanding and appreciation of what copulas are. This was a most welcome change! Thanks Benedikt for organizing and hosting this wonderful workshop!

Written by Claus

October 17th, 2014 at 3:23 pm

Posted in

Geology of the Lechtal

without comments

Outcrop at the Gorge of the Bernhardsbach, Ebigenalb, Lechtal, Austria
Outcrop at the Gorge of the Bernhardsbach, Ebigenalb, Lechtal, Austria

These wonderfully folded geological layers can be found directly behind the open-air theatre where “Geierwally” is played in Ebigenalb, Austria (Lechtal). Behind that theatre, the creek “Bernhardsbach” forms a george for few hundred meters, and offers this spectacular view on an outcrop. This outcrop is one of the best windows into the history of the Alps.

Field Trip

Peter Nasemann guided us this summer to glance through some of such windows on a walking tour organized by the OEAV Lechtal. Peter Nasemann has written a book on the geology of the “Lechtal” and is considered an expert on the geology of the Alps. During the walk we stopped at three spots (see map).

Map locations
Locations of site-visits during the geological field trip

1) Gravel Bed next to Klimm Br√ľcke, Elmen

At the first stop, Peter Nasemann introduced us to local rocks and their relation into the geologic sequence (main types are set in bold, youngest one are listed on top):

  • (Aptychenkalke)
  • Radiolarit (Elmer Mutterkopf, Mittagspitze) youngest that we looked at (Jurassic), red-ish, not prone to erosion
  • three similar types:
    • Allg√§u Schichten: old, middle, and young (in the sequence right after Radiolarit), all still Jurassic),
    • Lechtaler Schichten: not entirely sure about this layer anymore.
    • K√∂ssener Schichten (Triassic; The Stablalm is located on K√∂ssener Schichten but everywhere around in its vicinity Radiolarit can be found, which consists of black / dark clay of light grey colour, sometimes yellow chalks with many fossils. Sometimes the annual cycles of the organic material are visible. At the bottom of each layer, remnants of animals can be found that sank into the deposits. Stones of the K√∂ssener Schichten are somewhat “mudstones”… if you place them in your garden and wait for a couple of years, they will expand due to the water added over time, and the remnants can serve as a good addition to the soil in your garden.
  • Hauptdolomit (Triassic, Klimmspitze): prone to erosion, not nice for climbing; some sections of the Hauptdolomit, predominantly dark ones (“Seefelder Schichten”) are considered building material for mineral oil, and can make blotting paper oily; these are also used for Stein√∂l
  • (Raibler Schichten)

Theoretically, the mesozoic sequence of the East-Alpine of the Central Alps has been summarized by Adrian Pfiffner in his book ‚ÄúGeologie der Alpen‚ÄĚ (figure below).

Mesozoische Schichtreihe Ostalpins small
The mesozoic sequence of the East-Alpine of the Central Alps has been summarized by Adrian Pfiffner.

Generally, the Lechtal can be divided into dominantly Hauptdolomit in the lower valley and dominantly not-Hauptdolomit (the three similar types) in the upper valley. The divide is located near H√§selgehr (Otterbach). Traditionally, the upper valley has a richer agriculture, the lower valley richer forrestry (Hauptdolomit sustains trees, but not agriculture). In fact, the richness of the diocese of Augsburg partly originated in its forests around F√ľssen and in the lower Lechtal (there is still a Flurbezeichnung “F√ľssener Wald” in the Lechtal)

The Walser were experts on agriculture, and they found the patches where the “Abtychen-Schichten” (and “K√∂ssener Schichten”) appeared on ground surface. In the case of the Lechtal, these areas are generally higher up in the mountains. Coincidentally, the Walser came over the saddles or ridges of the mountains, not via the valleys (which one would normally think of being the connecting features).

Since we were standing on the banks of the river lech, we had a closer look on the gravel bed. It served as an excellent example for how a river builds its bed, and how the river bed gets stronger after a high flow event. Behind each stone in the river bed, sediment gets accummulated. This can form solid patches, depending on the flow rate and hence stone size at a given location.

Rocks Bottom Lech
Rocks at the bottom of the river Lech. When wet, flow direction from right to left. The deposits “behind” the larger rock are visible next to the black part of the photo bag.

2) First Bend on the Road to Bschlabs

After having been introduced to the rocks occurring in the area, based on samples from the river bed, and to the sequence of their occurrence in the geological sequence, we drove up to higher ground along the road to Bschlabs, to get an overview over the area.

Sometimes, the sequence of the rocks is not occurring according to the order of deposition described above. This can be seen at the Mittagsspitze (on the far right on the picture below), where Radiolarit is not at the top.

Lower Lech Valley
View from spot 2 along the river Lech towards north (downstream, “U-valley”). At the right edge of the valley, younger terraces can be seen.

Another example for an “inverted” sequence of rocks is the Grie√ütalerspitze, where Hauptdolomit lies above Radiolarit and above Aptychenkalk.

Otto Ampferer was the first to recognize that such “mixed up” sequences can occur when one layer is pushing against other layers. This phenomenon is called √úberschiebung / overthrusting. This is also why the picture of the outcrop at the top of this post, is so important.

3) Gorge of the Bernhardsbach behind Geierwally Theatre

The last spot was the Gorge of the Bernhardsbach (introductory picture), which served Otto Ampferer as a basis to establish the theory of overthrusting in the 1920s (english article with interesting picture of Sölden and bautiful sketches, paper in German).

Further Information

Joachim Kuhlemann has assembled a geologcial trail in the Sulzetal, a side valley of the Lechtal. His homepage also has some further information.

Written by Claus

September 28th, 2014 at 10:47 am

Posted in

Spatial Copula Workshop at the University of M√ľnster

without comments

Next week on monday and tuesday, there will be a spatial copula workshop, held by the fine folks at the Institute for Geoinformatics at the University of M√ľnster. I’m looking forward to discuss copula-related issues with interesting people.

Here is some more information regarding my talk:

date: Monday, September 22nd
time: 10:00 am
location: Institute for Geoinformatics, University of M√ľnster
title of talk: ‚ÄúSpatial Interpolation Using Secondary Information and Censored Measurements ‚ÄĚ
authors: Claus Haslauer, Theresia Heißerer, András Bárdossy

Written by Claus

September 15th, 2014 at 5:33 pm

Posted in

Presentation at GeoEnv X

without comments

On Wednesday I will be giving a presentation in Paris, France. In the building where Georges Matheron worked. The conference ‚Äúgeostatistics for environmental applications‚ÄĚ celebrates its 10th repetition.

If you happen to be in or near Paris, let me know ‚ÄĒ here are some details about my presentation:


date: Wednesday, July 9th
time: 12:00 noon
location: L109
title of talk: ‚ÄúRealistic Non-Stationary Spatial Interpolation‚ÄĚ
session: Geostatistical Theory & New Methodologies 1
authors: Claus Haslauer, Theresia Heißerer, András Bárdossy


We’ll be next door! 

10807357213 922e371bcc o

Photo by victortsu –

Written by Claus

July 4th, 2014 at 4:28 pm

Posted in

Reflections on EGU 2014

without comments

Here are some reflections on EGU 2014 that I started to write down on its final day, but haven’t had time to post until now.

There are only two things that stand out from the talks and the posters (Hazel Gibson collected a few extraordinary posters here).

  • the best scientific talks are the ones that explain one thing well and then show a few results. I find that much more is not possible in 13 minutes. Particularly, I remember E? Foufoula, who had a beautiful slide that explained how she thinks about similarity and dis-similarity in time-series.
  • in the posters I had great fun wondering around all kinds of topics. I found out how wind-turbine engineers try to place turbines optimally in a wind-turbine field. I learned about surface run-off. I had a great chat with Anna Sciani on infiltration processes at a hillslope, and about the worth and work related to the combination and cycling of and between field-experiments and associated modelling.

Besides the talks and the posters, I was particularly impressed by this year’s medal lectures that I attended.

Medal Lectures

Among the three, personally, I was moved and inspired greatly by Upmanu Lall’s talk. Bruno Merz said in his laudatio that he appreciates that Upmanu Lall can think outside the box. I remember that I thought during the laudatio that this seems like a weird thing to say in a laudatio. Now I think this was the best thing to say.

Here is the list of the three medal lectures I attended. Interestingly, Hoshin Gupta and Upmanu Lall are also co-author of recent discussion papers that appeared in Water Resources Research that are also linked. The papers contain at least some aspects of the talks.

Scientific Debates

at the beginning of the conference I was intrigued by the concept of a “scientific debate”. I attended the one on geo-engineering (also because there were no particularly seemingly interesting topics for sessions in the program — a rare occasion). The mindsets of the panelists were not very diverging, hence the debate was fairly calm. Here are my take-home messages:

  • in an ideal world, if we had a crop that has the same nutritous properties, needs less water, is somehow generally better for the environment than existing crops, and leads to more yield, then yes, we would all be for that, and we could call that geo-(bio-)-engineering. And partly, this is happening.
  • win-win situations are rare, and the big question seems to be how to “properly” “treat” the non-winners. Related to that, another big question is at what point in time and under what circumstances would we accept some large scale engineering project, with associated large, partly unknown, and uncertain consequences (“tipping point”)
  • large scale vs. small scale: the discussion was largely focussed on larger-scale engineering works. At the end was some discussion if small scale or bottom-up approaches would not be better. But then, it was not clear how to know which small approach would have large consequences, and how it could be adopted to improve the consequences.
  • the panelists, scientists, seemed more concerned about geo-politics than about geo-engieneering. Everybody agreed, that solutions in harmony between all parts of society, i.e. scientists, engineers, lawyers, economists, social scientists, medical experts need to be found.

Here is a good document by the Royal Society on geoengineering (via Jim McQuaid)


At the google booth I was re-introduced to their GIS-related computing capabilities, called “earthengine“. It seems like anybody can cooperate with them for smart, computing intensive remote sensing type calculations and analysis. On their website they have some pretty impresive videos. This one here is about the growth of irrigation in Saudi Arabia, as evident from an explosion of pivot-irrigated plots.

Written by Claus

June 22nd, 2014 at 4:47 pm

Posted in