Skip to content

Commit

Permalink
HO
Browse files Browse the repository at this point in the history
  • Loading branch information
GHilmarG committed Aug 28, 2024
1 parent 4b2221c commit e8c80d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions LakeOrOcean3.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
% This script is designed to be used in conjunction with DefineMassBalance
% to only assign melt to nodes that should be melted (OceanNodes).
%
% Note that this script does not robustly identify all possible lakes in a
% domain, since it only considers nodes strictly downstream of the grounding
% line as floating. Thus, floating nodes with an edge that crosses the
% grounding line, which are not considered floating, will also not be
% considered as lakes. In this way, very small isolated patches of floating
% nodes will neither be considered lakes nor ocean.
% Note that this script does not robustly identify all possible lakes in a domain, since it only considers nodes strictly
% downstream of the grounding line as floating. Thus, floating nodes with an edge that crosses the grounding line, which are
% not considered floating, will also not be considered as lakes. In this way, very small isolated patches of floating nodes
% will neither be considered lakes nor ocean.
%
% Also consider using: LakeOrOcean.m , which uses an alternative approach for the problem.
% ... but is painfully slow and will fail to correctly identify lakes
Expand All @@ -54,6 +52,10 @@
% hold on ; plot(MUA.coordinates(OceanNodes,1)/CtrlVar.PlotXYscale,MUA.coordinates(OceanNodes,2)/CtrlVar.PlotXYscale,'ob') ;
% PlotGroundingLines(CtrlVar,MUA,F.GF,[],[],[],color='r') ;
%
%
%
%
%
%%

GF = IceSheetIceShelves(CtrlVar,MUA,GF);
Expand All @@ -64,7 +66,7 @@
NodesDownstreamOfGroundingLines=GF.NodesDownstreamOfGroundingLines;
else
if isstring(NodesDownstreamOfGroundingLines)
if contains(NodesDownstreamOfGroundingLines,"Strickt")
if contains(NodesDownstreamOfGroundingLines,"Strict") || contains(NodesDownstreamOfGroundingLines,"Strickt")
NodesDownstreamOfGroundingLines=GF.NodesDownstreamOfGroundingLines;
elseif contains(NodesDownstreamOfGroundingLines,"Relaxed")
NodesDownstreamOfGroundingLines=GF.node < 0.5 ;
Expand Down
2 changes: 1 addition & 1 deletion NewDesiredEleSizesAndElementsToRefineOrCoarsen2.m
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
W=0.5;
EleSizeDesired=W*EleSizeDesired+(1-W)*EleSizeCurrent;

% and also put strickt limits on change in EleSize:
% and also put strict limits on change in EleSize:
EleSizeRatio=EleSizeDesired./EleSizeCurrent;

I=EleSizeRatio>CtrlVar.MaxRatioOfChangeInEleSizeDuringAdaptMeshing;
Expand Down

0 comments on commit e8c80d1

Please sign in to comment.