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
c5d0074d
Commit
c5d0074d
authored
3 years ago
by
Dr. rer. nat. Jürgen Mey
Browse files
Options
Downloads
Plain Diff
No commit message
No commit message
parents
57ca6daa
8b7c1698
No related branches found
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
+33
-25
33 additions, 25 deletions
mfiles/erosanimation.m
with
33 additions
and
25 deletions
mfiles/erosanimation.m
+
33
−
25
View file @
c5d0074d
function
[
B
,
varargout
]
=
erosanimation
(
variable
,
varargin
)
function
[
F
]
=
erosanimation
(
variable
,
varargin
)
% Visualize output of the EROS landscape evolution model (LEM)
% Visualize output of the EROS landscape evolution model
as animations
(LEM)
%
%
%
%
% The following function library is required, which can be downloaded
% The following function library is required, which can be downloaded
...
@@ -17,13 +17,14 @@ function [B,varargout] = erosanimation(variable,varargin)
...
@@ -17,13 +17,14 @@ function [B,varargout] = erosanimation(variable,varargin)
%
%
% DESCRIPTION
% DESCRIPTION
%
%
% erosanimation shows timeseries data either as grid average or as 2d/3d movie
% erosanimation creates movie frames of landscape evolution either in
% profile view, map view or in 3d.
%
%
%
%
% INPUT (required)
% INPUT (required)
%
%
% variable variable of interest (string)
% variable variable of interest (string)
% 'topo' Topographic elevation
% 'topo'
Topographic elevation
% 'sediment' Sediment thickness
% 'sediment' Sediment thickness
% 'water' Water depth
% 'water' Water depth
% 'discharge' Water discharge
% 'discharge' Water discharge
...
@@ -36,13 +37,15 @@ function [B,varargout] = erosanimation(variable,varargin)
...
@@ -36,13 +37,15 @@ function [B,varargout] = erosanimation(variable,varargin)
% 'hum' Water discharge on the topography
% 'hum' Water discharge on the topography
% 'rain' Sources (>0) and sinks (-1) of water and sediment
% 'rain' Sources (>0) and sinks (-1) of water and sediment
%
%
% 'profile' custom profile, second argument needs to be a DEM (GRIDobj)
% 'sprofile' stream long profile, second argument needs to be a DEM (GRIDobj)
%
% INPUT (optional)
% INPUT (optional)
%
%
% Parameter name/value pairs (pn,pv,...)
% Parameter name/value pairs (pn,pv,...)
%
%
% 'mode' visualization mode (string) (default: 'movie2')
% 'mode' visualization mode (string) (default: 'movie2')
% 'average' shows the evolution of the spatial average
%
% of the variable defined as required input
% 'movie2' 2d movie of variable
% 'movie2' 2d movie of variable
% 'movie3' 3d movie of topographic evolution
% 'movie3' 3d movie of topographic evolution
%
%
...
@@ -54,13 +57,7 @@ function [B,varargout] = erosanimation(variable,varargin)
...
@@ -54,13 +57,7 @@ function [B,varargout] = erosanimation(variable,varargin)
%
%
% OUTPUT
% OUTPUT
%
%
% B movie frames captured with modes 'movie2' and 'movie3'
% F movie frames
% B (mode='average') 3d array of the variable of interest.
%
%
% OUTPUT (optional)
%
% meanB spatial average of variable through time
%
%
% EXAMPLE
% EXAMPLE
%
%
...
@@ -98,21 +95,28 @@ function [B,varargout] = erosanimation(variable,varargin)
...
@@ -98,21 +95,28 @@ function [B,varargout] = erosanimation(variable,varargin)
% Date: 28. May, 2020
% Date: 28. May, 2020
p
=
inputParser
;
p
=
inputParser
;
expectedInput_variable
=
{
'topo'
,
'water'
,
'sediment'
,
'qs'
,
...
expectedInput_variable
=
{
'topo'
,
'water'
,
'sediment'
,
'
flux'
,
'
qs'
,
...
'discharge'
,
'downward'
,
'stress'
,
'hum'
,
'slope'
,
'capacity'
,
'stock'
};
'discharge'
,
'downward'
,
'stress'
,
'hum'
,
'slope'
,
'capacity'
,
'stock'
,
'sprofile'
,
'profile'
};
addRequired
(
p
,
'variable'
,
@
(
x
)
any
(
validatestring
(
x
,
expectedInput_variable
)));
addRequired
(
p
,
'variable'
,
@
(
x
)
any
(
validatestring
(
x
,
expectedInput_variable
)));
if
strcmp
(
variable
,
'sprofile'
)
||
strcmp
(
variable
,
'profile'
)
addRequired
(
p
,
'dem'
,
@
(
x
)
isa
(
x
,
'GRIDobj'
));
default_flowmin
=
100
;
addParameter
(
p
,
'flowmin'
,
default_flowmin
,
@
isnumeric
);
parse
(
p
,
variable
,
varargin
{:});
dem
=
p
.
Results
.
dem
;
flowmin
=
p
.
Results
.
flowmin
;
else
default_mode
=
'movie2'
;
expectedInput_mode
=
{
'movie2'
,
'movie3'
};
addParameter
(
p
,
'mode'
,
default_mode
,
@
(
x
)
any
(
validatestring
(
x
,
expectedInput_mode
)));
default_viewdir
=
[
45
,
45
];
addParameter
(
p
,
'viewdir'
,
default_viewdir
,
@
isnumeric
);
parse
(
p
,
variable
,
varargin
{:});
mode
=
p
.
Results
.
mode
;
viewdir
=
p
.
Results
.
viewdir
;
end
default_mode
=
'movie2'
;
expectedInput_mode
=
{
'average'
,
'movie2'
,
'movie3'
};
addParameter
(
p
,
'mode'
,
default_mode
,
@
(
x
)
any
(
validatestring
(
x
,
expectedInput_mode
)));
default_viewdir
=
[
45
,
45
];
addParameter
(
p
,
'viewdir'
,
default_viewdir
,
@
isnumeric
);
parse
(
p
,
variable
,
varargin
{:});
mode
=
p
.
Results
.
mode
;
viewdir
=
p
.
Results
.
viewdir
;
switch
variable
switch
variable
case
'topo'
case
'topo'
...
@@ -135,6 +139,10 @@ switch variable
...
@@ -135,6 +139,10 @@ switch variable
filetype
=
'discharge'
;
filetype
=
'discharge'
;
iylabel
=
'Water discharge (m^3/s)'
;
iylabel
=
'Water discharge (m^3/s)'
;
colors
=
'flowcolor'
;
colors
=
'flowcolor'
;
case
'flux'
filetype
=
'flux'
;
iylabel
=
'Water discharge (m^3/s)'
;
colors
=
'flowcolor'
;
case
'downward'
case
'downward'
filetype
=
'downward'
;
filetype
=
'downward'
;
iylabel
=
'Mean settling velocity (m/s)'
;
iylabel
=
'Mean settling velocity (m/s)'
;
...
...
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