CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
179 stars 65 forks source link

undefined 'slope_calc' in GridData.m #208

Closed HamishB closed 3 years ago

HamishB commented 3 years ago

Hi,

running m = interp(m, {gdat1}, 'type', 'slope') gives an error for the disp() on line 132 of @msh/private/GridData.m as 'slope_calc' is undefined. Commenting out the disp() lets it continue & complete without further error.

thanks, Hamish

krober10nd commented 3 years ago

Thanks. We will fix it. But please do not do Interpolation from gdat objects as we’ve discussed many times already.

HamishB commented 3 years ago

Understood about interpolating gdat objects. In this case I was using it for generating offshore/deep water slopes for Calc_IT_Fric() so wasn't too concerned with subsampling problems as the elements are large out at sea compared to the raster netcdf bathy cell size.

krober10nd commented 3 years ago

Okay cool..because nearshore it creates a ton of problems as it can create artificial topo-bathymetric holes.

If you want a quick fix for this just specify the kwarg slope_calc there. I believe rms is the default option...This should by pass the error for now.

WPringle commented 3 years ago

See #207 for fix