Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion @msh/msh.m
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ function plotter(cmap,round_dec,yylabel,apply_pivot)
switch classifier
case{'both','distance'}
% process gdat info
land = [];
if ~isempty(gdat.mainland)
land = gdat.mainland;
land(isnan(land(:,1)),:) = [];
Expand All @@ -1411,7 +1412,13 @@ function plotter(cmap,round_dec,yylabel,apply_pivot)
inner(isnan(inner(:,1)),:) = [];
land = [land; inner];
end
[~,ldst] = ourKNNsearch(land',eb_mid',1);
if ~isempty(land)
[~,ldst] = ourKNNsearch(land',eb_mid',1);
else
% set distance to be larger than dist_lim
% everywhere when no land exists
ldst = eb_mid(:,1)*0 + 2*dist_lim
end
eb_class = ldst > dist_lim;
if strcmp(classifier,'both')
% ii) based on depth
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Deleting boundary conditions by specifyng their indices in `msh.object.bd` field. See https://github.com/CHLNDDEV/OceanMesh2D/pull/205
- Ability for user to set their own axis limits when plotting with `msh.plot()`. https://github.com/CHLNDDEV/OceanMesh2D/pull/224
## Fixed
- Minor fix to `msh.make_bc` using the `auto` method. https://github.com/CHLNDDEV/OceanMesh2D/pull/237
- correction in setting stereographic projection bounds in `setProj` to make sure points are not pushed outside and become NaNs (was limited to radius of 178 deg but made sure can go up to full 180 deg). https://github.com/CHLNDDEV/OceanMesh2D/pull/225
- Correctly deleting weirs from boundary object through `make_bc` delete method. See https://github.com/CHLNDDEV/OceanMesh2D/pull/205
- Array format fix for reading in ibtype and nvell from fort.14 file and when executing carry_over_weirs. See https://github.com/CHLNDDEV/OceanMesh2D/pull/206
Expand Down