Hello Sven,
There is and ENDIF missing after line 117 but it makes no difference in the end.
The subroutine compiles OK, but I get this error when the code executes and program crashes in INIT_SEDIMENT after NOEROD:
|Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
At first I thought that it was NOEROD that causing the trouble by not defining the rigid bed elevation correctly, but after modifying the subroutine to print the layer thickness at all points, it seems that NOEROD works as it should and the crash comes from later on.
I have the message
MAXIMUM INITIAL NUMBER OF LAYERS : 1
after INIT_SEDIMENT which is sent by INIT_AVAI, so I am looking into this at the moment. This showed up after adding a non-erodible bed. The code worked fine without it.
Thanks for taking interest at my problem.
Regards,
Costas