Forum

RE: reading water level from NEFIS file using vs_ matlab functions

Kevin Hanegan, modified 11 Years ago.

reading water level from NEFIS file using vs_ matlab functions

Youngling Post: 1 Join Date: 7/2/11 Recent Posts
Hi,
First, it looked like the OET forum was not active, so I thought this would be the best place to post. If anyone knows a better place to discuss Open Earth Tools issues, please advise.

I found an issue with the OpenEarthTools\matlab\applications\delft3d_matlab\vs_let.m function when reading water level. According to the self-describing fields in the NEFIS file (found using vs_disp), the S1 variable is water level:


Groupname:map-series Dimensionsemoticon4177)
No attributes
S1 REAL * 4 [ M ] ( 12 5002 )
Water-level in zeta point


so the water level is read using:

vs_let(TRIM,'map-series','S1')

However, this actually returns the water level and bed level in dry cells (equivalent to the water level( when dry: bed level) variable in QUICKPLOT. In QUICKPLOT, water level is a distinct output variable where NaN's are returned for water level in dry points. There is of course a workaround using the logical arrays of active/non-active points also contained in the NEFIS file, but does anyone know of an alternative syntax or variable name that would give me just water level and not also include bed level in dry points?

Thanks,
Kevin
Derya ITIR Dilmen, modified 6 Years ago.

RE: reading water level from NEFIS file using vs_ matlab functions

Youngling Posts: 3 Join Date: 6/11/18 Recent Posts

You can also use quickplot Matlab functions inside the Delft3D-Matlab tools:

trimfile=qpfopen('C:/......./trim.dat');

read_wl= qpread(trimfile, 'water level', 'data');

water_level=read_wl.Val;