Forum

RE: OpenEarthTools in Matlab v. 2017

Karoline Wischnewski, modified 7 Years 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 map.nc file with the command (I followed the procedure of the video https://www.youtube.com/watch?v=i6xiF39xn8M)
ncfile = 'map.nc';
map=dflowfm.readMap(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)
varid=netcdf.inqVarID(gid,varname);
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,
Karoline
thumbnail
Erik de Rooij, modified 7 Years ago.

RE: OpenEarthTools in Matlab v. 2017

Youngling Posts: 21 Join Date: 12/22/20 Recent Posts
Hello everyone!


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


Best regards,


Bruno.
Bob Smits, modified 7 Years ago.

RE: OpenEarthTools in Matlab v. 2017

thumbnail
Erik de Rooij, modified 7 Years ago.

RE: OpenEarthTools in Matlab v. 2017

Youngling Posts: 21 Join Date: 12/22/20 Recent Posts
Hi!


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,


Bruno.