Closed carrey95 closed 3 years ago
Hey @carrey95 looks like it's trying to identify some holes in the mesh for some reason as ocean boundaries. I assume you've ran
m = make_bc(m,'auto',gdat);
This can be controlled...see help msh.make_bc
under the auto
option.
Thanks for the comment. I ran m = make_bc(m,'auto',gdat,'distance'); Somehow it makes those blue holes in the water. Anyone knows how the holes can be avoided?
Does your shoreline have islands there?
Could you visualize your geodata
plot(gdat,'shp')
there are no islands there but just water. That is why I wonder. Thanks.
Okay if it's not too hard, I would rebuild the mesh from scratch and see if they happen again. Note you should set the random seed so the generation is reproducible by placing this before calling meshgen
.
rand('seed',1);
where 1 here is your seed. This way I'll also be able to build you instance of the mesh if this keeps happening.
If this re build doesn't work, I'd recommend removing the cleanup
step during mesh generation by passing cleanup
,0 to meshgen
.
when using 'cleanup',0 in meshgen, some error occurs:
m = make_bc(m,'auto',gdat,'distance'); Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 0-by-2. Error in extdom_polygon (line 103) temp(k,:) = pts(sel,:); Error in msh/make_bc (line 1380) [polys,poly_idxs] = extdom_polygon(etbv,obj.p,1);
used meshgen as mshopts = meshgen('ef',fh,'bou',gdat,'plot_on',1,'nscreen',5,'proj','Equidistant Cylindrical','cleanup',0);
yep, that's because the mesh isn't cleaned. I wanted to know if that fixed your holes issue or not. Can you plot the connectivity?
'cleanup',0 does not remove the holes. Somehow, using rand('seed',1) and different maximum resolution resolves the problem. Thanks.
by the way, how can I plot the connectivity?
plot(m)
see
help msh.plot
What is the blue holes in the grid?