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

make_bc error #260

Closed carrey95 closed 2 years ago

carrey95 commented 2 years ago

Hi, Can you please advise how to deal with below error message? Thanks in advance.

m = make_bc(m,'auto',gdat,'distance'); % make the boundary conditions Unrecognized function or variable 'land'. Error in msh/make_bc (line 1357) land = [land; inner];

krober10nd commented 2 years ago

I believe you need to pass a distance value after the kwarg distance.

help msh.make_bc
carrey95 commented 2 years ago

Thanks! I will try that.

After this code, I found gdat.mainland =[]. This means geodata did not automatically detect mainland?

krober10nd commented 2 years ago

Is your domain setup so that there are only islands? So then the shoreline would be fully enclosed by the bounding box. No parts would intersect it.

carrey95 commented 2 years ago

Thanks for the comment. The issue is resolved by i) extending coastline somewhat arbitrarily so that there is no intersection with bounding box and manually closing the extended coastline, ii) thoroughly checking self-intersecting coastline of extremely small scale features (this occurred after ArcMap buffer and smoothing operation), and iii) further generalizing complicated features. Thanks again!