• Linked Applications
3Di at IEMSS 2014

We presented the work we did on 3Di at the IEMSS conference. You can find both the presentation and the paper online.


I used the following videos in the presentation.

Other presentations from Deltares include:

Visualizing the Alcatraz escape

In the night of June 11, 1962 three inmates escaped from Alcatraz.
Here are some visualizations of the escape. This is work in progress. The model and visualizations are created together with Olivier Hoes, Martijn Siemerink and Gena Donchyts.
Created with 3Di, python-subgrid, matplotlib, VTK, cloudmade.

An overview


Python for engineers

These are some notebooks and the material used by the Python for Engineers course.

  File Modified
File starter.ipynb 19-11-2013 by Fedor Baart
File Signal.ipynb 19-11-2013 by Fedor Baart
File 1d diffusion.ipynb 19-11-2013 by Fedor Baart
File Excel example.ipynb 19-11-2013 by Fedor Baart
File OO and statistics.ipynb 19-11-2013 by Fedor Baart
File Weibull Symbolic.ipynb 19-11-2013 by Fedor Baart
PDF File presentation.pdf Presentation 29-11-2013 by Fedor Baart
L&R python lunch lecture

This is the lunch lecture that I gave at the L&R faculty.

One of the questions that came up was what the preferred way is to install python on OSX. This was related to some recent problems that people had with the latest version of OSX. Some of the issues that you can run into while installing extra packages are a missing png library issue and missing compilers .

Some of the options you have under OSX are, in my personal order of preference:

You probably don't want to use the python version that comes preinstalled with OSX. Using one of the other options keeps your python environment separate from your system environment and you'll have a more recent python version.

You can also use virtualenv to use multiple different python environments.

Interactive model
  File Modified
Multimedia File 2013-02-18_1729.swf Interactive modelling 18-02-2013 by Fedor Baart
Example of Jakarta sea-level using the R sealevel package

This is an example of how to use the sealevel R package. This package is part of OpenEarth and available through r-forge for the convenience of R users. See Trends in Sea-Level Trend Analysis for a discussion on sea-level trend analysis.

This example generates an overview of tide gauges near Jakarta and generates a plot of the measurements of the nearby stations.

R sealevel package now available from r-forge

I just made the sealevel R package, which we used for the sea-level rise articles, available. It provides some functions to quickly download, read and analyse the global tide gauges and satellite data.
All suggestions, patches, comments are welcome. This package is part of OpenEarth but available through r-forge for the convenience of R users.


The code below generates the plot of the Dutch tide gauges.

Notice that after the last 6 years of (average) sea-level decline we are about to see a rising sea level at the Dutch coast again for the next 12 years.

Sea level trends

This presentation was given at the Deltares statistics community lunch lecture. It discusses some best and worst practices in estimating sea-level rise. The presentation is based on two articles:

  File Modified
PDF File present.pdf Presented at statistics community at Deltares 13-05-2012 by Fedor Baart
Aeolian transport at EGU 2012

At the EGU, in the session about aeolian transport , we presented the integrated coastal model.

Please find the EGU Aeolian transport presentation in the attachments.

More info can be found here:
Sourcecode: http://oss.deltares.nl (under xbeach, info on compiling)
Dune: http://www.comphys.ethz.ch/hans/dunes.html

  File Modified
PDF File present.pdf 28-04-2012 by Fedor Baart
Compiling dunexbeach under Windows

If you want to compile the coupled version of Dune and XBeach under windows you need the following.

  • Cygwin (including gfortran, gcc, libtool, automake, libfftw3-devel, libfftw3)
  • MPICH2 source code release
  • netcdf>=4.1 source code
  • The following XBeach branches:
  • trunk
  • branches/esmf
  • branches/dune/Muller
  • branches/XD_XB_coupling

You can follow these steps:

  • Install cygwin
  • Compile MPICH2 using gfortran and make install (check if mpif90 is available)
  • Compile netCDF using gfortran and make install (check if nc-config is available)
  • Compile XBeach (--with-netcdf --without-mpi, mpi is not supported yet ), should generate a file called libxbeach.la
  • Compile dune in branches/dune/Muller (should generate a file called libdune.la)
  • Compile esmf (use settings like in settings under condition wl01485) (should generate a file called esmf.mod)
  • Compile XD_XB_Coupling (double check the Makefile.am, to see if it uses the correct locations for the libraries that were made in the previous steps). (should generate a file called xdunexbeach)

Setting up a simulation:

  • Create a directory with both dune and xbeach input (default.par, data/, params.txt)
  • Create a coupler setup file (see examples in coupler directory)
  • run xdunexbeach from the current directory.

Run the command path/to/xdunexbeachdir/libtool --mode=execute gdb path/to/xdunexbeachdir/xdunexbeach.

Creating illuminated lines

If you want to give your plots a bit of a high tech look you can use a green phosphor style.
Let's try and create some illuminated storm tracks. The basic technique is to draw a line with a glow around it. This can be done by plotting transparent lines on top of each other. Below you see the basic glow effect. It is a bit exaggerated but it still looks ok.

Now make the lines a bit smaller.

When you create more than about 1000 lines there's no need to add the background lines anymore.
I got the dataset from NOAA

Calling fortran from python

Calling fortran from the outside world. Using iso_c_bindings this is a bit easier. Here you can find some fortran examples and see how you can call these functions from python using ctypes and numpy.

The fortran code.

The corresponding python code.

Reconstructing an 18th century storm using paintings

The following paper was just published in NHESS. It was a cooperation between TUD, Deltares and TNO.

Abstract: For the design of cost-effective coastal defence a precise estimate is needed of the 1/10 000 per year storm surge. A more precise estimate requires more observations. Therefore, the three greatest storm surges that hit the northern part of the Holland Coast in the 18th century are reconstructed. The reconstructions are based on paintings, drawings, written records and shell deposits that have recently appeared. The storm-surge levels of these storms have been estimated using numerical modelling of the coastal processes. Here we show how these reconstructions can be used in combination with extreme value statistics to give a more confident estimate of low probability events.

Using 18th century storm-surge data from the Dutch Coast to improve the confidence in flood-risk estimates

Mini-symposium Nederlandse Commissie voor Geodesie

This is the presentation I gave at the mini symposium. I discussed the trends in sea-level trend analysis.

  File Modified
PDF File present.pdf Presentation for the Dutch Geodetic Committee 12-10-2011 by Fedor Baart
XBeach XDune coupling

I'm currently working on the XDune XBeach coupling.


The test case, which Jaap set up, is located at https://repos.deltares.nl/repos/XBeach/branches/XD_XB_coupling/tests.


The following tasks can be separated:

  • (tick) Create an XBeach library https://repos.deltares.nl/repos/XBeach/branches/fedortmp
    I plan to merge this into the trunk, but it would be convenient for maintenance if we'd merge the libxbeach.F90 and xbeach.F90 and apply the library by default approach (xbeach.F90 depends on libxbeach.F90).
  • (tick) Create an XDune library https://repos.deltares.nl/repos/XBeach/branches/dune
    We still have to merge back changes to the main dune line, for better cooperation with the dune people. I have to check the revision and what Martijn Muller checked in.
  • (tick) Create a fortran and c compatible interface for XBeach. The libxbeach wrapper exposes all functions using iso_c_binding. The most incovenient of this is that you have to pass the string length to character functions, not sure how to prevent this.
  • (tick) Create a fortran and c compatible interface for XDune (https://repos.deltares.nl/repos/XBeach/branches/dune). I first created a simple c compatible library (wrapper.cc) but found that the trick I used for exposing pointers to c++ classes (as part of a c structure) was not compatible with fortran. I switched to a version with a global model and global parameters. This is ugly but I have not figured out a better way yet.
  • (tick) Create an ESMF wrapper for XBeach (gridded component) https://repos.deltares.nl/repos/XBeach/branches/XD_XB_coupling/esmf_xd_xb_coupler I created a gridded component earlier. It seems to work fine. I moved it from the xbeach directory to the xd_xb coupling directory to keep all esmf specific code together and out of the XBeach trunk.
  • (question) Create an ESMF wrapper for XDune (gridded component) https://repos.deltares.nl/repos/XBeach/branches/XD_XB_coupling/esmf_xd_xb_coupler. I have implemented most of the code. The only part that is missing is the grid. I have to look into how the grid is defined and map that to the ESMF types.
  • (tick) Create a coupler https://repos.deltares.nl/repos/XBeach/branches/XD_XB_coupling/esmf_xd_xb_coupler The coupler and app are running. Features that are missing are configurable time, output and timestep definitions
  • (error) Test data exchange. I'm still missing the grid of dune so I can't match the grids. I'm discussing with ESMF user mailling list on how to best implement the rotating grid.
  • (tick) Test timestep. Timesteps of both Dune and XBeach align (tested for cases where dune has timesteps >= esmf timestep)
  • Test on h4 (not done)