Welcome, Guest
Username: Password: Remember me

TOPIC: problem about FORMATTED RESULT FILE

problem about FORMATTED RESULT FILE 11 years 10 months ago #6782

  • robinson
  • robinson's Avatar
Hello,

I try to extract time series elevations(or other parameters) at several points with UTIMP_TELEMAC2D and store them in FORMATTED RESULT FILE 'station.txt'. My model runs in parallel and I simply add a few lines as follow:
 IF(MOD(ATL,3600.D0) .EQ. 0.D0)THEN
 !IF(IPID.EQ.1)THEN
   WRITE(29,1001) ATL/3600.D0,H%R(MESH%KNOLG%I(9475))
 !ENDIF 
 ENDIF   
But at the end of the simulation, usually 2 or 3 'station***.txt' files generated and the results are not the same as real modeled values(result.PNG).

why does this happen? how to solve this problem ...
thanks for any help.

with best regard.
Robinson
Attachments:
The administrator has disabled public write access.

problem about FORMATTED RESULT FILE 11 years 10 months ago #6785

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Robinson,

I would like to check what you really want to do. What is number 9475? Is it the global number of the node where you want to extract time series (before the partioning when you run a parallel simulation?)? If yes, your code implementation may be wrong.

With your code implementation, what is done is:
- you write in the FORMATTED RESULTS FILES (one for each subdomain, because the last SUBMIT argument of this keyword for file is 'PARAL') the water depth at the node with the local number MESH%KNOLG%I(9475) in the subdomain, whereas MESH%KNOLG%I(9475) gives an index of the global numbering corresponding to the node number 9475 in the local numbering. In parallel simulations, you run computation on each subdomain. Just try to change the number of PARALLEL PROCESSORS and I think that your extractions will be different.

If you want to extract time series at the global node number 9475, I would rather write something like:
IF(MOD(ATL,3600.D0).EQ.0.D0)THEN
IF(NCSIZE.GE.1) THEN
I = MESH%KNOGL%I(9475) ! I IS THE NODE WITH THE LOCAL NUMBER IN THE SUBDOMAIN CORRESPONDING TO THE NODE WITH THE GLOBAL NUMBER 9475
IF(I.NE.0) THEN ! IF IT IS EQUAL TO 0 THE NODE WITH THE GLOBAL NUMBER 9475 IS NOT PRESENT IN THE SUBDOMAIN
WRITE(29,1001) ATL/3600.D0,H%R(I)
ENDIF
ELSE
WRITE(29,1001) ATL/3600.D0,H%R(9475)
ENDIF
ENDIF

Just to check the extraction, if possible, try to run a simulation in scalar mode (PARALLEL PROCESSORS = 0) and compare the results.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: robinson

problem about FORMATTED RESULT FILE 11 years 10 months ago #6786

  • robinson
  • robinson's Avatar
Hello, Chi-Tuan

Thank you very much for your kind help and this problem has puzzled me for a while.
You say it right, 9475 is the global number of node in the original 2D mesh. Since I'm using the parallel mode, those output codes by myself is definitely wrong because it generates different results with different number of parallel processors.
So your corrected code is really helpful, and I will test it soon.
Thanks again and Happy New Year 2013.

with best regard.
Robinson
The administrator has disabled public write access.

problem about FORMATTED RESULT FILE 11 years 10 months ago #6791

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Another remark, are you sure that the line:

IF(MOD(ATL,3600.D0).EQ.0.D0)THEN

works ??

If ATL is the result of any computation like a sum, you could have 3599.999 instead of 3600.D0 and then the MOD will not give 0.D0 ? However if ATL is read in a file it may work...

If the time step is larger than 1 s I would prefer something like:

IF(MOD(NINT(ATL),3600).EQ.0) THEN

JMH
The administrator has disabled public write access.

problem about FORMATTED RESULT FILE 11 years 10 months ago #6794

  • robinson
  • robinson's Avatar
Hi, Jean-Michel Hervouet

Thanks for your remarks sir.
What you have commented is much more precise.Luckily, for my case with a time step of 100s, it works fine and I will do it the way you do.

with best regard.
Robinson
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.