Thanks for your reply and Dirk’ contribution. I’ll do it again and look forward to a new copy will bring new experiences. I’ll also feedback results timely.

Best, Xiaoli ]]>

Cheers, Wolfgang ]]>

Thanks for your great program very much. I have download the latest copy of Topotoolbox from https://github.com/wschwanghart/topotoolbox last week. Unfortunately I’ve experienced some issues when I go through ‘topoapp’.

1)About the button ‘Import outlets from ascii file(x,y)’

My outlets is a ascii file, it contains a pair of project coordinate value of the outlet. When I input a .txt file, the following error will occur:

Undefined function ‘max’ for input arguments of type ‘struct’.

Error in importoutlets (line 34)

if max(outlets(:,1))<=180 && max(outlets(:,2))<=90 % probably lat,lon

Error while evaluating PushTool ClickedCallback

2) About the button ‘Pick channel reach’

After I pick two points along the streams on the main windows, the following error will occur:

Undefined function ‘snap2stream’ for input arguments of type ‘GRIDobj’.

Error in pickreach (line 38)

[ix1,~] = snap2stream(W,ix1);

Error while evaluating PushTool ClickedCallback

I am using MATLAB R2014b, the paths were added correctly and I’ve followed the user guide step-by-step.

I would deeply appreciate if you can provide me some advices to solve the above issues.

Thank you for your time and consideration. I look forward to hearing from you at your earliest convenience.

Sincerely,

Xiaoli LIU

email- liuxl.j@163.com

]]>Cheers, W. ]]>

Thanks for your reply. I am using reproject2utm to project my STRM 1-ARC dem data to WGS-UTM, I know 1-arc is about 30m on the ground, how should I specify the exact res(resolution) in the function?

Cheers, Kai

>

]]>Cheers, Wolfgang ]]>

DEM = GRIDobj(‘srtm_bigtujunga30m_utm11.tif’);

FD = FLOWobj(DEM,’preprocess’,’c’);

S = STREAMobj(FD,’minarea’,1000);

S = trunk(klargestconncomps(S));

A = flowacc(FD);

z90 = crs(S,DEM,’K’,10,’tau’,0.9);

theta = [0.4:0.1:0.6];

theta2 = [0.3:0.1:0.6];

for r = 1:numel(theta)

k{r} = ksn(S,DEM,A,theta(r));

k{r} = smooth(S,k{r},’K’,200);

end

for s = 1:numel(theta2)

c{s} = chitransform(S,A,’mn’,theta2(s));

c{s} = smooth(S,c{s},’K’,200);

end

[~,~,z,d,k{:}] = STREAMobj2XY(S,DEM,S.distance,k{:});

[~,~,z,d,c{:}] = STREAMobj2XY(S,DEM,S.distance,c{:});

subplot(2,2,1)

plotdz(S,z90);

subplot(2,2,2);

for s = 1:numel(theta2); plot(c{s},z); hold on; end

subplot(2,2,3)

for r = 1:numel(theta); plot(k{r},z); hold on; end

subplot(2,2,4)

for r = 1:numel(theta); plot(d,k{r}); hold on; end

c{:} is a cell array of node-attribute lists. There are two options:

One:

[~,~,z,d,k{:},c{:}] = STREAMobj2XY(S,DEM,S.distance,k{:},c{:});

Then you can use your code that follows.

Two:

Use the node-attribute list directly in the function plotdz

plotdz(S,z,'distance',c{1});

Setting the ‘distance’ parameter in plotdz allows you to use custom distances, and not flow distances from the outlet.

You can use the function crs to smooth river profiles. See our recent paper here: https://www.earth-surf-dynam.net/5/821/2017/ , and this blog entry: https://topotoolbox.wordpress.com/2017/12/07/paper-out-now-bumps-in-river-profiles/

Hope this helps.

Wolfgang

I’m trying to write a script to plot in the same page long-river profiles and, for different theta values, chi-profiles, ksn/z and d/ksn profiles.

Here my script:

DEM = GRIDobj(‘srtm_bigtujunga30m_utm11.tif’);

FD = FLOWobj(DEM,’preprocess’,’c’);

S = STREAMobj(FD,’minarea’,1000);

S = trunk(klargestconncomps(S));

A = flowacc(FD);

theta = [0.4:0.1:0.6];

for r = 1:numel(theta)

k{r} = ksn(S,DEM,A,theta(r));

k{r} = smooth(S,k{r},’K’,200);

c{r} = chitransform(S,A,’mn’,theta(r));

end

[~,~,z,d,k{:}] = STREAMobj2XY(S,DEM,S.distance,k{:});

subplot(2,2,1)

plotdz(S,DEM);

subplot(2,2,2);

for r = 1:numel(theta); plot(c{r},z); hold on; end

subplot(2,2,3)

for r = 1:numel(theta); plot(k{r},z); hold on; end

subplot(2,2,4)

for r = 1:numel(theta); plot(d,k{r}); hold on; end

The problem is with chi profile that doesn’t work.What’s wrong?

Add. question: How can I smooth the long – river profile?

]]>