bug message reminder

When adressing a model crash or bug, please remember to include an entire model setup in your post that reproduces the crash or exposes the bug. Also add the XBlog.txt file. This is necessary information for people that are trying to help you. Including your model setup can be achieved by adding the zipped run directory (excluding output) as an attachment to the post.

Forum

update_fractions

Onur Kurum, modified 7 Years ago.

update_fractions

Capillary Posts: 12 Join Date: 4/28/11 Recent Posts
Hi all,

I was wondering if there is an "easy" way (by modifying the code) to modify fraction updating based on the net erosion on a given model node - or would this require a big effort to accomplish?

Let me try to explain with an example:

For a particular node, let's say I have 3 sed. classes (first one being the hardest to erode and the last is the easiest)- the simplified structure of gdists for this particular node is:
(nd=3, so only 3 layers)



what I want to achieve is to set a thickness for each of nd layer (much like dzg1,dzg2,dzg3) and once the
[initial zb - zb at the current time step] > thickness of layer 1
the sediment class 1 will no longer be fed into pbbed (set it to zero) at that node only while it is still possible to have a fraction of sed. class 1 at that node only if it is transported from another node.

This would be particularly useful for cases where one knows the exact thickness of a particular sediment class or to model the effect of vegetation etc on morphological change.
Currently I am able to "fake" it by using nd_var =1 however the fraction of the sediment I want to completely remove from a node never reaches zero and always have the effect of sed. class 1 on that node even though I know that sed. class1 is not available at the depth (zb) reached at a particular time.

Another example to clarify:
on 3 consecutive nodes (n1,n2, n3) the gdist is as follows. After 1meter net erosion at n2 - how to completely remove the effect of sed. class2 (gdist2) from n2 and have only the effect of sed. class1 at n2?



cheers
Onur
Bas Hoonhout, modified 7 Years ago.

RE: update_fractions (Answer)

Infra-gravity Posts: 362 Join Date: 5/20/11 Recent Posts
Hi Onur,

I'm not really familiar with the multiple sediment fractions module in XBeach, but if I understand correctly, your problem is that sediment class 2 in n2 of example #2 mixes with sediment class 1 in n2 in the second layer before sediment class 2 was able to erode fully from n2.

I believe you can tune this behavior using the split/merge options in params.txt. They indicate the relative amount of erosion/sedimentation needed to split/merge layers and thereby indicate the "breathing" capacity of the nd_var layer.

I'd say an extremely small value for merge will postpone the merging of layers and prevent the mixing of sediment classes in a single node initially. It will not be zero, though. I guess merge=0 will not work at the moment, since no merging of layers will take place at all and you will run out of sediment layers if the erosion progresses, but that's just a guess...

What you suggest is to implement a sudden shift of sediment layers in case merge=0 and the top layer is fully eroded. I don't think this is extremely difficult to implement. Have a look at the update_fractions function in morphevolution.F90. You'll need an exception for the case (par%merge=0 .and. dz(par%nd_var)==0). Now I'm writing, You might even only need to replace the .lt. with .le. (lower or equal instead of just lower) in line morphevolution.F90:1104 and use merge=0.

But again, I'm not familiar with this module, so you might end up with nonsense...

Bas
Onur Kurum, modified 7 Years ago.

RE: update_fractions

Capillary Posts: 12 Join Date: 4/28/11 Recent Posts
Hi Bas,
you are right merge=0 won't work right now - that's where I was looking in morphevolution.f90 and thought I'd ask to see if it's fundamentally possible or not before trying to modify it.

As I said, I can sort of "fake" this behavior by setting nd_var=1, and then dzg corresponds to the first layer of each gdist -

thanks for the answer
cheers
Onur
CS
Charlotte Smith, modified 1 Month ago.

RE: update_fractions

Capillary Posts: 1 Join Date: 1/8/20 Recent Posts
I have tried so many times to solve this problem but failed every time so I took assistance with Do My Assignment For Me I solved it so quickly.