File Exchange

image thumbnail

Telemac Tools

version 1.6.0.0 (930 KB) by Thomas Benson
Read/write functions for Telemac hydrodynamic model files (both Selafin and Leonard formats)

12 Downloads

Updated 13 Sep 2011

View Version History

View License

This set of m-files enables you to read, write and manipulate results files from the Telemac2D and 3D hydrodynamic modelling system of EDF/Sogreah. Both the triangular finite element grid (Selafin format) and square grid (Leonard format) are supported.

Usage examples have been included to help understand how to use the low level read and write functions so that you can incorporate them into your own Matlab code.

To get started, run the 'teldemo.m' script. This first calls 'telmean.m' which performs a time average on all the variables in the example hydrodynamic results file of the Mersey estuary (UK) and saves the answer to a new Selafin file. It then plots the mean water depth from the newly created file using 'telplot.m' (as shown in the screenshot).

I would like to acknowledge Dr Jon French of the Coastal and Estuarine Research Unit (University College London) for providing code that inspired these routines.

*********************************************************************************

The fully open source (Fortran) Telemac hydrodynamic model (version 6.0) is free to download at www.opentelemac.org .

*********************************************************************************

Cite As

Thomas Benson (2021). Telemac Tools (https://www.mathworks.com/matlabcentral/fileexchange/25021-telemac-tools), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Aymeric JOUON

I Found the solution : use telstepr function to get m.AT variable !!!

Ali Habibzadeh

Ali Habibzadeh

Does anyone know how to read 3D results separately for each layer?

animesh BASU

Dear Community
I have a serafin file (with two variable) with a single time step. I want to write the same information for say 100 sec with 10 sec timestep interval to a new serafin file. Please guide me in doing so. If somebody post the modified mfile it will really be helpful.

Jonathan King

Really easy to follow and use if you have some prior experience of MATLAB, fantastic tool

Thomas Benson

Arvid - If you call telheadr.m on its own, it does not increment the timestep value. You should call telstepr.m after the call to telheadr, i.e. m=telheadr(filename);m=telstepr(m,1). Hope that helps.

Arvid Dujardin

I'm a bit confused by the output generated by telheadr.m.
When I run this function for my Telemac results file, m.first = 1, while m.timestep = 0. Yet it seems that the data in m.RESULT is taken from the last timestep of the results file.
Could you please comment on this?

Patrick Grover

Well written code with good examples, thanks very much! Made my life much easier.

Ben Williams

Fantastically useful for post-processing of Telemac results in Matlab.

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!