EGU WEBINARS: Topographic Analysis Using TopoToolbox in MATLAB and Python - Session 2
Watch on YouTubeVideo summary
The second session of the EGU Webinar on Topographic Analysis using TopoToolbox focused on advanced applications that extend beyond basic topography, introducing two specialized tools designed for complex geomorphic investigations. The first tool, GraphFlood, addresses limitations in high-resolution Digital Elevation Models where rivers appear as multipixels rather than single lines by approximating steady-state flow fields rapidly using Manning's equations. This iterative model fills a topography with water based on precipitation inputs until equilibrium is reached, allowing users to calculate flow depth, velocity, and shear stress while classifying landscapes into fluential, colluvial, or hillslope domains. The second tool, Transect, facilitates the connection of separate geomorphic processes by extracting cross-sections from channels to divides, which helps quantify lateral valley adjustments in response to vertical incision. Transect operates in two distinct modes: a geometric mode that generates sub-perpendicular transects for even coverage and a flow routing mode that follows topographic gradients to represent natural pathways for sediment and water movement.
The webinar also provided a comprehensive guide on how the community can contribute to the development of TopoToolbox, emphasizing its nature as a collaborative project spanning MATLAB, Python, R, and C packages. Users are encouraged to engage through various channels, including a discussion forum for general inquiries, an issues tab for reporting bugs or feature requests, and a gallery for submitting live scripts and Jupyter notebooks that demonstrate specific applications. The standard workflow for code contribution involves forking a repository, making changes, and submitting pull requests that must pass automated tests before merging, while specialized tools can be maintained in separate repositories within the TopoToolbox organization. During the Q&A, speakers clarified that the goal is not to create a one-to-one copy between MATLAB and Python versions but rather to port useful functionality while allowing Python-specific features to lead development, leveraging external statistical libraries in Python alongside MATLAB's built-in ecosystems for machine learning.
In their concluding remarks, the speakers reinforced TopoToolbox's role as an environment for scientific experimentation, hypothesis testing, and model development, inviting audience feedback on future workshop topics and specific scientific questions they wish to address. They highlighted "Landscapes Live," a resource established in 2020 that features recordings of talks on tectonic geomorphology and topographic analysis, offering code, figures, and scripts tailored for educational purposes and research applications. The team expressed openness to organizing future webinars specifically on topics like tectonic geomorphology and interpreting geomorphic indexes, while noting that contributions to the gallery can include standalone scripts without requiring full GitHub repositories to increase author visibility. The session ended with gratitude to the EGU for hosting the event and an encouragement for participants to apply their newly acquired knowledge in studies, research, and classrooms, underscoring the community's commitment to fostering learning through open-source collaboration and shared resources.
Read the full video transcript
So once again I think still people are
dropping in um but nevertheless let us
start again. you are here in the
topographic analysis uh webinar
organized by the EGU um and you have
well I guess most of you have already
attended uh yesterday's session um and
why this session was mainly you know
introducing to top toolbox and its
latest developments
uh and then we had also
um yeah a a coding session
comparing basically uh the latest
developments in MATLAB uh with those in
Python and how they are implemented in
in top toolbox and then we went on with
a more advanced um topic when it uh was
about nickpoint
location modeling using top toolbox and
we also had a lot of time to discuss
things so I think that was a very uh
good um um day and I hope you enjoyed
did as much as we did. Um so today the
second day again from we have two hours
um and within these two hours uh we will
uh mainly deal with uh applications in
top toolbox. One is graphlet a
simplified hydrodnamics tool in topo
toolbox. Um and then there's transact
another tool uh which is about analyzing
landscapes and the interconnected uh
landforms. Uh we will also talk about uh
contribution workflows. How can you
actually contribute to topo toolbox
development um and we will again
conclude with a discussion and
conclusion. uh we will do it like uh
yesterday that um that you should use
the chat to to ask you questions. So
please ask questions uh during the
presentations just using the the chat
functionality
um and we will then have ample of time
to uh yeah to cover your questions in
the discussion and also have the time to
to moderate those. Um before we finally
start, I would just uh give a short um
you know call out to uh a latest
preprint that just appeared last week.
Um uh it's the it's yeah it deals with
our uh latest work that we did uh Topo
Toolbox 3 the developments that we
implemented in our new software um in
particular testing frameworks um but
also the whole continuous integration
continuous development stuff u that as a
user you probably don't have to care
that much about but that's exactly
that's why we are doing it so that no
one else has to care about it. Okay. Um
without further ado, um I would like to
head over to um or get the mic over to
Boris uh who will talk about graphlet.
So I'm unsharing my screen I guess uh
and you will take over.
>> Thanks a lot Volvang. I will I will take
over. Let me just share my screen uh
very quickly. And there we go. You
should be able to see now my my slides.
Uh so yeah I will be talking about graph
floods. This is the work I've been doing
in the past couple of years and it's
becoming my main tool and I've
implemented the final version in in
TooBo toolbox uh because it's very
suitable for topographic analysis. I
will be first introducing graph flood
why did we come up with uh with that
algorithm uh what is it used for? Um
then I will very quickly talk about how
it works in term of of of numerical
methods. what are what's in the pipeline
for the future development and the most
interesting part we'll do a bit of live
coding at the end so graphled is a 2D
hydrodnamics model basically it takes a
topography um you put some water on it
via precipitation rates and it computes
the fields uh of flow depth and flow
velocity in 2D the motivations behind
developing graph flood comes from the
rise of high resolution DMS uh we
switched basically in the last decade or
so from a referential where we can
roughly have the shape of the fluial
valley from which we can calculate the
fluial slope but not much more than
slope and range area to a referential
where we can get that's what you can see
on the right um systematically we can
measure the width of the river we can
see the small gullies we can see um a
lot more informations and we can access
it more and more systematically thanks
first to LAR nationwide LAR survey like
in the US, in New Zealand, in France, in
Germany. This data is now roughly
available for the whole country or even
better thanks to satellite
photoggramometry. We have satellites
like the PlaySt.
But it also brings some challenges
because our methods in geomorphology
which are mostly based on dage area when
we have a high resolution DM metric
scale that's what you can see at the
screen here d area fails to capture the
whole geometry of the rivers because
even with a multiple flow algorithm we
are still flowing water on the
topography but rivers are now
multipixels and the alternative to drain
area is to use flood models and if you
take is a flood model that are designed
for risk analysis like hecas for example
a flood computing a flood for 1.5 km
basin uh six physical day in real life
of flood takes about 10 hours of compute
time. So if as a geomorphologist you're
interested by montain range scale basin
scale it's a bit limited and that's
where graph floods comes in it
calculates the steady state flow depth
and velocity and it does an
approximation of it. So what does that
mean? That mean that if you have a
topography and any way to quantify your
water inputs for example with a
predition precipitation rate it directly
calculates the corresponding
equilibrated flow field. You can think
about it of calculating the peak
discharge of a flood and propagating it
instantaneously on the whole landscape
and it makes an approximation meaning
that it takes just a couple of seconds,
minute, maybe hours if you have a very
big DM uh to compute. What can we do
with it? We can calculate flow extent.
For example, you what you can see on the
left figure each color correspond to the
area flooded for a given precipitation
rate. So you can do a bit of simplified
flood analysis before running the very
big model like heas. On the middle
figure we've been computing flow width
systematically for basin and you can do
that across different precipitation rate
to test for the effect of climate
forcing for example but you can also go
a bit further for example we've been
doing a bit of classifications using
that data. Basically we use the
hydraulic slope and the discharge. This
is uh on the x-axis the discharge to
have some sort of hydraulic slope area
plot. And we use that data to segment
our landscape in fluial domain that's
what you can see in blue collivial
domain that's what you can see in yellow
or even hill slope that's what you can
see in red to give you a more
sophisticated example um just just for
the example I'm um tectonic
geomorphologist so I'm interested into
um identifying tectonic signals in the
topography so this basin is a 10 km wide
basin in the east in the west coast uh
of the us in California where we have
LAR data. Um, and it has been subjected
to recent tectonic activation. So
there's recent tectonic uplift over
there. And I've been calculating for the
main river. That's what you can see in
red on the map. Two metrics with graph
flood the sheer stress. This is
basically the erosion power of the river
and the river width for a given
precipitation rate. And we can identify
different type of signals that were not
visible only with slope and drainage
area. For example, we have some nick
points here that are expressed by an
increase of she stress. That's the the
typical nick point where you have an
increase of slope. We also have wit
nickpoint where you have a narrowing of
the river locally and a slight increase
of ch stress. um in the literature that
usually shows that the river is
responding to a recent input of
sediments and we have more combined um
signals where you have an increase of
sheer stress near my headwater combined
with a narrowing of the river which is a
bit more consistent with um tectonic
signals as we as we see them usually. So
how does graph flood work? It's an
iterative algorithm. The first step is
to fill the topography with water. If
you have a lake and an infinite amount
of time, uh you will eventually fill it
with water. Then you calculate what I
call the discharge input. We calculate
the drain area. So with topo toolbox and
we multiply by the precipitation rate
that gives us ultimately the total
amount of water we can use to flood our
landscape. And then locally for each
pixel we calculate the discharge output.
We use Manning's equations to compute
how much water can my cell store. And
then if we have more water coming in
than out, I add some water. The
opposite. If I have more water coming
out than in, and I will iterate for
hundreds of iteration between these
three step until I reach flow depths,
field of flow depth and velocity that's
totally equilibrated on my nonscape. The
key point to address before I move to uh
the the demo are how to handle bundary
conditions. Where and how do I tell the
code I'm inputting or outputting water
and checking that my model has reached
convergence and that I can stop
iterating. Oh, just a last word about
implementation. Um most of it is coded
in liptop toolbox because it's quite a
computationally demanding algorithm. The
main interface at the moment I'm still
working on it is in Pytopo toolbox.
That's where I will um implement the the
the late um cutting edge improvement I
will do on the algorithm and we are
working now with will and wg going to
have a mat lab and our version there's a
matlab version working but it's it's a
bit less sophisticated than the python
one but it will come soon and just for
the future I'm working now on GPU
version of this algorithm and on the
main um algorithm we find in in
geommorphology and that will come
hopefully in 2026 six in a module called
Pyas flow which is also part of the lip
of the toolbox
uh GitHub and and and
all right let me share the live coding
window now and we will get to it
>> just briefly Boris um we say that anyone
who has questions is welcome to post
these questions in the chat and we will
address them later on. Yeah. And also
feel free to contact us on um by email
or on the topograph on the GitHub
discussion page um after this workshop
if you have some questions that arise.
All right. So you should be able to see
my screen now. Um this is a Jupiter
notebook. So I will be using the Pytopo
Toolbox version that will presented
yesterday. This notebook will be shared
I guess on the gallery or or within the
the top toolbox and you can follow it uh
without this talk initially. That's why
I won't read everything that's in in the
cells because I assume that some people
will want to follow it as a tutorial
offline. So I'll just assume you have
installed too. We will just import it. I
will also use u numpy, scypi and scikit
imageh which are classic scientific
computational tool uh in uh in the
python ecosystem. And maybe something
that you may not be um used to is that
I'm using IPMPL. This is a way to tell
Jupiter that I need interactive figures.
It's not something that's mandatory, but
now you know. All right. Uh let's go. I
will start with a quick start.
Basically, you have a DM um the classic
DM and you want to calculate the flow
depth for a given precipitation rate. I
will be using uh the Green River DM
which is built into topo toolbox. So, if
you want to try it, you don't have to um
um you don't have to download a new DM
and I'm cropping it to a small area to
make sure it can run live because the
algorithm can take quickly a few
minutes, tens of minutes, or even hours
to run. if you have a massive DN with um
tens of millions of sales and just to
show you I will um the the DM is most
small basin in a low red area in I think
it's in Utah in the in the US and I
chose it because it has very well
definfined uh fusial form so it will be
very nice to see if we can capture them
with graph flood very much like the grid
object the flow object the stream object
in top toolbox graph has its own uh
graph object which I named GF object
effect because probably graphford was a
bit too uh long to to write all the time
and to construct it you just need to
give the grid object which is the
topography on which you want to drop
flow as you can see here I'm creating it
and you can add some options uh optional
uh data but it's usually good to have
them P is my precipitation rate you can
either give a scalar to have a constant
precipitation rate on every pixel or you
can give a 2D uh array of DM size if you
want specially varying uh precipitation
and a manning coefficient for the
manning coefficient I don't have time to
go through the physics but it's the
empirical coefficient that you will use
in any flooding model um it's what we
call the friction coefficient
unfortunately we have to choose a value
for it so there are some a lot of
literature on on that value here I chose
0.05 05 which is a fairly standard value
for open rivers. Once we have
constructed our uh graph object um we
need to run the model for a number of
iteration because as I told you before
we are gradually creating a field of
flow depth until it stabilizes. Here I
will run it for 100 iteration. So while
it run it will take um oh yeah of course
I forgot to run the cell before. While
it run it will take something like 10
seconds. I'll just um state that I'm
using a very high precipitation rate 100
mm per hour which I convert here into
meta per second. Uh but it's because we
have a very small area. So if I want
nice rivers and to show you quickly how
those rivers work I'm using a a very
high precipitation rate. The model also
needs uh the number of iteration on
which you want to run it and a numerical
time step. It's a steady state model. So
the time step does not have physical
meaning but basically the higher the
time step the faster you reach
convergence theum the higher number of
iteration you run the faster as well the
more you reach the convergence but if
you have a high time step you can
destabilize the model it's a bit of the
issue with those physics uh flooding
model here I've been choosing a nice
balance which usually work for um data
with a relatively low relief on LAR DDMs
and then once the model has It has
finished to run for a long time. We can
simply access the field of flow depths
in the graph flood object with GFO.HW
flow height. Um and we can see that
basically we've run the basics of graph
flood. We can access at any point the
field of flow depths to see if our river
is wide or diverging or converging. And
that's one of the main strengths of um
using floods to describe rivers in the
topography. Even if your flow is
diverging, like you can see here, it's
branching into two branches, you can
still describe your reverse even if it's
like 10 or 20 pixels. So, all right,
what can we do with that? The first
thing I'd like to show is to compute
shear stress. Shear stress is the force
the river is applying on the landscape.
Whatever erosion or sediment transport
model you're using, it starts with
calculating shear stress. Even the
stream power low even if we use a lot of
different assumption on range area on
flow uh steady uh and uniform flow and
so on at the start of it it's just
fresh. So this is really the most basic
way to describe erosion in your
landscape and the most basic way to
calculate it with craft flood is to use
uh this form this very standard formula
g h and um hydraulic slope which is
fairly easy and uh rapid to compute with
the function compute and if I plot it it
will simply give me a clue to uh towards
where I'm focusing erosion power in my
landscape. For example, here I'm
focusing erosion uh at that place and if
I have a drop of your stress, I can
start interpreting that I will deposit
the sediment I've been on training. All
right. Another thing we can get with
graph flood is getting the flow
velocity. It can be important if you're
tracing for example a pollutant in your
river uh suspended sediment and so on.
And uh the flow velocity will be what
you use to transport and advect
information in your um on your
landscape. Again, this is fairly
standard because this is something
that's directly simulated by the model.
So, we just have to get the grid object
of u which is standard um uh notation
for flow velocity and you can plot it to
identify where your flow is accelerating
or where your flow is decelerating.
These two metrics just stress and flow
velocity are really the let's say basic
first order metrics we can get out of
flow. But we can go a bit further and
start interpreting our landscape. For
the sake of time, I won't go through the
very uh the detail of each and every
line of code. But what I'm doing here is
getting from the model my volutric
discharge that's skewing that I get here
and my hydraulic slope. That's the slope
of my topography plus the uh flow depth
I have on top. And I'm using this
information as an alternative to um
slope area plot. um slope area plot in
geomorphology is what define KSN what
defined sky it's really behind
everything we are using to quantify
erosion and using this hydraulic version
we have a bit more information for
example we can see more breaking slope
into this slope area plot and we can use
this breakin slope for example here um I
use 1.7 and minus 1.7 and minus 1.4 for
as a threshold that I identified. I
think it belongs to one of those uh
breaking slope. And if I identify my
data where I'm um where I have sorry uh
I'm respecting the threshold, it allows
me to identify where I have uh my fusial
domain. That's what I was saying before
to classify my landscape and that can
identify in that using this kind of
information a 2D river network. One
thing I forgot to comment, sorry, is uh
that it can require a bit of extra work
to clean. For example, if I use the row
data, you can see that my 2D network is
a bit um patchy with a lot of noise. So,
if I want something cleaner here, I've
been using a sci domain, sorry, scikit
image, uh Python tool called binary
closing. It's just a way to tell the
code, I want my 2D field to be as
continuous as possible, so clean it a
bit. And um I end up with a 2D network
and 2D mask of topography. But we can go
even further. For example, can we use
this 2D mask of top of reverse sorry to
calculate channel widths because
essentially this is my fluial domain. If
you want the full example because again
for the sake of time um it's a lot of
step to to to to explain but the example
from the the paper volgon just show uh
is available in the gallery of to box
and is developing a bit more in details
how to calculate that width but the step
are really straightforward. I'm cleaning
the channel mask that's what I've just
been showing with binary closing. I
extract the center line of uh that mask
using something called a skeletonized
algorithm. Skeletonized algorithm is
just a way to collapse this 2D mask into
a network of line. And then I'm
calculating the distance the eucidian
distance from the um border to that
center line and that gives me if I uh
double it the u width of my river. So if
I run that code you can see it's not
hundreds of line of code. is really just
maybe 10 lines of code uh excluding
visualization. You can see that it has
been doing what I said. Um if I zoom on
an area, the yellow you can see is the
mask we've been quantifying a bit
before. The line of dots is the center
line that I've been calculating with the
skeletonized algorithm and the color is
my river wits calculated uh with this
algorithm. You can see that we can
quickly identify the area where my river
is widening. I can then uh use some
algorithm like a KD3 uh KD3 sorry to
related to the real uh river network
that I would have been calculating with
toolbox and uh cross that data with any
other stream object uh analysis that uh
that I would have been doing before. All
right. Um yes, I'm done with the quick
start. Sorry, I was just shaking. And
the rest of this tutorial will be
slightly more boring. But this is what I
said before. There are two aspects that
are crucial with Scruff flood. The first
one is checking the convergence. Have I
been running enough iteration? Can I
trust the field of flow depths that I've
been creating? Um and to do so there are
not there are many different ways. I'm
still trying to find the perfect way
that I will implement at some point in
graph flood to say to to have an
automated way to run to convergence. But
the safest by far is to use um to to
monitor sorry the increase of my flow
depths through time or through the
iterations. Once the latter has
stabilized I can consider that my
algorithm has been running to
convergence. So to do so I restart from
scratch to create my graphlet object and
I will be saving every 10 iteration my
field of flow depth. So this will take a
bit of time to run about 10 seconds uh
like we used to to do. I will plot in a
when it has um run a different step. You
can see that my after my first 10
iteration I have a very faint reverse
and slowly through time it starts to
accumulate more water up to a point
between my two last iteration where it's
not moving a lot anymore. So what did I
do to check that if I' that I have uh
reached convergence? I'm simply running
uh I'm simply calculating between each
field of flow depth that I've been
saving the 19th percentile of the H
increment. This is in log scale and what
it tells me is that the 19th percentile
say that I've been adding 3 mm of water
after 10 iteration um in between every
10 iteration and I'm monitoring that
it's decreasing through time up to a
value where basically not much is
happening anymore. Here for example I'm
only adding a few like less than a
millimeter every 10 iteration to my
field of flow depth. So I can consider
that I've reached something close to
equilibrium. I can run my model for 10
for 100 more iteration 10 10 times more
and keep monitoring and uh once it has
run I can still monitor my increase of
foot depths and you can see that through
time it will store and slowly converge
towards zero but at that point I don't
care anymore because I'm not building
anything anymore I'm just refining a few
millimeters here and here and there
right so this is the first um aspect to
check the second one is to make sure
that we manage bund conditions. What
I've been showing you so far is really
simple. I have my DMs. My water can flow
everywhere and will leave from the
moment it reach a border of my DM. So my
first row, last row, first column, last
column. But some cases are a bit more
convoluted. For example, let's say that
I want on my landscape my water to enter
by the side of my river of my river
reach uh at the bottom of my DM. I don't
want my water to leave the DM until it
reaches the output of this rivers. So
what I did here is plotting the hill
shade of the DM without the keyword
extent. So basically the um X and Y axis
are not the X and Y coordinate anymore
but they are the number of row and
columns which allows me to identify the
small areas where I want to input water
or to leave water which is the indices
I've been um uh identifying here and if
I now look um visualize sorry my field
of bundary conditions I can see that in
light blue this is where my my water can
flow on my DM um on my wall I have dark
blue which means uh that the value is
zero and that my water cannot cross this
bundary and on the top right which is
where I want my water to leave I have a
small gate of value three of red values
here where I told the model my value can
leave through these pixels right that
was a bit confused and boring but what
does it do in real life I will run my
model again using this new data and
sorry I forgot to run it for 100
iteration and not one iteration and it
will uh compute that's why just a couple
of seconds and it will compute the flow
depths just for that reverse because
I've been inputting river um um
precipitation just here and monitoring
it forcing it to leave at the end of my
rivers and if I do that again with a
10-fold increase in precipitation rate
which will take again a couple of
seconds you can see that I can quickly
test different peak discharge for a
river reach and no need to compute it
for the entire landscape. This is what
we can see here. This is my last run
with a 50 uh cubic meter of water
inputting from the south and leaving
from the north. And same thing on the
left with 5 cubic meters. All right. Um
I have a few minutes left because I
probably spoke a bit too fast. So feel
free to contact me if you have any more
question or to contact me through topo
toolbox through the chat if you have
more question or through my email which
I will write right now on the screen and
I'm uh planning to really use uh graph
flood a lot more in in my current
research. So I'm planning to add more
and more features either in the CPU
version or the GPU version. For example,
everything I've been showing with the
wits, everything I've been showing with
comparing or mentioning comparing with
um the stream object information or
automating the convergence. It's
something I'm actively working on uh at
this time. So in the future pull
request, I will I will add a bit more
information. All right, I will stop my
rambling and give back the microphone to
uh to Volvong. Thanks a lot for
listening.
>> Thanks a lot, Boris. That was very
insightful and uh exciting to see where
graph flood has gotten to right quite a
and seeing it how quickly it evaluates
in a yeah for quite a I mean it was that
was not a very big DM but even for such
size DM it's amazing how fast um you get
a 2D water surface that's really great
uh perhaps one thing that I'd like to
add here um because you have uh you have
given in your mail address, which is
fine. When people want to contact you by
mail, that's good. But I would still
want to encourage you to, you know, to
to use the discussion uh yeah tools on
on git. Um because then everyone can
learn from these discussion also and and
see what's going on. Uh that's better
and more open and more fair um to our
research community. Okay. If I may just
add, it's also uh good because uh we're
not always available to answer and other
users might have an answer to your
question. U
so it's for the sake of time.
>> Exactly. There might be other users who
might actually be able to to answer and
we don't have to do that. That would be
a dream. [laughter]
[gasps] Okay. Um there are already a
couple of questions online. Uh but we
were saying that uh we will cover these
at the end right D.
>> Uh yes except maybe for the last uh
question here uh cuz Boris you have this
uh Jupiter notebook and I guess that you
will share it right?
>> Yeah definitely. Um I may need to chat
with VGO and Will to know if we share it
through the Gary in Topo toolbox or any
other way but it will be shared. Um
>> sure. Yeah, I think the gallery is the
preferred option nowadays. And so that
already answers one question. Okay,
thanks Wolf Gang. Back to you.
>> Cool. Okay, no, not back to
[clears throat] me. I'll pass directly
on to Bastion. Um, go ahead.
>> Thank you. So, we just share my screen.
Okay. Okay. So, hello everyone. So,
today we talk about transect.
So a toolbox I have developed within
topo toolbox environment and well so the
the aim of this toolbox was to uh try to
connect the different gemophilic
processes that are usually so analyzed
separately as a river profile is slopes
or flute plane and particularly to try
to to understand how these processes can
qu together across the landscape. And so
here I will just show you a few slides
explaining the main principle of this
toolbox and then I will run some life
coding to to shows the main application
we can make with translates. So the
motivation for developing this toolbox
come from my PhD work on the landscape
version of the V mountains and there
the the in this area. to the eastern
side of the massive is
geomorphologically very dynamic and
undergoing transient transient processes
as you can see here in this catchment
where we have so different waves of
migrating points and this is a
systematic signal we we can observe all
along the range and uh we can also
observe an adjustment of the east slopes
to this nickpot migration
with an increasing in slopes
just downstream the neck point. So at
this point we wanted to find a way to
quantify so this lateral adjustment of
the valley to the vertical incision of
the of the knee point and so starting
from this observation. Uh so we wanted
to build a tool that don't treat so the
river profile all the all the slopes as
separate objects but instead so transct
connect them by extracting matrix along
transexs that run from the channel to
the device. So the two box works into
two complimentary mode. uh we have the
geometric one that is based on minimal
distance that generates a
subperpendicular
uh transct all along. So a baseline can
be of any type. So here we choose the
trunk channel but in this mode so we can
observe that in curved ridges the the
transet can converge into one point
forming this type of fan structure. So
in this mode I've implemented an
algorithm that allowed me to spread
those fans in order to ensure a more
even coverage of the valley but also
some processes would be better linked
for the natural pathways of water or or
sediment and that's why so transact also
include the flow routting mode uh that
follows the the topographic gradient
that show better representation
of how material move through the
landscape. Okay. So once the transexs
are traced, so the next step is to
connect them to to other geomorphic uh
features. So for instance we can extract
fl plane with graph flood and connect
the the resulted
plane mask with the transact in order to
measure the the width or we can also
connect the transct with um the drainage
divide in order to capture the full
valley geometry. And so here's an
example of the type of output we can
have with transact. So in this case I
have run to the geometric mode and stop
the transect to the divide in order to
construct the valid geometry and
[snorts] from that we can extract all
type of information along the the
transct
illustrated here by the black lines. So
we can extract the value width value
height or the the e slope angles and uh
as all those transects are referenced
along a common baseline. So here's the
river we can relate all those valley
matrix to the fia matrix as here the
stiffness index but also to the flid. So
now I will run the demo to to bit show
you how we can collect this type of
information and how we can manipulate uh
through manipulate transact. So let's
share uh my MATLAB window. Okay. So for
this demo so uh I will surely made it
available to to put toolbox gallery in
the upcoming days but uh but well so
this demo will be run in the catchment
I've just showed you in the for montain
and it will be divided into two parts
each focusing in one chopic
domain. So the first one will be on the
valley geometry
uh and then we'll focus on flute planes
and particularly how we can relate to
the plane width extracted with craft
flood to flu matrix and is slope
gradient. So before starting so I have
just premputed some topbox objects in
order to save some some computing uh
time. So here has the premputed
object. So I have already prep-processed
the DM. I have already computed to the
flow objects the flow accumulation the
stream network and the drainage divide
and I have so the the weather head
resters that gives the MATLAB version of
graph. Uh okay so let's go with the
first part. So to reconstruct the valid
geometry from geometric transct. So the
first step here is to set a baseline a
baseline and for that I will use the
modify uh function of uh of to put a box
and I will select a ridge that uh uh
that I will uh from which I will trace
my transit. So okay so just close the
the the figure. So this is my selected
ridge and then I will do the same but to
select a portion of my trainage divide
that will set so the the outline of my
value. So the function works similarly
than the modify function of stream
object. Let's select this and this is so
we have our baseline and we have our val
outline and now before running transex
so we have to set two parameters so the
the width there will be that will
correspond to the length of the
transacts and the number of iteration uh
will make within transact so and to uh
and to estimate the width so instead of
choosing it manually we can estimate it
from the size of the Austream D basin.
So let's let's do it. So I will use uh
the the uh to put toolbox function D
basin in order to extract um the the
basin mask. So let's do that with uh the
outlet of my selected bridge and then I
will convert um this into a mask. So
doing logical z up. So this give us our
basin mask. Then we'll set the iteration
to three. So so basically the iteration
is to set how much intermediate outline.
So the transact we have to pass through
during the uh during the the tracing and
then I have so a small custom function
that is called max width that will um
determine so the the optimal width for
my transect run. Oh miss here and up. So
I have my W and I will display what I
obtain. So this is the gen the upstream
gen basin from the outlet of my selected
reach and we can observe that we have
here's the outline with that will take
into consideration to the entire genes
basing. So now we have everything to run
transact
that will just [clears throat] run. So I
just have to input the DM or selected
reach uh the width the number of
iteration and verbose to display um the
the progress. So if I don't work okay so
that's done. So now I will show you what
obtain.
So these are our row geometric transect.
So we just zoom a bit more to better
show the how the transact were traced.
Okay. So we have here so the the
transexs that are tra. So we can observe
that those transact doesn't cross uh
don't cross each other and they they
cover like the interior
areas that we considered and uh so here
are the number of iteration that
transact with trace. So more iteration
input more it will respect the the
baseline geometry
uh as if you only take like one uh one
iteration and to have a tendency to to
smooth as the baseline geometry. So once
we have traced our transex so the next
step will be to connect them with our uh
basin not line. So let's do that and ah
yes and we can enforce the structure of
transect so it's a class object as we
can have with grid object etc uh that
give different uh information
where we have so our base more the
information of of the baseline so the
coordinate or if it's a stream object or
divide object etc. The con will are the
the path that just run from the baseline
to the uh intermediate outline. So in
this case they just pass with with four
nodes and int there are the interpolated
path where we have so all the nodes all
the pixel between the uh the different
outline. So now we want to pair those
geometric uh transact with a selected
divide. So for that just I have to call
a function called pairing where I will
input my transect and my selected divide
object and I will extract the stats that
calculate
um the width the eight and the and the
the slope along those transects. So it
should took [clears throat]
a few seconds. Okay. So note let's
display our results. So now we can
observe that we we have our our
transacts that efficiently stopped as
the trans divide. So the transact only
extract matrix within the the valley
boundary. Okay. And the next step will
be to try to look as well to the foot
plane width. So for that I already
computed
so graph water 8
water hat restor. So I've used the
MATLAB version of CL flood and to
extract a mask. Uh so me I've used more
direct
method than than BIS but I think uh it
was a good way to to maybe show the F
domain as you showcase BIS. But uh well
in this demonstration we just set a
simple threshold above which we consider
it to be a full plane cells. So here we
have our um our plane mask if we can
zoom. So it's quite well it's more try
and error to to set the the good uh
threshold but we can observe that it
doesn't go very it doesn't go to the his
slopes and cover well the
uh the fruit plane and now we do the the
same uh we call the same function uh
where we pair so our transect with the
footpen mask and we extract the stats in
order to obtain the width of the
footprint. Okay. So now let's see the
results. So now we have our transect
that stops
efficiently on to the to the foot plane
mask. So basically stops until it
encounters a false value in the in the
foot plane mask. So now we have
everything for this first part and uh so
we'll we try to to to trace so along our
selected reach all the value matrix and
the plane width. So I've just premputed
the stiffness index of the baseline
here. We not enter to the detail of the
plot but it's quite straightforward. And
so this is the type of result we can
obtain from this analysis where we have
so different metrics that are plotted
along the selected reach that is here
the the trunk channel that I've colored
based on its stiffness index. Uh so here
in the upper left you can see the two
elevation of the of the drain divide. So
I think red is the left side looking
upstream and the blue color is the red
right side. So we can also extract the
his slope angle. So in the same
principle here you have the the two
sides in black you have the mean value
between the two side. Then we can
estimate the valley configment by doing
the valley width divided by the the
valley height and uh we can also extract
the footprint width along the the the
channel. Uh so here we can observe um a
global trend between all those uh
landforms where we have a
less slightly steepening of the east
slopes uh higher confined valley and an
foot plane towards the neck point uh
that showcase this um this river. And
well we can also observe here that um
that the foot planes varies from uh for
almost three orders of magnitude from
few t of mters to almost 1 kilometer. So
we make an interesting case and to
compare it to to fluial matrix and is
gradient to see how this range of len
evolve uh with those matrix and for the
gradient. So in this part instead of
extracting it geometrically I would do
it along so the the flow path so to
which is which are more possible pathway
for sediment transfer from isoprop to
channel. So this mode is more
straightforward than the geometric mode
as um you I have to put them
[clears throat] the selected reach as we
don't need to select to define a width
or an iteration as it will simply
compute the flow object from to put a
box and follow it. So method flow and go
to true to show. So it's much faster
than the geometric mode. Okay. And let's
plot the results. So here we have so so
a flow path that is uh so extracted. So
from each uh baseline nodes and here so
the the dot correspond to the to the end
of those those flow of those flow path
that correspond to the valley head. But
as we don't want to extract matrix all
along the basin outline now we'll pair
those flow path to the first
basin outline note say encounter so we
take so tsl so we pair
our new flow path transect with our
selected t then we extract the stats
among them they
is done. We know our flow pass stops as
the first train activate the encounter
and um now we can extract the esop
gradient along each of those flow. Uh
okay so now I will just um extract some
previous metrics I want to relate with
my flu plane width. So firstly I will
extract some my free plan that
correspond to the to the
to the stats
of my um TF transect then I will extract
my train area along my uh my select
reach. So it's get null
uh message reach and my full
accumulation
grid that I've already computed that we
will multiply by my cell size of my DM
to in order to get train area and uh
although there's a small specificity to
this version of transct is because uh
well I have to to do some premputation
of my baseline. So, so the baseline of
my transact is not is not exactly the
the stream object I've inputed. I may
have some notes that are deleted, but uh
you can refine. So, this uh arrays that
allow me to reconnect to the baseline of
the transact to the stream object I have
input uh in my transact
uh run. So, this give us my trainage
area. Then I can uh extract my rever
gradient like so. So in the same way I
extract like connect them to the
original stream object and then I have a
case that correspond to so the case. So
we just recmp computed here. I will put
the concavity of the open 45 which is
standard uh smoothing factor and I will
link it back to uh oh no I don't need
strictly to the uh stream object and I
will uh extract my uh I have to base
and uh the last one will be my slow
gradient where I will directly use so
this flow based transact I call ths and
for that so I take the the mean value of
the slope of both sides of my uh
transact object
okay I just run that and now I can plot
the the result so pw plot is just a
custom function I've made to to make
this polo fit
with so average bins beans average. Uh
so here I will not enter.
So here I will not enter in too much
details to the interpretation of the
this results but uh basically these two
application I was to show how can we uh
provide so interconnected analysis along
unified framework that is transact
and we observed here also in this simple
case how they they can co-eolve together
in the case of catch ment that is
undergoing
strong adjustment to Nickpoint
migration. So thank you. I've done for
my part and now I will let we'll hand
over to Will I think. So yeah, thank
you.
>> Well, thank you um Bastian. That's a a
really nice example that shows you know
how to to use all the different tools
that are available like graph divide
object. So divide object is one that we
haven't mentioned so far but is which is
also you know part of the toba toolbox
distribution um and then build your own
tools basically and and transact
basically builds on this and adds new
stuff and so I guess you know if you
have done that and you are at a point
where you need to decide is it something
that I want to contribute to the
community is it something you know that
other people might well value well you
use in their own studies Uh, of course
that also entails a little bit of work.
We can discuss that later on. Um, but
before we go on to the discussion and
once again I I want to encourage you if
you have questions ask them in the in
the chat. um to Bastiana to Boris to us
um and so but before we do that um well
let's go on uh with the next talk by by
Will who will show the workflow that you
know Bastion might encounter now once he
wants to contribute and and make
transact available to everyone. So over
to you Will.
>> Uh yes hello everyone again. Um so I
will start I think by sharing my screen
uh screen and start with um a slide
that's from the beginning. Let me go to
the correct slide here.
Okay. Um so I mentioned this kind of a
little bit briefly at the end of uh
yesterday's webinar but um you know that
we really want people to um think of Top
of Toolbox as a a sorry um all right
think of Topa Toolbox as a a community
project um and one that's driven by the
the needs of the community and that
community members can actively
participate in. Um so we really want to
get you know feedback from you all about
what kinds of things you want to see in
top of toolbox you know how you like it
um to participate in different ways. We
have a few different um ways listed here
that are good ways to get started
contributing um and you know I kind of
walk through these a little bit um here.
So um I I've included some links as well
here uh that you can visit but I'll I'll
show off these different websites here
um now. So hopefully you all can see my
uh web browser here. So this is the uh
topa toolbox um organization page on
GitHub. So we have a a GitHub
organization now that coordinates all of
the development of topa toolbox packages
since we now have the mat lab package.
We have the Python package. We have lib
topa toolbox. We have our R package and
many other things. We we need all a
centralized place to put all of that
stuff. So that's in the top of Toolbox
organization. It's github.com/top
toolbox. Um and you can find links to
all of the other resources. Um from
there, though it's a little um can be a
little intimidating to navigate at
first. Um we do also have a website. Um
the link to it is here on the
organization page top ofolbox.github.io
um which you can visit and um this is
mostly again links to other um
resources. So we can you can visit the
mat lab repository the python
documentation which has its own website.
There's a link to the gallery which I'll
go into in more detail um later. And
there are some contribution guidelines
here which um provide kind of highle
overview of how you might go about um
contributing code to top toolbox. Um so
I'll show that here. This is the um the
contribution guidelines. So it explains
kind of how we work through GitHub in
the top of toolbox organization
um and goes into more detail about what
kinds of things are in the different
repositories um as well. Um so the um
>> right um I think the we'll start off
from perhaps the easiest way to get
started uh contributing to top toolbox
is through our discussion forum which
again I mentioned yesterday. Um that
again is accessible from our
organization page. You can go over to
the the right side here and view the
discussions and we have some you know
discussion topics. Um, this has not been
particularly active, but we're trying to
encourage this as a place to to start
having conversations about Topa Toolbox.
Um, we'd really encourage you
particularly to introduce yourself in
this thread um so we can learn more
about um our audience here and what you
guys are working on and um what kinds of
things you're interested in um as well.
So, I encourage you to go check that out
um and you know, feel free to add a
reply to this thread there. But if you
have any any general questions about top
of toolbox about the um I would say you
know maybe like the more scientific
questions about you know how do I use
this to do a particular analysis that
I'm interested in this is a really good
place for that. Um if you have uh more
specific questions um or problems that
you've encountered using the software,
we have um the uh individual software
repositories. Um and there are a bunch
of these in um the top of Toolbox
organization. Um but you'll see the top
toolbox 3 here is the mat lab package
for the third version of topa toolbox.
We have pi topa toolbox our python
package lib topa toolbox our C library
and and a few others. Um but if I go to
say the Pytopa Toolbox repository here
um we'll see as with all um GitHub
repositories uh you can find issues and
this is where you can report u problems
that you run into with Top of Toolbox.
So um go to that issues tab. If you
click new issue you'll be given a little
form. You can say you know I've run into
this problem running this function. It
didn't behave the way I expected or I
hit an error. um and one of us will uh
get back to you uh ide pretty quickly
and and try and sort out your problem
there. Um we also use the issues as um
kind of public to-do list. So um if you
are looking for ways to contribute to
top toolbox, feel free to feel free to
scroll through these issues and see what
kinds of things we um could possibly
need help with. You know there are some
functions we have these help wanted tags
which are used more in some other
repositories than in um this pytopa
toolbox one for instance but um for
instance we have uh let's say the grid
object inpaint nanss function so this is
a function that exists in the mat lab
version that we need um for some example
uh things I'll talk about that a little
bit later as well um but it's a a
function that exists in mat lab that we
would like to maybe at some point
include in pyop toolbox so if that
interests you, um, you know, you are
totally welcome to, um, you know, take a
crack at some of these issues as well.
Uh, but like I said, uh, this is a good
way to communicate for bug reports, u
problems, feature requests, if there's
something that you really are interested
in seeing in any of our repositories.
Um, uh, communicate through the issues
is a great way to do that. Um and don't
worry too much about opening issues on
the wrong repository or something. If
you uh you know have a Python question
or Python issue that you open the issue
on the mat lab repository, we'll sort
that out and uh we can move that around.
So so you know it's better to get in
touch with us um through any means
possible than to uh worry too much about
making sure you're in the right place to
to do that. If you ask a software
question in the discussions, that's
totally fine as well. Um,
so yeah, those are the kind of the the
easy ways to um get in touch with us.
Uh, the next thing that I want to share,
we've talked about this a few times, we
mentioned it several um, examples, the
Tapa Toolbox gallery um that we've
established to share examples of using
Topa Toolbox. So um you can find here um
mat lab live scripts and jupyter
notebooks that implement various
examples. Um the front page just kind of
has a list of all of them. Um you can
also sort by python and mat lab using
the the um tabs at the top. But for
instance you can find the um the ran
plateau nickpoints example that we
discussed yesterday in mat lab there.
The python one is down here. Um you can
find the uh graph flood a graphite
example that Boris implemented here. Um
so yes uh this is a great way to get get
started contributing. So if you've done
something with topo toolbox and you
would like to contribute it to the
gallery um that's a great way we can you
know share that example with the
community um get uh it in front of other
users of top toolbox who might be
interested in what you've done. Um, and
really all you have to do is create a
live script um, if you're using mat lab
or in Jupyter notebook if you're using
Python and um, submit that to us. Um, if
you're uh, we'll talk a little bit about
the the pull request workflow through
GitHub that we use to um, uh, update our
code. Uh, you can make a poll request to
the top toolbox gallery repository which
is this one here. Um, but if uh you're
not a confident Git user yet um and you
have a G you want to share with us, you
can email us a live script and we'll um
sort out how to put it on the gallery.
Um and we'd really like to see more
examples from the community. Um we have
mostly the examples there are things
that we've created um to demonstrate
various aspects of top toolbox, but we
really want to see what you guys are
doing with top toolbox. So um you know
don't worry if it's uh you know not not
the most sophisticated or cutting edge
example you know um it could definitely
be helpful to someone just to getting
started um uh using the software to see
what other people are doing there. Um so
the uh if if you are motivated to
contribute code to Tupper toolbox now um
we have a workflow which I as I said is
is documented in the contribution
guidelines here um in our contributing
via pull requests here. Uh this is is a
pretty standard workflow for using git
and GitHub. So um if you're familiar
with that from another project then uh
it it should be pretty um uh familiar in
the top of toolbox context. Um if you're
not familiar with git and github there
are plenty of great resources online. I
think there's some there links at the
beginning here to the github
documentation and this um
git uh tutorial from organization called
the touring way that's very good um for
getting started with git and github. Um,
and you're totally welcome to ask me um
questions about using Git and
interacting with us um via GitHub if uh
you're running into problems um in any
way. Um but uh the basic idea is that
you would go to say uh let's go to the
Pytopa toolbox repository. Um so this is
topa toolbox/pytopa toolbox um which is
the the main organization repository.
you uh don't have permission to change
anything in the official repository. Um
that can only be done by one of the um
uh maintainers of the organization. So
don't worry about messing anything up.
Uh there's no way you can mess up
anything um for other users. Uh if
you're just experimenting or something
um or you know you're new to get git and
um you're afraid that you're gonna uh
you know delete someone's code, it's not
going to be possible to do that. Um
there's checks in place to make sure
that um that kind of thing uh doesn't
happen. But so we're in the top of
toolbox repository. You would fork this
repository using this little fork
button. Um assuming you have a GitHub
account account here. Um and in fork it
pops up this little um window to create
a new fork. I already have a fork of um
Pytopa Toolbox. So I'm not going to be
able to do that. But we can go visit my
fork here.
And my fork is just a copy of uh Pytopa
toolbox that I keep for myself. Um and
on GitHub um and so then what I have
done is um uh once you've forked it the
the best thing to do then is to obtain
this copy of Pytoper Toolbox or
whichever repository you're using the
source code on your computer. Um so you
can go to this little code window here.
Um and it provides you various options
for the URLs for downloading the um the
code from your fork. Um so uh you can
use that. So um for instance, I would go
copy this SSH line here and then um oh
I'm going to need to open a new
terminal. um terminal uh and then I you
know uh you can run a git command get
clone and use that um URL to get your uh
copy of Pytopa to Toolbox. Um so now I'm
I'm in the Pyopa Toolbox repository. Um
you know I'm using Linux here. things
may be slightly different if you're
working on um a Mac or Windows machine,
but um I'm in Pytopa to Toolbox and you
can see uh yeah, I have a this main
branch. Um I I'm not going to go into
like a full git tutorial here because
it's going to take too long. But um uh
basically now I have a copy of Py to
Toolbox on my computer. Um, I have all
of our code. Um, you know, it'll take
some familiarizing with the repository
structure. The code for Python package
is in the source uh directory. We also
have tests in our test directory. Um,
and docs in the docks directory. So, um,
we could go visit our source and pop up
toolbox here. And you can see we have a
file for each of our objects. Basically
we have the flow object, the stream
object, the grid object um and then some
the graph object and uh graphled
functions um as well and then some other
auxiliary functions there. So you make a
change to one of these files and then um
uh you commit that change in git
parlance, push that change to GitHub um
which again you know if you're not
familiar with these terms you'll learn
as you get used to GitHub and then we
make a pull request to the um original
repository. So again um in the interest
of time I'm not going to do that but I
will show you uh some of the poll
requests that we've had. Um,
so, uh, as you can see, most of these
are from me, um, as I've been doing
things recently to clean stuff up for
our webinar. Um, but, uh, we, the poll
request is just a request to, uh,
contribute your changes from your, uh,
repository into Tupper toolbox. Um, so,
you know, I give a little description of
what's in here and, um, we see uh,
what's going on. the uh when you
contribute the the pull request, it'll
it'll run these um tests automatically
um here. So there a bunch of tests in
each repository that check to make sure
that the the software is working
correctly. Um and you want all of these
to be green um before uh we merge your
contribution into the main um
repository. And so, um, I will work with
you if you know you run into errors to
figure out what's wrong with what you've
got and, um, make sure that everything
looks good. And then we merge that pull
request. Um, this has been merged. And
now this, in this case, this the row hat
function for our PPS um, object which
I've recently been implementing is now
available in Pytopo Toolbox. Um, so, uh,
yes, like I said, this is a a relatively
standard way of contributing, um, via
pull requests on GitHub. So, a lot of
the tutorials that you find out there
for, um, you know, how to contribute to
open source software projects um, will
apply in this case. Um, I don't expect
you to, you know, be able to do this
from this description that I've just
given to you. Um, but that's, uh, um,
you know, as I said, let me know if you
run into any trouble with this this
process. Um we really want to make sure
that everybody who wants to can
contribute code if they wish. Um as I
said uh you know if you're looking for a
project you can check the issues um in
the different repositories. This is the
pi topa toolbox one. I'll show you. I
know lib topa toolbox has a fair number
of um to-dos in its issue page. Um so if
you're a confident C programmer um we'd
love to have some contributions here for
um different functions that uh could
benefit from the libtop toolbox
implementation there. Um so yes that is
the code contribution process um for
code to uh that you want to contribute
to a topa toolbox package. Um if on the
other hand you're um developing
something that maybe is a bit more
specialized or that integrates a bunch
of different packages together um there
you might want to keep that code in a
separate um package from the main PI top
of toolbox. You know I think if you if
you can narrow your implementation down
to a single function or something that
would be a good candidate for inclusion
in one of the top toolbox packages. if
you have a bunch of different functions
or some additional data structures and
in particular if you depend on other
packages if you're interfacing between
top of toolbox and something else um it
might be a good idea to maintain a
separate package for your software um
and we have a few examples of that um
here we just saw Bastion's transsect um
demo which I think I opened um here but
yeah so uh Bastion has this the transect
code um in its own git repository on on
GitHub um that he maintains. Um we also
uh we are happy to host packages through
the top of toolbox organization. Um if
you like the a good example of this is
the bankful mapper which I think wolffko
mentioned a few times yesterday
contributed by Michaela deiaro. Um and
so this is it again its own mat lab
toolbox. Um and we have it set up uh so
that it works with our um systems.
there's a release uh mechanism so we can
make releases of the toolbox for
instance um that people can download um
and so if if you uh you know would like
to include packages in the topics
organization we are happy to um uh and
you know talk to us about that and we
can um discuss um that the benefit of
that is mostly that um you know maybe
more people can find it um because it's
going through our um as available on our
organization page and you know we can
work with you to set up some things like
the automated release process um for
example uh but you don't have to if you
if you want to maintain your own GitHub
repository that contains code and just
links to the top of toolbox packages
that's totally fine as well that's a
great way to do it in that case we'd
still love to know about it you know get
in touch um through the discussions or
you know submit an example to the top
ofbox gallery um those all sound great
uh those would all be great ways to um
you know help inform us and ultimately
the topics community about what you are
doing. Um so uh with that I think I'll
um you know end my little discussion of
the contribution workflow there. Like I
said get in touch if you have any
questions um and yeah we hope to see you
in our various um you know spaces uh in
the near future.
>> Okay great. Thank you, William.
Um, I think we transition over now to
the discussion uh part of this session
and we have a couple of questions that
were posed through the chat. Um, and I
have put them here in a separate sheet
for myself so I can overlook them. And
these relate to either graph flood to
the transact software or they are more
general in questions. And I would now go
through some of these questions or
basically all of them. And then since
there are not that many uh I also added
some questions that we think are
interesting for either you guys or for
potential um people that would later on
uh look at the recording of this when
they want to get involved. So one
question was uh could and I start with
graphlut could graph be used useful for
investigating how topographic
perturbations such as those associated
with falting influence river hydraulics
and channel adjustment. So a relatively
general question to you Boris.
>> Um thanks a lot for the question. Yeah
uh it can basically that was one of the
idea of developing graph flood. We know
that when you have a fault or a
perturbation, you change the slope of
your river but also the width or
eventually the shear stress or the
things like that and graph is there to
measure them. Uh so if you think the
width of your river has been affected by
the fault or any other perturbations
then you can measure it with graphlet.
>> Great. Maybe uh I continue with a
question that goes in a similar
direction asking whether graph flood
could be used in an inverse modeling
framework where observed valley geometry
is used to constrain the shear stress
distribution and erosion parameters
needed to reproduce the modern
landscape. More specifically, could this
approach help to calibrate stream power
model parameters and explain spatial
variations in incision rates that are
not captured by channel steepness alone?
Yeah. So, um it will require a bit of
work uh because you would you could
consider making it for example a a
landscape evolution model by using graph
flood calculating share stress and using
it to apply erosion and so on. But it's
a bit more work because there's um there
are there's a difference between
describing the field of sheer stress we
have on on a landscape. That's very
first order. You just need to think
about precipitation rate and friction
and so on. But converting that share
stress into erosion or sediment
transport is a bit more difficult
because you need to assume some
information for example about grain size
about how you transfer uh this chest
stress into incision is my incision
linked to um sediment abrasion is my
incision linked to plucking and so on.
So it is definitely possible but I would
say that graph flood in that case is
just the first step and then you can use
it with whichever the physical law to to
invert.
>> Okay cool. Yeah, I guess the speed of
the calculations make it suitable for
inversion schemes in general. And when
you say that you're developing something
based on GPUs that would be even uh
favorable more more favorable for that.
>> That's one of the idea.
>> Exactly. So you had uh Wolfkang had a
question how to choose a suitable value
for the time step in graph flood and how
does it depend on cell size of your DM?
>> So theoretically it's linked to what we
call the CFL conditions the Kuran
Fredish levy conditions. It's a physical
way that say that if your velocity
uh of your floor for a given pixel is
too fast and if it can goes in one time
step belong the size of your um of your
pixel the model will be unstable. So
basically there's a physical way to
calculate the maximum stable time step.
uh it's a flow velocity divided by uh dx
or something like that and it works
relatively well for graph flood but
because we decouple the physical flow
from the propagation of drench area it's
not the ultimate answer so long story
short trial and errors is the best way
uh to get the best time step for your
given landscape
>> okay as often the other question I have
down here is are there plans to use
graphlut in a landscape evolution model
>> there are plans uh there were plans a
lot before when I started to develop
graphlet it's tricky that's uh the main
issue it's tricky because um our flow
adapts instantly to any change of uh of
sheer stress of erosion so you quickly
start to develop some over steepening
and once you have an over steeping
steepening you destabilize the model you
converge of all your flow and everything
crashes so Why did I ported graphlet to
GPU and to gain more speed? It's one of
the main reason is to try and create a
landscape evolution model. So hopefully
it will come as soon as possible. But uh
yeah, if you have some ideas, if you if
you want to develop your your landscape
evolution model using graph as an
hydraulic uh uh engine, you're more than
welcome to to try and contact me and
share your results if you manage to do
it. So hopefully as soon as possible.
>> Okay, good. Well, thanks Boris. Um, uh,
I will now transition over to some
questions related to transact. Also, one
that involves transact and graph flood
and, uh, but it's possible to continue
asking questions via the chat even those
that address graphlet. So, there was one
question um, relating is there a
specific threshold used to identify
channel width? Uh, I imagine the result
highly depends on DEM resolution, but is
there a recommended minimum resolution
or grid size needed to obtain reliable
channel width estimates?
>> Okay. Uh, Bastian, I don't know if you
have a
>> you would be better to to answer this
question. So what I've been observing
but it's an empirical observation on the
the site I've been studying with graph
is that you need at least three four
five pixel wide channel to get a
relevant uh width calculation below that
uh you start to see a lot of artifacts
um so or or like you start to measure
channel that don't really exist or are
sub pixel so basically if you are
interested in a very big river like the
Danube tube you can get a 25 m 10 m DM
and you will still get a reasonable
estimate of of the width because the
river itself is like 50 m 100 200 m wide
but if you are in the Alps and you are
you you are looking at small river small
stream it's better to have a metric
resolution
>> it depend on the object you're trying to
measure I'd say that below two pixels
you definitely get nothing below four
pixels you get a lot of noise and once
Once you you reach four five pixels of
uh of of channel width um you're good to
measure it continuously.
>> Yeah. Yeah. Makes sense. I mean it
depends always on the on the wavelength
of a landform that we are interested in
and channels are typically wavelengths
of tens [snorts] of meters or whatever.
Okay. The other question transact is not
yet available as a repository in the
tupo toolbox git organization. Will it
become available?
>> Uh [clears throat] yeah sure. So yes the
toolbox is still in development. I
didn't give so much thought to how to
share it but if it's better for the
community to share directly to put
toolbox I think can be a great idea.
>> Okay that's that's good to hear.
>> Yeah perhaps adding to that uh I I
didn't look at the repository before but
I've seen that now that it's available
via git. Um so there are some uh you
know special ways to to wrap your code
into a toolbox um which is provided by
by Melbourne. You can have a look at the
bankful mapper for example um which
where we have also done that uh to make
it compatible and it in [clears throat]
the end it enables uh actually that it's
shared also on the file exchange so
[clears throat] it's better visible to
the MATLAB community. On the other hand,
uh you can just download it as a toolbox
and it will you know you can install it
by doing that and it will even install
requirements and in that case these
requirements would be top of toolbox. So
it's everything is you know handled
automatically and the user doesn't need
to uh care about any dependencies and
and stuff like that.
>> Perfect. Um Bastian uh question I have
how long did it take you to develop
transact? Uh well I started in the start
of my PhD so maybe four years uh ago but
basically um I've learned how to code in
MATLAB and developing this uh this
toolbox so it was a great way and to put
to box it's very good environment to to
start to be involved in coding but it
was a continuous development with my
skills also in coding but I would say
all during all my PhD so four years.
>> Okay. But not entirely just the
development. You also did research with
the right.
>> Yeah, it was a project. It evolved also
with my PhD funings. So what I needed
during my PhD. So yeah, it was great uh
a great uh hike.
>> Excellent. Uh also question from my
side. Do the transact functions that you
have developed also contain help text
that explain their behavior as well as
easily executed examples to play around
with the functionality as we know it
from the toolbox functions.
[clears throat]
>> Yes. So I'm almost done with all the
documentation as a function. So with
text and syntaxes examples uh all I need
maybe is to to some notebooks like to to
have some application. But yeah, boy, I
always have to to improve the the
documentation, but uh the majority is
done.
>> Okay, great. Thank you. Thanks for
contributing. Uh now I have a couple of
more general questions and um one user
asked which Pytopo toolbox metrics are
most useful for identifying tectonic
controls on river geometry and
longitudinal profiles. I guess that
addresses the question of which Pytopo
toolbox metrics exist at the moment.
William, you're muted. What do you
>> Yeah. So, um [clears throat]
um the basically the the metrics that we
have um I'm kind of scrolling through
them at the moment that uh you can
compute. We uh saw yesterday you can do
uh kai analysis with um pitopa toolbox.
All of that stuff works um as well as it
does in mat lab more or less. We have um
also the ksn computation um which you
can use. uh we don't have a lot of
examples using that in Python yet but
it's uh fairly straightforward. Um we
have all of the channel um the stream
profile smoothing stuff as well which
can be useful when um doing those kind
of analyses. Um so I'd say those are
kind of the main main like metrics that
we have that you can compute.
>> The point the pattern the point patterns
on streams is not yet included. Correct.
>> Well so it it is it is as of um
yesterday. Um so the I I included a few
because I was trying to make um the
Python uh version of the nickpoint
analysis that Wolfcoin presented
yesterday. Um so there there's a little
bit of the the the PPS stuff that's um
exists in Python now um as a result of
that effort. Um so it that's nowhere
near um kind of feature complete with
mat lab and I think we're going to uh
pursue a slightly different um
trajectory there because of how it can
interface with the python kind of
statistical ecosystem. Um but that's
that's uh you know in progress if that's
something that people are interested in
especially that is a good place to get
started contributing as well because it
could use some work
>> right maybe another question along those
lines a little bit um uh and that is
asking you know there are matlab and
python versions and you know one could
think of that the target is to produce a
python version which is a onetoone copy
of the matlab version. Um, is that the
goal? And if not, because maybe the the
environments in Python and MATLAB have
uh strengths and weaknesses that could
uh lead in different directions. What
maybe um features uh are you know what
are better done in Python uh or in
MATLAB or is is it all the same or
something?
>> Yeah. So I think the um uh we have so
far implemented pytopa toolbox largely
by um taking functionality that's
available in mat lab and trying to make
it available in python. Um that's partly
because that's uh you know what we know
people want is the stuff that people use
in mat lab's top of toolbox. Um we're
not however committed to
uh the two packages being identical
forever. um you know if people want to
see functionality um that's better
expressed in Python or you know people
the graph flood stuff is maybe a good
example where um because Boris is a
Python user a lot of that stuff hits
Python first and um so it'll uh take um
you know some now we need to kind of go
the other direction if we want to make
that stuff available in mat lab um so
you know I can envision that for other
tools as well if someone says you know
we want to do this particular analysis
this and um you know I want to implement
it but I'm a python user that might show
up in pytopa toolbox and not be
available in mat lab. Um the same is
true of course for um future
developments of the mat lab type of
toolbox um as well. Um I would say the
the uh one thing that's very different
between the two platforms is kind of the
um the the way in which they manage the
ecosystems a little bit. I'd say um you
know mat lab you're kind of expecting
mat lab the platform to provide a lot of
stuff for you. So for instance like
machine learning algorithm statistics um
you know like a GPU um framework um that
comes from mat lab basically and so
we're able to use that um kind of stuff
when it's available in mat lab um when
it uh arrives in the the the versions
that we have um in python a lot of that
stuff is developed in in separate
libraries by people so you know we
depend on a few um kind of core
libraries for doing some of these
things. Um, but there's lots of other
thing libraries available. Boris has
been doing a lot of work on um his GPU
stuff for instance um that uses other
libraries and um packages as well to do
that kind of thing. the PPS as I said
like um I think my goal for the Python
implementation of the PPS is not to
provide so many uh functions for fitting
models to the PPS um data within Pytopa
toolbox but to provide the functionality
that allows you to connect that to the
statistical packages um available in
Python. And I think a similar approach,
you know, if the R package got further
developed, that would also be a a
similar approach there because there's a
lot of tools available in R to do more
complicated um statistical analysis. Um
that we don't want to just, you know,
replicate all of that functionality
within Pytopa toolbox. We want to let
people use the tools that they're used
to in the languages that they use to do
that kind of analysis.
>> Cool. Uh along those lines, I don't know
if we covered that point yesterday. Um
but there is a link to QGIS right of
>> this is something that we um we're very
interested in. Um we have a QGIS plugin
um that has been created uh by one of
our students um Teao uh and it works.
You can load it into QGIS and start
using QGIS data to do um certain
analyses. it's not um very fully fleshed
out and for instance it's also not
available through the the plug-in
manager. So it requires kind of manually
installing it at the moment in QGIS. But
that's something we're definitely
interested in is um you know because we
now have this Python version um and QGIS
plugins kind of um you can write Python
plugins for QGIS pretty easily. So um
you know that's an opportunity as well
for um you know other users, people who
are QGIS users. um and interested in
using Tupper toolbox um to get involved
in in trying to flush that out a little
bit um more because I think that'd be a
really good um good integration where
you know you can you get all the the
power of a GIS system but you can access
some of these more advanced um
topographic analysis tools that top
toolbox provides.
>> Right. Yeah. And now I think this is the
right way to ask another question I had
in mind or maybe some others have in
mind but haven't dared to ask them yet
because there's so many opportunities to
contribute and to write functions and
functionalities in Python and MATLAB and
R and for QGIS and this and that. It's a
lot of work. So um how useful uh are
chat GPT and related AI to convert
MATLAB functions into Python functions
for example? Um that's a good question
and one that I have not really
experimented too much with. Um you know
I think that uh we definitely
uh you know if people if people are able
to get good results doing that like
we're we're happy to take contributions.
I know Boris has been using some um uh
coding agent kind of stuff to do some of
his work um and that has proved um you
know moderately successful I think. So,
um, you know, have at it. I' be curious
to see what people are able to to
produce. Um, I don't know if Boris has
more he wants to say about how that
experience goes.
>> Yeah. Um, so when it started to come
out, I used it a lot cuz, you know, it
was new and everything. Um, now I have a
bit of experience with it. It's I'm
definitely not an expert and it's
definitely not my main tool. you it can
produce results uh but you still need to
control a minimum what you're doing
otherwise it quickly explode into a
gigantic pile of code um that becomes
unmaintainable but if you manage to save
time with it which I did on some
occasions and definitely lost a lot of
time on other occasions when I tried to
damage control um can be good so I'm not
an expert in agent coding especially
because it's becoming way too expensive
for my academic salary. But if you're
it's a tool, so if you manage to to to
control it, it's nice. If you want to
see a nice example of uh uh the mess,
but also the time it can save, you can
check the an old pull request we I did
for the swath tool in Lipto toolbox. Um,
in two words for the story, I needed a
swath tool to be as like I really needed
them quick for a specific project. So I
coded them with a nigantic um with
clothes if you if you must know and the
pull request was was really a mess. So I
could use the result but then it it
required like probably I don't know a
few days of accumulated time to make it
um good quality enough for for for to
box. Okay,
>> this this is a story. You do whatever
you want with with that result. But long
story short, it's not a magic box. Yeah,
it's it's good, but you need to know
what you're doing.
>> Okay, I think we covered that topic.
Now, uh I have two more things that I
would like to uh address. And one is
assume that I do have some tools
available uh that I think might be
useful for the community, you know,
either Matlab, Python or whatever. and
then I would like to contribute them but
I need some help to integrate them into
the existing architecture and maybe I
was also I'm not so an expert on GitHub
and so on. Is it possible to get to
receive help in order to contribute and
who should I contact?
>> Yeah, so that is um essentially my job
as a research software engineer um
working with top toolbox is you know to
help you all uh sort out how to do that
um kind of thing. So yeah, you know, get
in touch with me. Uh um uh I don't know
if my email has been posted somewhere um
that people can access, but uh you can
certainly get in touch through any of
the GitHub um platforms. Um if you're
able to do that, uh shoot me an email. I
think my email is actually in the
contribution guidelines.
>> Yeah, I think you're also as a first
author of the 2.23.
>> Yes, indeed. So my my my email is there.
You can find my email somewhere. Um
>> perfect. and you know let uh shoot me an
email and tell me what you're trying to
do and I will help you figure that out.
Um you know I'm happy to walk through
using git with you or u to help you you
know edit some code or something um
whatever you offer. Thanks. Um, there's
also the question [laughter] that was
coming from Wolf Gang I guess. Should we
still use the comment function on the TT
or Tupo to Toolbox blog or do you prefer
users to use the Git discussion forum?
Wolgang, tell me your opinion.
[laughter]
>> Tell me your opinion about your own
question. Yeah,
>> u, yeah, a lot of people still, or not
only still, I wouldn't say that, but use
the top toolbox. um and it has a comment
function um and people ask question
there. So uh the frequency at which I
get questions you know vise uh it could
be at one to two sometimes three per
week. Um so it's good to see that uh
people visit the the blog and use it as
a resource. Um and I like to keep it
like that. Um as long as we have not
completely switched over to uh let's say
a solution that works better. Um I think
the discussion forum uh on git works
better um or is better. But as you can
see and as we we have seen from you know
our attempt yesterday also to to
instigate you to um to use it. still not
like in the day-to-day uh or it's git is
not like the day-to-day tool for for
many of you. That's my you know what I
perhaps take from that. Um and so please
use the the topper toolbox comment
function you know in in in the on the
blog uh if you like if you want to you
know if you want to make your question
more visible also to others u and easier
to link basically to perhaps existing uh
solutions that are available on the
gallery and stuff like this then please
uh don't hesitate to use the discussion
forum on the top toolbox GitHub
count. So now we're running like both in
parallel. Um but the other thing is the
blog it's basically just me who's
reading that um or um you know looking
at the who has admin rights and so I can
just uh um work on on this. You are more
likely to get a quick reply when you use
the discussion on git. And I should I'd
also maybe like to say um that you know
if if anyone has better ideas for like
communication channels that they would
like to hear or discuss top of toolbox
over you know what kinds of things you
know would be helpful. We kind of have
an abortive discord server that we tried
once but that never really took off
because we the developers didn't really
use it but if that's something that
people are really interested in you know
we can start that up again. um you know
if an email list would be really useful
um you know let us know what ways you
would like to engage with the project
because we can make those happen um and
uh you know we're not we're not 100%
committed to using the GitHub
discussions for everything um if another
platform would be more effective um for
people to um participate.
>> Yeah. [snorts] Yeah. Good point.
Although I think that uh in the interest
of also uh time and efficiency, it's
also useful to maybe pick one and then
stick to that rather than distributing
to too many uh because it also requires
time to invest in maintaining these
>> but that can change and then pick
another one or something. Okay. So I
think most of the questions that I noted
down including all those that I had or
we had ourselves uh have been addressed
and I would like to maybe finish this
part of this discussion session with the
last question that was posed here in the
chat. Would it be possible to organize
such webinars on tectonic
geommorphology? And uh I think from my
overview of the questions we had, there
were quite a few that were addressing
um the usefulness of channel steepness,
how to comput it, sensitivity to certain
thresholds etc. Uh so it's more about
the scientific interpretation of these
uh these analysis topographic analysis.
So would it be possible to organize such
webinars on tectonic geomorphology
focusing on the interpretation of
geomorphic indexes and their
relationship with lithology, climate
tectonic forcing and seismonics. It will
also be highly valuable to cover the
linkages among tectonic uplift, erosion
rates, sediment production, sediment
connectivity and landscape evolution,
including how these relationships can be
interpreted from topographic and
geomorphic data sets. I apologize for
reading out quickly, but uh the message
is clear. So there seems to be um
interest in this and I don't know Wolf
Gang um maybe you already have even such
uh recordings of previous talks on
YouTube or something that address these
topics. I don't I'm not sure.
>> Yes, there are uh a couple of um
lectures that I gave um well some of
them are on YouTube some of them relate
to tectonic geomorphology. So for
example, if you have a bunch of uh basin
by denudation rates from cosmogenic
nuclides, how to uh go along with that?
Um uh these were courses that I gave at
the IIT ROI in India. Um so I think they
are available on YouTube but I might put
them together at some point and uh
repost them. Um [clears throat] and
otherwise I mean uh it would be
interesting to hear from you uh like I
mean yes we have mainly talked about
techniques right here so and uh the
technical issues um we have less or
spend less time let's say on the
interpretation um and yeah about the
scientific uh part of of terrain
analysis and from what I said at the
beginning one of the main aims of top
toolbox is to provide
a you know an environment where you can
uh experiment and and test models for
example and to test hypothesis and that
is what we often do as scientists. Um so
if you have any ideas or what uh you
would want to see in the future um again
let us know. I'm not sure whether we can
like do everything in
uh it's uh it's a lot of work I can tell
you to to prepare such workshops or or
webinars in uh in particular when it
comes to you know carefully in
addressing scientific questions as well.
Um but I think speaking for the entire
team here uh we are definitely open to
to do that. Yeah.
>> Yes. Maybe just just one point um worth
mentioning is the landscapes live which
is around since 2020 and has a lot of
YouTube recording of scientific talk
around tectonic gemophology. It's not
only tectonic gemology but very good
timing tomorrow it's uh Benjamin Comfort
and he will be giving a talk very much
around modeling and topographic
analysis. So uh feel free to check their
website. They have like uh four years of
recordings of uh scientific talk.
>> Yes, exactly. Um I think the website is
a little bit deserted but the YouTube
channel uh has all the recordings
available and uh and there are plenty of
um plenty of talks to to listen to and
at the end of the day it's really also
the purpose of what we think the gallery
is supposed to provide. So examples uh
that can be worked through including uh
the code including the the figures that
are plotted from that etc etc. So these
are resources for educational purposes
that can be tailored towards specific um
applications and anyone who's interested
in contributing a gallery can do so. So
this is really not that you have to uh
deliver um uh code through GitHub that
can be implemented in the Dupo toolbox.
It can also be uh a script um
preferentially including uh text like a
MATL life script or a Jupyter notebook
but that is more like an educational
thing and working through an example. So
this is really what the gallery is
supposed to do and whenever you have
something get in touch with will in
order to find out how to to contribute.
>> I want to add here that you know it's
it's also a way to to increase uh your
own visibility right we have on purpose
we have uh you know that there's one of
the first lines is the author and so
forth. So it's something that where you
can also you know demonstrate your work
to others and uh showcase what you have
done in particular um link it perhaps to
a publication of yours and your
publication will also receive the
attention that it deserves. Yeah.
>> Excellent. Yeah. I think I'm done with
the discussions part now and so the
final words I don't know Wolf Gang will
>> final words I don't know um I can start
[laughter]
now first of all I I'd like to thank
everyone for uh participating and uh
yeah I've quite quite many uh who have
now joined this webinar. I hope you
found it interesting and you have
learned something uh something that you
can take along to your own studies and
to your own work perhaps even to your
own classrooms uh and and forward that
and propagate it uh to others. I think
that's um that's one thing to do um not
sure whether some of you will or do use
uh for example top toolbox in teaching
also. So perhaps the stuff that we have
presenting here uh might be useful for
some of your classes too. Um uh on the
other hand uh of course many thanks to
the EGU for hosting us and for giving us
the opportunity to give this webinar and
yeah so thanks all and hoping to see you
soon again.
>> Yeah thank you.
>> Thank you. Bye-bye.
>> Thanks everyone.