Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: How to use a scope file

How to use a scope file 8 years 4 months ago #22358

  • ykhoudar
  • ykhoudar's Avatar
Hi there,

I'm wondering if I can use a scope file to extract some data from one specific point of my mesh, at any given time and for each vertical layer.

If someone knows how I can do it using a scope file or an other command please let me know.

Regards !
The administrator has disabled public write access.

How to use a scope file 8 years 4 months ago #22360

  • jmhervouet
  • jmhervouet's Avatar
Hello,

A scope is a simple ascii file with a format that was understood by the former post-processor Rubens. As Rubens is no longer maintained we have decided to remove this possibility of producing a scope file. Actually you can use subroutine utimp.f to write what you want in an ascii file, with the format you want. utimp.f is called at the end of the time loop, so it is called at evry time step. As there is a use declarations_telemac3d in utimp.f, you can print anything, for example writing the value of the time followed by the components of velocity of point 122 at every time step would be something like :

in your steering file :

FORTRAN FILE : my_fortran_file
FORMATTED RESULTS FILE : my_extraction

in utimp.f put in my_fortran_file :

WRITE(T3D_FILES(T3DRFO)%LU,*) AT,U%R(122),V%R(122),W%R(122)

(not checked but this is the idea)


With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

How to use a scope file 8 years 4 months ago #22362

  • ykhoudar
  • ykhoudar's Avatar
Hello,

It works ! Thank you very much !

Best regars,

Yassine Khoudar
The administrator has disabled public write access.

How to use a scope file 8 years 4 months ago #22363

  • ykhoudar
  • ykhoudar's Avatar
Hello,

Thank you for your help.

The lines you gave me work for the velocity, but I would like to modify it because I need to extract value of my first tracer wich is SALINITY.

I need it to plot vertical profiles of salinity.

I tried some lines but I didn't find how to write it.

In your example it was "U%R(122)" to get the velocity component of the node 122. So, what should I write to get the Salinity of this node ?

Thank you in advance,
Best Regards

Yassine Khoudar
The administrator has disabled public write access.

How to use a scope file 8 years 4 months ago #22365

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You need to know the rank of your tracer. Suppose that salinity is tracer number 1. Then you can print TA%ADR(1)%P%R(NODE)

NODE being the 3D global number of the node. Suppose that you want to extract the vertical of the 2D node 122, then you can print:

TA%ADR(1)%P%R(122), TA%ADR(1)%P%R(122+NPOIN2), TA%ADR(1)%P%R(122+2*NPOIN2), etc. up to TA%ADR(1)%P%R(122+(NPLAN-1)*NPOIN2)

this will give you the vertical from bottom to top. TA is a block containing all the tracers, TA%ADR(1)%P is the pointer pointing to the first tracer, then it is like U, V and W, so %R to get the double precision component.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

How to use a scope file 8 years 4 months ago #22366

  • ykhoudar
  • ykhoudar's Avatar
Thank you very much !
Now it works !

Best Regards
The administrator has disabled public write access.

How to use a scope file 7 years 8 months ago #25493

  • yuanhui
  • yuanhui's Avatar
Hi,

I want to extract the vertical profile of water temperature results at some point for all my sigma layers. I am using parallel version of telemac3d (4 processors). I realized the node ID in the TA%ADR(1)%P%R(NODE) is the local ID in each processor. So it works for serial computing but for parallel version, it gives me one result file from each processor. But I only know its global ID from 2D map. Is there any code that I can use to extract verticle profile of the results when I know its global ID and using the parallel computing?

Thank you
Yuan
The administrator has disabled public write access.

How to use a scope file 7 years 8 months ago #25502

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi!

You can convert your global node ID to the local one by using the function GLOBAL_TO_LOCAL_POINT from bief library, see an example below:

IF(NCSIZE.GT.1) THEN
N = 1000 ! your global node ID
NLOC = GLOBAL_TO_LOCAL_POINT(N,MESH3D)
IF(NLOC.NE.0) THEN ! the function can return 0 if your global node is not contained in the local subdomain being treated
! add your own code here
ENDIF
ENDIF

In my case I had to add the GLOBAL_TO_LOCAL_POINT subroutine in my fortran file to have it working but this was with an older versi0on (6.3), it is maybe no longer needed with later versions.

Good luck!

Best regards
PL
The administrator has disabled public write access.
The following user(s) said Thank You: huyquangtran, yuanhui

How to use a scope file 7 years 8 months ago #25518

  • yuanhui
  • yuanhui's Avatar
Thank you so much.It works! I really appreciate your help.

With best regards
Yuan
The administrator has disabled public write access.

How to use a scope file 7 years 8 months ago #25526

  • huyquangtran
  • huyquangtran's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 271
  • Thank you received: 23
Hi,

I suppose to extract the velocity profile at three different locations where current speed is very strong (up to 3.5m/s) in my domain (node no. 8118, 8496 and 7935), so I write:

! USER OUTPUT ACCORDING TO THE VALUES: TO BE IMPLEMENTED
WRITE(T3D_FILES(T3DRFO)%LU,*) AT,U%R(8118),V%R(8118),W%R(8118)
WRITE(T3D_FILES(T3DRFO)%LU,*) AT,U%R(8496),V%R(8496),W%R(8496)
WRITE(T3D_FILES(T3DRFO)%LU,*) AT,U%R(7935),V%R(7935),W%R(7935)
then I got the result like this:

Untitled_2017-03-06.jpg


I just wonder why the velocity in the output file sometimes is so small (e.g E-002, E-003)?

Could you help me?

Thanks & Regards
Huy
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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