Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ErosMatlabInterface
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dr. rer. nat. Jürgen Mey
ErosMatlabInterface
Commits
1e222df4
Commit
1e222df4
authored
2 years ago
by
Dr. rer. nat. Jürgen Mey
Browse files
Options
Downloads
Patches
Plain Diff
profile animations now also work without sediments
parent
8e8ea84f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mfiles/erosanimation.m
+28
-6
28 additions, 6 deletions
mfiles/erosanimation.m
with
28 additions
and
6 deletions
mfiles/erosanimation.m
+
28
−
6
View file @
1e222df4
...
@@ -183,8 +183,15 @@ if strcmp(variable,'sprofile')
...
@@ -183,8 +183,15 @@ if strcmp(variable,'sprofile')
[
~
,
index
]
=
sortrows
({
H
.
datenum
}
.'
);
[
~
,
index
]
=
sortrows
({
H
.
datenum
}
.'
);
H
=
H
(
index
);
H
=
H
(
index
);
W
=
W
(
index
);
W
=
W
(
index
);
S
=
S
(
index
);
D
=
D
(
index
);
D
=
D
(
index
);
try
% in case there is no sediment involved
S
=
S
(
index
);
sed
=
grd2GRIDobj
(
S
(
1
)
.
name
,
dem
);
catch
sed
=
dem
;
sed
.
Z
=
zeros
(
dem
.
size
);
end
for
i
=
1
:
length
(
D
)
for
i
=
1
:
length
(
D
)
[
z
,
~
]
=
fopengrd
(
D
(
i
)
.
name
);
[
z
,
~
]
=
fopengrd
(
D
(
i
)
.
name
);
...
@@ -192,14 +199,18 @@ if strcmp(variable,'sprofile')
...
@@ -192,14 +199,18 @@ if strcmp(variable,'sprofile')
B
(:,:,
i
)
=
z
;
B
(:,:,
i
)
=
z
;
end
end
sed
=
grd2GRIDobj
(
S
(
1
)
.
name
,
dem
);
w
=
waitbar
(
1
/
length
(
H
),[
'Collecting movie frames ... '
]);
w
=
waitbar
(
1
/
length
(
H
),[
'Collecting movie frames ... '
]);
for
i
=
1
:
length
(
H
)
for
i
=
1
:
length
(
H
)
h
=
figure
;
h
=
figure
;
subplot
(
2
,
1
,
1
)
subplot
(
2
,
1
,
1
)
water2
=
grd2GRIDobj
(
W
(
i
)
.
name
,
dem
);
water2
=
grd2GRIDobj
(
W
(
i
)
.
name
,
dem
);
dem2
=
grd2GRIDobj
(
H
(
i
)
.
name
,
dem
);
dem2
=
grd2GRIDobj
(
H
(
i
)
.
name
,
dem
);
sed2
=
grd2GRIDobj
(
S
(
i
)
.
name
,
dem
);
try
% in case there is no sediment involved
sed2
=
grd2GRIDobj
(
S
(
i
)
.
name
,
dem
);
catch
sed2
=
sed
;
end
plotdz
(
S2
,
dem
,
'color'
,[
0.9
0.9
0.9
]);
hold
on
% initial river profile
plotdz
(
S2
,
dem
,
'color'
,[
0.9
0.9
0.9
]);
hold
on
% initial river profile
plotdz
(
S2
,
dem
-
sed
,
'color'
,[
0.7
0.7
0.7
])
% initial bedrock profile
plotdz
(
S2
,
dem
-
sed
,
'color'
,[
0.7
0.7
0.7
])
% initial bedrock profile
plotdz
(
S2
,
dem2
+
water2
,
'color'
,[
0
0.61
1
])
% water surface
plotdz
(
S2
,
dem2
+
water2
,
'color'
,[
0
0.61
1
])
% water surface
...
@@ -241,11 +252,18 @@ elseif strcmp(variable,'profile')
...
@@ -241,11 +252,18 @@ elseif strcmp(variable,'profile')
S
=
dir
(
'*.sed'
);
S
=
dir
(
'*.sed'
);
D
=
dir
(
'*.flux'
);
D
=
dir
(
'*.flux'
);
[
~
,
index
]
=
sortrows
({
H
.
date
}
.'
);
[
~
,
index
]
=
sortrows
({
H
.
date
}
.'
);
H
=
H
(
index
);
H
=
H
(
index
);
W
=
W
(
index
);
W
=
W
(
index
);
S
=
S
(
index
);
D
=
D
(
index
);
D
=
D
(
index
);
try
% in case there is no sediment involved
S
=
S
(
index
);
sed
=
grd2GRIDobj
(
S
(
1
)
.
name
,
dem
);
catch
sed
=
dem
;
sed
.
Z
=
zeros
(
dem
.
size
);
end
for
i
=
1
:
length
(
D
)
for
i
=
1
:
length
(
D
)
[
z
,
~
]
=
fopengrd
(
D
(
i
)
.
name
);
[
z
,
~
]
=
fopengrd
(
D
(
i
)
.
name
);
...
@@ -254,7 +272,7 @@ elseif strcmp(variable,'profile')
...
@@ -254,7 +272,7 @@ elseif strcmp(variable,'profile')
end
end
sed
=
grd2GRIDobj
(
S
(
1
)
.
name
,
dem
);
[
d
,
z
,
x
,
y
]
=
demprofile
(
dem
);
[
d
,
z
,
x
,
y
]
=
demprofile
(
dem
);
[
~
,
sz0
]
=
demprofile
(
sed
,[],
x
,
y
);
[
~
,
sz0
]
=
demprofile
(
sed
,[],
x
,
y
);
...
@@ -264,7 +282,11 @@ elseif strcmp(variable,'profile')
...
@@ -264,7 +282,11 @@ elseif strcmp(variable,'profile')
subplot
(
2
,
1
,
1
)
subplot
(
2
,
1
,
1
)
water2
=
grd2GRIDobj
(
W
(
i
)
.
name
,
dem
);
water2
=
grd2GRIDobj
(
W
(
i
)
.
name
,
dem
);
dem2
=
grd2GRIDobj
(
H
(
i
)
.
name
,
dem
);
dem2
=
grd2GRIDobj
(
H
(
i
)
.
name
,
dem
);
sed2
=
grd2GRIDobj
(
S
(
i
)
.
name
,
dem
);
try
% in case there is no sediment involved
sed2
=
grd2GRIDobj
(
S
(
i
)
.
name
,
dem
);
catch
sed2
=
sed
;
end
[
~
,
hz
]
=
demprofile
(
dem2
,[],
x
,
y
);
[
~
,
hz
]
=
demprofile
(
dem2
,[],
x
,
y
);
[
~
,
wz
]
=
demprofile
(
water2
,[],
x
,
y
);
[
~
,
wz
]
=
demprofile
(
water2
,[],
x
,
y
);
[
~
,
sz
]
=
demprofile
(
sed2
,[],
x
,
y
);
[
~
,
sz
]
=
demprofile
(
sed2
,[],
x
,
y
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment