Error while defining more than 4 discharge source

Hello,

Im trying to model flooding in Urban areas using combination of SWMM and TELEMAC.

When I try to define manholes in Telemac as a source of discharge using the ABSCISSAE and ORDINARTE of sources, I get an error as soon as I define more than 4 sources.

I looked up in the forum for similar problem or questions but that havent been completely helpful. Intially as a test im trying to include 10 points to see if the results are as expected but ultimately I will have to define [name removed] sources.

Im attaching both the version of the cas file and the error that im getting when defining more than 4 sources along with the boundary files and selafin files.

I would appreciate if someone could guide me in the right direction :slight_smile:

[name removed]

no attachments

If you plan to define 700 sources, you necessarily have to use user fortran capabilities to define the number and the position.

1 Like

Hi [name removed],

Thank you for the reply, I was for some reason unable to attach the files.

What subroutine do you mean exactly? Because what I understood from the User manual is that we can define the discharge using the source file or the user_debsce.f file. And the way do define the points/nodes are through abscissae or through with the polygon again through the external file.

Runoff_19.cas (2.52 KB)

Error_message_more_than_4_sources.txt (1.73 KB)

Finally got it to work. These are the error messages that im getting along with the cas file.

PS: uploading the slf and cli files too

user_debsce.f (1.76 KB)
Test_19.cli (160 KB)

Sorry for the confusion.

https://drive.google.com/drive/folders/1VQOjB5HRL021EGZmdbACq97Z9xN7CwJV?usp=sharing

This is the link to all the relevant files that I used to run the simulations.

Hi [name removed] error is explained here in the log file:

       7  ABSCISSAE OF SOURCES EXPECTED

       5  FOUND

Lines are too long and some sources was not recognized

1 Like

Hi

To manually declare the sources (by reading in a dedicated file for example) you should adapt lecdon_telemac2d.f

This could be quite complex if you are not fully familiar with fortran.

As this fortran file is huge, you could search NREJET which is the number of sources…

Hope this helps

1 Like

Yes, and there was a similar question posted on the forum and there what the “user” had done was specify the discharge sources less than the number of sources and they later mentioned correcting that helped resolve the issue.

When I looked at my files both the number sources matched and I am still getting the error.

Thank you for your help. I’ll look at the fortran file and if im still unable to have any progress. I’ll write back.

As already written, the following lines are too long:

ORDINATES OF SOURCES					 = 5654750;5654756.5;5654766.5;5654768;5654810.5;5654856;5654903

ABSCISSAE OF SOURCES					 = [phone removed].59;[phone removed].53;[phone removed].22;[phone removed].63;[phone removed].72;[phone removed].91;[phone removed].22

Line should not exceed 72 characters

But you could use the CR and have more than 1 line to describe the values of those keywords. This should be explain in the user manual

1 Like

Hi [name removed],

I tried editing the Lecdon_telemac.f file as you had suggested. However, I continued to get the error. I looked up for the error on the forum and found two possible answers: https://www.opentelemac.org/index.php/kunena/17-sisyphe/10414-increase-maxkey-to-increase-sources-number#24548 and https://www.opentelemac.org/index.php/kunena/16-telemac-2d/1825-maximum-number-of-sources?limitstart=0#1825

Based on the above linked posts, when I try to recompile telemac for windows after editing the declarations_telemac2d.f I get the error for lecdon_telemac2d. (error attached as photo).

Im still trying to understand fortran and am not quite sure where exactly to declare as fixed values (700 in my case) NREJEX or NREJET

Hi [name removed],

I have not 100% read through everything in this thread, but I have been doing something similar in the past and also got similar errors. I think you have already recompiled your TELEMAC with the changed declarations, so that is already a big step.

I have attached my steering file from back then and two fortran routines that I had to add to work with [name removed] sources. The fortran files I also got from somewhere in the forum, but I do not remember from where.

I hope this can help you to move forward!

[name removed]

read_fic_sources.txt (9.68 KB)
debsce.txt (3.79 KB)
steering.txt (8.86 KB)

1 Like

Hello [name removed],

Thank you for your reply.

Yes, I did change the declarations_telemac from INTEGER MAXSCE to INTEGER, PARAMETER [IP removed] MAXSCE =700 (see attached file). But on recompiling telemac I get the error “that a variable is expected” like i mentioned in the last message.

The fortran files that you attached here look very promising, although I have a question: Do I change/modify the files that you have attached before compiling or should I be adding these in the user_fortran folder.

I’ll write again if I am stuck. Thank you for your help!

[name removed]

declarations_telemac2d.txt (68.2 KB)

Hello [name removed],

I think that this change in declarations_telemac2d is not necessary. The number of maximum sources can be changed in the steering file (see my attachment).

The thing you must change is in declarations_special.f (in utils/special). Here, you need to increase MAXKEYWORD. The default value is 300, I increased it to 3000. This is necessary, so that you can declare enough sources in your steering file. After changing this, you must recompile.

[name removed]

1 Like

Hi [name removed],

I was able to successfully re-compile telemac, thank you for your guidance. However, there two new errors that im encountering (see attachment).

When I try to run the simulation with 700 sources i get the error “stop of damocles at key work number”, did you encounter any error like this? Also does it stem from the fact that Im using coordinates to define my sources while you used Node Numbers? I ran another test with a previous steering file without the 700 sources and that runs just fine.

The 2nd Error that I encounter is when I reduce the number of source that I have lets say to 150, I get a error saying “Master processor number 0 of the group of 1” and “Different Number of parallel processors” even when my steering file has no keyword PARALLEL PROCESSORS nor do I try to run it in parallel.

[name removed]

parallel_processors.txt (6.58 KB)


Hi [name removed],

for some reason my reply to this topic gets automatically blocked. If you google my user name, you should find me.

In short:

  1. increase maxkeyword further, 700 is still too low (as the error suggests). 700 is not the number of sources, but number of characters.

  2. I think it is not related to the processors, use the debugger to get more info.

[name removed]

1 Like

Hi [name removed],

Thank you for your timely replies, you have been very helpful.

I have once agian updated the MAXKEYWORD and im also using the debugger to see where the problem lies.

I tried to contact you through like you said but the link buttons to either send a message or to add as a contact seem to be broken. Is there another way that I could contact you?

[name removed]

Hi [name removed],

hope your simulations will work now. Otherwise this thread is always open and you can probably find me using google otherwise.

[name removed]

Hi [name removed],

I tried using the debug option in the steering file, but im not getting any detailed reason nor a specific file that is failing.

Apart from that what I realised was that while recompiling I was and still am getting a f2py error when I leave “options : api [line 73]” on in the systel.cfg file. I had commented that line out before re-compiling and thats when the segmentation error began to appear.

I looked up the use of api for telemac and it would be necessary for me later to collect data when (IF haha) the simulation runs so that would mean I can not leave the options :api commented out.

I also looked up for the error on the forum and found a post similar to the problem im having but its on linux system and im on windows and telemac is able to locate the f2py file.

https://www.opentelemac.org/index.php/assistance/forum5/12-linux-version/14118-compilation-fails-when-building-the-python-api#42050

[name removed]

compilation_error.txt (7.81 KB)