intro story D-Flow FM

 

D-Flow Flexible Mesh

D-Flow Flexible Mesh (D-Flow FM) is the new software engine for hydrodynamical simulations on unstructured grids in 1D-2D-3D. Together with the familiar curvilinear meshes from Delft3D 4, the unstructured grid can consist of triangles, pentagons (etc.) and 1D channel networks, all in one single mesh. It combines proven technology from the hydrodynamic engines of Delft3D 4 and SOBEK 2 and adds flexible administration, resulting in:

  • Easier 1D-2D-3D model coupling, intuitive setup of boundary conditions and meteorological forcings (amongst others).
  • More flexible 2D gridding in delta regions, river junctions, harbours, intertidal flats and more.
  • High performance by smart use of multicore architectures, and grid computing clusters.
An overview of the current developments can be found here.
 
The D-Flow FM - team would be delighted if you would participate in discussions on the generation of meshes, the specification of boundary conditions, the running of computations, and all kinds of other relevant topics. Feel free to share your smart questions and/or brilliant solutions! 

 

=======================================================
We have launched a new website (still under construction so expect continuous improvements) and a new forum dedicated to Delft3D Flexible Mesh.

Please follow this link to the new forum: 
/web/delft3dfm/forum

Post your questions, issues, suggestions, difficulties related to our Delft3D Flexible Mesh Suite on the new forum.

=======================================================

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


Message Boards

Cannot open a trim-*.dat file. Is there any way to rescue the data?

GD
Gonzalo Duro, modified 6 Years ago.

Cannot open a trim-*.dat file. Is there any way to rescue the data?

Youngling Posts: 11 Join Date: 12/4/13 Recent Posts
Dear community,

I did a long simulation (it was running during 9 days) and when it finished something occurred that prevents the trim-*.dat file from being opened with QuickPlot. When I try to open the file, Quckplot shows the following error message:

'Caught in qp_getdata/getprops2: Illegal right hand side in assignment. Too many elements'


The strange thing is that I was able to check the evolution of the results while the simulation was running, so I know it was making sense. The log file stopped recording just 5 time steps before the end of the simulation. On the other hand, the tri-diag file apparently shows that the simulation finished correctly (I attach it).

I am worry about the fact that I cannot access the results. Is there a way to 'rescue' or read the results?

I am really disoriented with this kind of error. It looks like a bad joke to wait for 9 days and not being able to see the results at the end.

I will appreciate any light shed here.

Best,

Gonzalo
MS
Mihael Souza, modified 6 Years ago.

RE: Cannot open a trim-*.dat file. Is there any way to rescue the data?

Padawan Posts: 65 Join Date: 10/11/12 Recent Posts
Hi Gonzalo,

Do you have access to MATLAB?
If you do, you could try using Open Earth tools to extract the results directly within a script.
You can download these from the same repository you downloaded Delft3D source code.

Arnold and Bert have commented on this, refer to their post for the original help:
http://oss.deltares.nl/web/delft3d/coast-/-estuary/-/message_boards/view_message/326683/maximized

But for a quick reference:
Use qpfopen and qpread to access trim- and trih- results.

trimF = qpfopen('trim-*.dat'); % If its in the current directory it will open your trim file. If not, a pop up window will allow you to navigate to it.
% You could also give the filename along with its directory path using [ ].

[fieldnames, ~, ~] = qpread(trimF); % Will return all available model results. e.g.: water level, temperature, depth averaged speed, etc...
stations = qpread(trimF, 1, 'water level', 'stations'); % In this case, will return all the observation points in which water level data is available.
% Don't know if would be useful for trim data, but I use for history files.

Then, if you know what you want to extract:
My_data = qpread(trimF, 1, 'depth averaged current', 'data', 0, 0, 0, 1) % for trim- data
My_data = qpread(trimF, 1, 'depth averaged current', 'data', 0, 'station') % for trih- data

In this case, the script assumes you have only 1 domain (first one), all time steps, M and N indices (three zeros), and first depth layer (or the one, if you're using 2DH mode). For the history file is simpler, as you only need to inform the time steps (single zero) and the station from where to extract the data. For more examples, consult the documentation, it is very thorough.
GD
Gonzalo Duro, modified 6 Years ago.

RE: Cannot open a trim-*.dat file. Is there any way to rescue the data?

Youngling Posts: 11 Join Date: 12/4/13 Recent Posts
Dear Mihael,

Thank you very much for you response.

Luckily I have access to Matlab.

I followed your steps and here I transcript what the outcome is:

[indent]>> trimF = qpfopen('D:\Thesis\Work\Delft3D runs\Expansion\Exp 01\trim-exp1.dat');
WARNING:
GROUP definition name 'map-infavg-serie' does not correspond to any GROUP.
WARNING:
GROUP definition name 'map-avg-series' does not correspond to any GROUP.
>> [fieldnames, ~, ~] = qpread(trimF);
Error encountered, check syntax!
Illegal right hand side in assignment. Too many elements.

Error in vs_disp (line 259)
Str.Name=VS.GrpDat(iList).Name;

Error in auto_map_detect (line 58)
InfoG=vs_disp(FI,Grps{i},[]);

Error in d3d_trimfil>infile (line 996)
DataProps=auto_map_detect(FI,DataProps,nm,k,SkipGroup,SkipElem);

Error in d3d_trimfil (line 54)
varargout={infile(FI,domain)};

Error in qp_getdata (line 274)
varargout{2}=feval(Fcn,FI,X{:});

Error in qp_getdata (line 427)
[OK,DataProps]=qp_getdata(FI,X{:});

Error in qpread (line 100)
[OK,varargout{:}]=qp_getdata(varargin{:});[/indent]

Any idea why I have this error or if I still can handle the data in the trim file?

Thanks!
Qinghua Ye, modified 6 Years ago.

RE: Cannot open a trim-*.dat file. Is there any way to rescue the data?

Jedi Council Member Posts: 612 Join Date: 3/2/11 Recent Posts
dear Gonzalo,

It seems to me that the error comes from the morphology output options. You used the option: AverageAtEachOutputTime = the simulation time, didn't you? We need a bit more time to review why it goes wrong. I noticed that you are using a release version of 2010.

In matlab, you can try the low-level command like: vs_use, vs_disp, vs_let/get to get the data from the nefis file. Refer to Delft3D-MATLAB user manual. By this way, you might be able to get all the data written inside the trim file.

You can try to use these low-level command first.

Regards,

Qinghua YE
MS
Mihael Souza, modified 6 Years ago.

RE: Cannot open a trim-*.dat file. Is there any way to rescue the data?

Padawan Posts: 65 Join Date: 10/11/12 Recent Posts
Hi Gonzalo,

I've never ran into those errors myself, and without a similar database to try with I'm not able to reproduce them.
In this case you should probably follow Qinghua's advice and use the lower-level functions instead of trying to load the structure from the nefis-file.

Good luck!

Mihael Souza
GD
Gonzalo Duro, modified 6 Years ago.

RE: Cannot open a trim-*.dat file. Is there any way to rescue the data?

Youngling Posts: 11 Join Date: 12/4/13 Recent Posts
Dear Qinghua and Mihael,

Thank you both for the replies.

I finally succeeded in seeing the content of the trim file with the basic functions, in this case the 'vs_let'.

Unfortunately for me, only a part of the simulation results is good, i.e. non-zero values. I don't know the reason but the trim file was badly written since a certain time step.

Well, I guess this is the answer to my initial question, so thank you very much for your help.

Best regards,

Gonzalo