NeSI support helps keep NZ rivers healthy
To update the GRATE river sediment transport simulation program, making it more efficient and adaptable.
Target code inefficiencies for supercomputer use and develop a user-friendly version for students and industry.
An adaptable version of the program, with a wide variety of uses in education, river habitat assessment, and to protect the pace of river change following major disturbance (e.g. gravel extraction, engineering works, landslides).
Dr Jon Tunnicliffe is a researcher at University of Auckland, specialising in fluvial geomorphology: the study of sediment transport processes of rivers.
During the course of his research, Jon has collected and combined key sediment transport algorithms into the Gravel Routing and Textural Evolution (GRATE) program. The code provides a one-dimensional simulation of river flow conditions, that will adjust river bed elevation and grain size composition in response to upstream flow conditions. GRATE is used for research at University of Auckland, as well as the National Institute of Water and Atmospheric Research (NIWA).
Support from NeSI’s Computational Science Team has helped Jon update the GRATE program for use in education, industry and research.
“There is quite a bit of demand for exploring issues with gravel extraction and changing the stopbank configuration of channels: narrowing the channel or widening it. That’s something we’ve simulated with the code. Managing dam infrastructure is important in New Zealand, as well as persistent overloading of the river from erosion and landslides” said Jon.
Through NeSI’s Consultancy Service, NeSI team member Chris Scott worked with Jon to improve GRATE’s user interface and performance. Users can now enter and modify their river parameters in other programs – such as Microsoft Excel – and export them into GRATE to model sediment flow.
“It’s been helpful to have routines optimised through NeSI assistance. They’ve helped with the user interface, so it’s easier for students and researchers to put their data into the model, experiment with the governing parameters, and then observe what comes out of it,” said Jon.
These improvements expand on GRATE’s educational applications. Being able to import parameters from easily accessible software and data formats has allowed GRATE to now be used by undergraduate students, giving students the opportunity to work with a type of research code (‘1D’ modelling) that is commonly used in government and industry research.
“GRATE has been used for things like river gravel extractions. Project managers are interested in predicting the effects of taking gravel out of the system, how long it will take to recover or how it will impact the stream further down the channel,” said Jon.
GRATE has also been used for assessing the impacts of major river works. Dam construction can lead to a river’s sediment supply being cut off. Without new sediment, the river might cut into its bed, or trigger bank failure, leading to other river instabilities. GRATE can simulate these conditions to see how development along a river can change it.
However, it’s not just the human interference of New Zealand’s rivers that GRATE can simulate. Natural disasters can dramatically change river flow and create long-running ecological problems, months or years after an initial disaster. This environmental damage can be simulated as well.
“GRATE can be used to look at post-earthquake impacts on river systems; what happens when you load these systems with sediment. We are monitoring several rivers that are still recovering from the Kaikoura earthquake in 2016. One of them has piled up more than 30 metres of sediment within the confining valley.”
NeSI helped Dr Tunnicliffe to create an optimised version of the program, to be used on NeSI supercomputers. By improving the way vectors were initialised, Chris was able to help reduce run time, allowing the code to run 1.5x faster. The optimised Linux version can be used on complex sedimentary flow simulation for research and industry. In this capacity, the speed boost would mean fewer supercomputing hours required for the same work, dramatically decreasing cost and computing power requirements.
“The headless version that can go straight into the Linux environment and can be called hundreds or thousands of times for the parameter sweep or uncertainty assessment of the model. NeSI helped to optimise that research code, to get it ready for high-performance computing, with optimisation and parallelisation.”
Currently the GRATE code is hosted on Github (jtunnicl/GRATE), and Chris has helped Jon to manage releases for both Windows and MacOS. This public-facing repository has been helpful for sharing the code with students, colleagues and industry partners; ongoing feedback has helped Jon to develop some wiki resources and trial test cases that new users can experiment with.
“I think both industry and research are moving to an open-source model. Anything you’re presenting you need to provide the code as well. GRATE is considered closed-source, but now that we have a cleaner interface it can be an open-source solution.”
Through Jon’s collaborative work with NeSI, GRATE now has a variety of applications, and provides another tool for the toolbox of hydraulic engineers, river ecologists, watershed managers, and fluvial geomorphologists (among others). The process of refining the code with collaborators and making it accessible to new users will continue, thanks to this extensive editing and tuning of the code base.
Do you have an example of how NeSI platforms or expertise have supported your work? We’re always looking for projects to feature as a case study. Get in touch by emailing email@example.com.