Message Boards

Back

Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological model

MA
Matthew Adams, modified 3 Years ago.

Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological model

Youngling Posts: 19 Join Date: 8/19/15 Recent Posts
Hi there,

I am running a configuration whereby hydrodynamics is computed by TELEMAC on an unstructured grid, then this information is fed into DELWAQ for the ecological model.

I am able to run the model in DELWAQ successfully, and visualise time-series of individual state variables (e.g. phytoplankton concentration) at a single node. However, visualising spatial distribution (e.g. lake maps) of these variables at single time-point does not work in either GPP or Quickplot. I believe this stems from the fact that the TELEMAC grid file is not LGA or CCO file extension, but is a SLF file. Specifically, the issue is as follows:

The output files generated from DELWAQ include: ADA, ADF, HDA, HDF, HIS and MAP. My understanding is that ADA and MAP contain output maps, ADF is a small file associated with ADA; HDA and HIS contain output time-series at individual nodes (as selected during model configuration), and HDF is a small file associated with HDA.

Both Quickplot and GPP can read the HIS and HDF files just fine (as these are time-series).

When I open either the ADA or MAP files in Quickplot, it asks me for the grid file, with the following error if I try the SLF file:
Error using delwaq>Local_lga_open (line 472)
LGA/CCO file extension should match .lga/.cco


When I open the ADA or MAP files in GPP, I can get output at an individual timepoint that *looks* likes a timeseries (see attached images). I think what is happening is it is plotting e.g. phytoplankton concentration vs node number.

I can load the HDA and ADA files post-simulation in MATLAB using the “vs_use”command which is part of the DELWAQ to MATLAB codes included in the installation of DELWAQ. But no idea how to visualise the grid.

I have spoken to our local hydrodynamicist who thinks that DELWAQ pays attention to how cells are joined together and what their size, depth and surface area are, but might not keep track of the grid?

Any idea on how to proceed with this? The only other option is to manually put together the unstructured grid file post-simulation e.g. in MATLAB and read in the DELWAQ output to construct lake maps.

Keen to hear any insights you can provide!

Many thanks,
Matthew
Michel Jeuken, modified 3 Years ago.

RE: Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological mod (Answer)

Jedi Knight Posts: 156 Join Date: 1/21/13 Recent Posts
Hi Matthew,

QuickPlot will need a similair named *.cli file next to the *.slf file (only differ in extension). This is the Telemac equivalent of the Delft3D FLOW cco/lga combination. cco/cli are the cell coordinates, slf/lga the grid indices.

Also be sure to switch to "Telemac Grid File" in the file selection menu you will get when you open the map file! Looking at the QuickPlot code, I guess you didnt't switch so QuickPlot expected the lga/cco combination.

Michel
MA
Matthew Adams, modified 3 Years ago.

RE: Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological mod (Answer)

Youngling Posts: 19 Join Date: 8/19/15 Recent Posts
Hi Michel,

Thanks for your response - I did have the clf file already next to the slf file, and had already been switching to Telemac Grid File in the file selection menu, but to no avail. I think this might have occurred because the Telemac grid is an unstructured triangular mesh.

I did manage to find a workaround though, to do the plots in MATLAB:
1. Use Telemac Tools by Thomas Benson (http://au.mathworks.com/matlabcentral/fileexchange/25021-telemac-tools) to import the Telemac SLF grid file into MATLAB.
2. Use the "vs_get" command from the Delft3D-MATLAB routines that comes with DELWAQ, to import the DELWAQ model output into MATLAB. Then extract from that the particular water layer, timestep and substance. For water layer, knowledge of how many layers DELWAQ solves, and how the output array containing these layers is structured, is necessary.
3. Use the patch command in MATLAB to plot the result

figure
patch('faces',m.IKLE,'vertices',m.XYZ,'FaceVertexCData',Species, ...
'FaceColor','interp','EdgeColor','none','linewidth',0.01);

where m is the structure containing the imported SLF file, and Species is the vector containing the DELWAQ model output for the particular water layer, timestep and substance of interest.

Matthew