At this page you can post questions or start discussions on general topics related to Delft3D Flexible Mesh.

Please select a proper category below (if possible), to post your message or reply to an existing post. Please add tags to your posts to simplify searching.








RE: OpenEarthTools in Matlab v. 2017

Karoline Wischnewski, modified 10 Months ago.

OpenEarthTools in Matlab v. 2017

Youngling Posts: 4 Join Date: 12/1/16 Recent Posts
Hello everyone,

I am trying to use the OpenEarthTools with the newest Matlab version (R2017a). I downloaded the complete set of files in the /trunk/matlab directory from the deltares server. Trying to acces data within Delft FLow FM outputfiles I get confronted with the following issue:

1) launching via the MATLAB command line with oetsettings and trying to import a file with the command (I followed the procedure of the video
ncfile = '';
returns the error

Field assignment to a non-structure array object.
Error in dflowfm.readNetOld (line 132)
G.edge.FlowLinkType.flag_values = nc_attget(ncfile, 'FlowLinkType','flag_values');
Error in dflowfm.readNet (line 128)
G = dflowfm.readNetOld(ncfile);
Error in dflowfm.readMap (line 68)
G = dflowfm.readNet(ncfile);

I also tried doing the same as before but with a history-file, which resulted in a different error

Error using netcdflib
The NetCDF library encountered an error during execution of 'inqVarID' function - 'Variable not found (NC_ENOTVAR)'.
Error in netcdf.inqVarID (line 21)
varid = netcdflib('inqVarID', ncid, varname);
Error in nc_varget_tmw>varget (line 62)
Error in nc_varget_tmw>varget_nc (line 24)
[data,info] = varget(ncid,varname,varargin{:});
Error in nc_varget_tmw (line 5)
[data,info] = varget_nc(ncfile,varname,varargin{:});
Error in nc_vargetr (line 38)
[data,info] = nc_varget_tmw(ncfile,varname,varargin{:});
Error in nc_varget (line 35)
[data,info] = nc_vargetr(ncfile,varname,varargin{:});
Error in dflowfm.readHis (line 41)
hisdata.cross_section_discharge_int = nc_varget(filename, 'cross_section_cumulative_discharge');

I tried with several different map-output files from different runs and projects and always get the same error. Is this due to the newer version of Matlab or am i missing something? Those files definitely contain data, as they can be opened using quickplot.

Any help or advice on what to try would be appreciated,

Thank you,
dflowfm open earth tools matlab
Bruno Moreira, modified 6 Months ago.

RE: OpenEarthTools in Matlab v. 2017

Youngling Posts: 6 Join Date: 9/23/16 Recent Posts
Hello everyone!

I have the some problem. Could anyone help us, please?

Best regards,

Bob Smits, modified 5 Months ago.

RE: OpenEarthTools in Matlab v. 2017

Youngling Posts: 1 Join Date: 1/11/18 Recent Posts
Hi Karoline,

Due to an update in the output format, some of the Matlab scripts for post-processing did not work anymore. I will try to answer both your questions:

1) I just comitted updates of the scripts 'readMap.m'. 'readNet.m', 'plotMap.m' and 'readMap.m' to Open Earth Toolbox for 2D applications. Please try to update your local copy of the repository. If you use SVN Tortoise, this can easily be done by right-clicking the folder you want to update and click 'SVN update'.

2) I did not run into any problems with the script 'readHis.m'. However, the variable names may have changed due to the update in output format. Is the variable you want to open 'cross_section_cumulative_discharge'?
As a sidenote, you can always check filenames using 'nc_dump(filename)'.

Hope this helps. Else, let me know!

Kind regards,
Bruno Moreira, modified 5 Months ago.

RE: OpenEarthTools in Matlab v. 2017

Youngling Posts: 6 Join Date: 9/23/16 Recent Posts

Anyone knows why I am getting this kind of error on my mesh?

Please, Look at the figures.

As you can see, I tried a simple rectangle and the same kind of thing.

Best regards,