Welcome, Guest
Username: Password: Remember me

TOPIC: Adding spatially and time varying wind and atmospheric pressure

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15800

  • f.luxford
  • f.luxford's Avatar
Hi

I want to apply a spatially and time varying wind and atmospheric pressure fields across my domain. I have interpolated the data to my domain and saved the results as a selafin file which I specify as BINARY DATA FILE 1 in the steering file. I have written the attached meteo.f to read this file and perform the temporal interpolation.

The method works for scalar runs but not in parallel, can anyone help me fix it please? It appears that telemac2d only calls meteo.f from one of the subdomains: I don't understand why or how to fix it.

Any help would be much appreciated.

Thanks

Fay
Attachments:
The administrator has disabled public write access.

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15801

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello Fay,

Ac ouple of ideas ...

First, you need to split your file via domain decomposition. The easiest way to do that is to let TELEMAC do it. To do this you need to change your DICO file for that keyword:

SUBMIT = 'T2DBI1-READ-24;T2DBI1;FACUL;BIN;LIT;SELAFIN'
/SUBMIT = 'T2DBI1-READ-24;T2DBI1;FACUL;BIN;LIT;PARAL'

Second (and to do what is above, you would need your atmospheric file defined on the same mesh as the GEO file, i.e. FNPOIN = NPOIN, with the same numbering.

Third, when you read a BINARY record from a file, you need to provide the size of what you read.
This works:
READ(T2DBI1,ERR=100,END=200) AT1
But this does not work:
READ(T2DBI1,ERR=100,END=200)UAIR1
Instead you need:
READ(T2DBI1,ERR=100,END=200) ( UAIR1(J),J=1,NPOIN )

Finally, for information, this feature (and other binary boundary and sponge files) have been implemented in a branch for the 3D and will eventually be merged with the trunk in a couple of months -- branch pajama if you are interested (although it is not fully deployed for the 2D yet).

Hope this helps,
Sébastien.
The administrator has disabled public write access.
The following user(s) said Thank You: f.luxford

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15860

  • f.luxford
  • f.luxford's Avatar
Thanks Sébastien

In case anybody else experiences a similar problem: my error occurred because I didn't realise my version (v6p3) already included the lines

SUBMIT = 'T2DBI1-READ-24;T2DBI1;FACUL;BIN;LIT;SELAFIN'
/SUBMIT = 'T2DBI1-READ-24;T2DBI1;FACUL;BIN;LIT;PARAL'

in the DICO file. i.e. TELEMAC was already performing the domain decomposition on my wind and pressure file without me realising. In this case only a scalar version of the code is required (attached).

Thanks everyone

Fay
Attachments:
The administrator has disabled public write access.

Adding spatially and time varying wind and atmospheric pressure 9 years 8 months ago #16204

  • f.luxford
  • f.luxford's Avatar
I found a bug in the original version of meteo.f I posted. Please find a corrected version attached.

Fay
Attachments:
The administrator has disabled public write access.

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15817

  • riadh
  • riadh's Avatar
Hello

in the new release v7p0 you can find and example of wind varying in time and space for Telemac-2D. The case is called wind_txy in directory examples/telemac-2D. This example was kindly added by a canadian user.
This case works well in parallel and therefore you do not have to develop anything further.

with my best regards

Riadh ATA
The administrator has disabled public write access.

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15856

  • f.luxford
  • f.luxford's Avatar
Hello Riadh,

Thank you for your help. I ran the wind_txy example in scalar and in parallel but they did not give the same answer along the outer boundary. Is anyone aware of this?

Best

Fay
The administrator has disabled public write access.

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15857

  • jmhervouet
  • jmhervouet's Avatar
Hello Fay,

Actually nobody seems aware of that, I'll have a look as soon as possible.

With best regards,

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

Adding spatially and time varying wind and atmospheric pressure 9 years 9 months ago #15861

  • jmhervouet
  • jmhervouet's Avatar
Hello again,

Actually we thought that the algorithm should work also in parallel and this is true, but unfortunately to avoid divisions by 0, the author added a shift of measurement stations by 0.1 when one point coincides with a station, and this spoils parallelism (not all points are looked at in this case). I enclose a tentative correction and have also done some obvious optimisation, I hope it works. At least I have the same result in scalar and parallel modes, but the result is different from the original one because my test to avoid divisions by zero is different and starts only at a square distance of 1.D-6.

With best regards,

Jean-Michel Hervouet
Attachments:
The administrator has disabled public write access.
Moderators: pham

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