Modernising the Fortran code of a soil erosion model

The Austrian Federal Agency for Water Management had a Fortran code for a soil erosion model which they wanted to be modernised and expanded.

During the process I setup a git repository and restructured the code into modules and introduced new types and unified subroutines while applying the rules of “clean code”.

For input and output I implemented a NetCDF interface, which is a standard format for climate models and allows self explanatory data storage, especially when applying the CF metadata convention.

NetCDF made it also possible to use free tools such as NCO for post-processing, which was previously done inside the main program and now is only one line in a shell script.