Converting NFIES(*.dat) file to NetCDF (*.nc) files. - Undefined function or variable 'filenameext'

18 visualizaciones (últimos 30 días)
I am using an *.m file's function (vs_trim2nc()) to convert Delft3D output (NEFIS compliant *.dat file) to NetCDF file (*.nc) file. But when I try this I get an error message "Undefined function or variable 'filenameext'." I got vs_trim2nc.m from a trusted source (See this and this ), so hopefully, it is error free, and there may be something which I am overlooking because I am a beginner to Matlab environment. The vs_trim2nc.m and files to be converted are attached. My syntax and the error message generated is below.
>> vs_trim2nc('E:\Hohai\Delft3DWD\delft3d-course\introduction_hydrodynamics\exercises\05_curvedbend\practice1\trim-cb2a.dat')
Undefined function or variable 'filenameext'.
Error in vs_trim2nc (line 121)
OPT.title = ['NetCDF created from NEFIS-file ',filenameext(vsfile)];
I will be grateful for any kind help.
Thanks and Best Regards
Ahmed

Respuestas (1)

Diego Casas
Diego Casas el 15 de Ag. de 2022
Function "filenameext" is defined in:
If you are using functions from OpenEarthTools you will want to have the whole SVN repository on hand. You can use TortoiseSVN to clone it locally.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by