Welcome, Guest
Username: Password: Remember me

TOPIC: impose tide extracted from the glolbal model to the smaller model.

impose tide extracted from the glolbal model to the smaller model. 6 years 4 months ago #30801

  • yasmina
  • yasmina's Avatar
Hello community,

Currently, I am doing a lot of chaining and many imposed boundaries between the global model and the smaller model.

So I simulated the tide, with the TOMAWAC-TELEMAC2D coupling, for 1 day on the Gulf model, I used the TPXO data for the tide. But now, I want to simulate a smaller model without using the TPXO but by imposing a boundary condition on the smaller model extracted from the Global model.

I have already taken the boundary of the smallest model into the global model, so now I have a lot of nodes in common between the global model and the smaller model.

Is there an example witch can help me?

I hope someone will help me.
Best REGARDS.
YASMINA.
The administrator has disabled public write access.

impose tide extracted from the glolbal model to the smaller model. 6 years 4 months ago #30834

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hello Yasmina,

I have been doing for some time exactly what you are describing in 2D. I extract from a 2D global model the boundary conditions for the 2D local model. If you are working in 3D there are some pre-existing scripts that will manage the boundary conditions for you. As far as I know, there are no such tools for 2D.

For the TOMAWAC model, this treatment of boundary conditions is already programmed and available to you. No need to modify any Fortran subroutine. Look under the TOMAWAC example 'impose_spectra' for inspiration.

As for TELEMAC-2D, this boundary treatment has to be done via a modification to the bord.f subroutine. I am attaching my modification (not pretty, not beautiful, lots of hard coding). In this example you will see that I cut everything out from bord.f and only retained what I needed. Notice that I also imposed river flow through this modified bord.f (as liquid boundaries file didn't work anymore after my modifications of bord.f). In this example I assign at each offshore boundary point of the local model depth, uvel, and vvel. I also assign uvel and vvel for the upstream (inland) river.

I also use a python script extract_bord.py from PPUTILS to extract from a global TELEMAC-2D model result file a text formatted file. I then manually modify this text file so that my bord.f subroutine can read it. It is not perfect, but it works.

This is all what I got. If you make improvements to this cumbersome procedure of mine, please post them here.

Pat

File Attachment:

File Name: bord.f
File Size: 13 KB


File Attachment:

File Name: offshore_river.txt
File Size: 51 KB
The administrator has disabled public write access.

impose tide extracted from the glolbal model to the smaller model. 6 years 4 months ago #30859

  • yasmina
  • yasmina's Avatar
Hello Pat,

Sorry for my late reply, thank you for your reply.

I had done a simulation with another modification of subroutine bord.f with modificaton of fonction SL, READ_FIC_FRLIQ and VIT.

I am not realy confortable with the langage fortran, but i had followed the topic #749.

The simulation run but i think that it's don't take in consideration the liquid file imposed in the boundary. Wich mean that there are some mistakes in my subroutine file.

I attached my fortran file:

File Attachment:

File Name: bord_2018-07-10.f
File Size: 35 KB


So i was checked your fortran file, to use the subroutine i must extract the U and V velocity separately, is there another way to extract this value without python script?

Hope that you can clear me more to apply this methodology.

Best regards.
YASMINA.
The administrator has disabled public write access.

impose tide extracted from the glolbal model to the smaller model. 6 years 4 months ago #30889

  • yasmina
  • yasmina's Avatar
Hello,

I rewrite you because i had try your subroutine. it's run. but it's seems like the other subroutine that i used before, the simulation run but when i check the result at the boundary logically i should have the value that i assigned in the liquid Boundary file but no instead i have a zero value both of the elevation and the velocity.

I attached my steering file, fortran file (Wich is yours) and my liquid boundary file.


File Attachment:

File Name: Bord.txt
File Size: 106 KB


File Attachment:

File Name: Bord_tide.f
File Size: 10 KB


File Attachment:

File Name: init2_baie.cas
File Size: 6 KB


Free surface in step 2:

freesurfacestep2.png

Free surface step 0:

Freesurface.png


Velocity step 2:

velocity.png

Velocity in step 0: i don't have any value.

baie.png


I am realy confused, what can be the problem?

Hope that someone can help me to solve this problem.

BEST REGARDS.
YASMINA.
The administrator has disabled public write access.

impose tide extracted from the global model to the smaller model. 6 years 4 months ago #30899

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hello Yasmina,

I just had a brief look into the 'Bord.txt' file you attached. The first two lines are:

no_time_points no_offshore_boundary_nodes
6 93

When I look into the data below, I see that it should have been:

no_time_points no_offshore_boundary_nodes
7 93

Could it be as simple as this? Try it, and let me know.

Another hint: run your simulation for 1 time step only, and in your 'Bord_tide.f' output the data read by the custom subroutine. That way you can make sure everything is loaded into Telemac before the simulation starts.

Also, in my *.cli file I made the offshore boundary nodes are tagged with 5 6 6 ... 4 Make sure your offshore boundary is like this.

Hope it helps,

Pat
The administrator has disabled public write access.

impose tide extracted from the global model to the smaller model. 6 years 4 months ago #30915

  • yasmina
  • yasmina's Avatar
Hello Pat,

Sorry for my late reply, but i had take a time to understand in detail your program.

Thank you for that.

So when i checked the program i had modified three simple things that in my simulation don't recognize:

1- READ(T2D_FILES(T2DFO1)%LU,*) (PP_DEPTH(T,J), J=1,NPTFRL) to READ(T2D_FILES(T2DFO1)%LU,*) PP_DEPTH(T,:)

2- DO T = 1, NO_TIME_POINTS to DO T = 1, 7 (He don't want to recognize the NO_TIME_POINTS).


3- Same for NPTFRL: DO K = 1, NPTFRL to DO K = 1, 92

The bord.f:

File Attachment:

File Name: bordof.f
File Size: 13 KB


In all cases, now the simulation works and the results seems good.

But now i had another problems, in parralel version it's don't run, it's make me the error below wich is in relation with the boudary.


|
| THE MESH PARTITIONING STEP STARTS
|
| BEGIN PARTITIONING WITH METIS
|
| RUNTIME OF METIS 0.00000000 SECONDS
|
| THE MESH PARTITIONING STEP HAS FINISHED
|
| ERROR IN BOUNDARIES J= 3079
|
| WHILE NPTFR_P(I)= 3317
|
| WHILE L= 3317
|
|
|
|
|
|
|
| PLANTE: PROGRAM STOPPED AFTER AN ERROR
|
| RETURNING EXIT CODE: 2
|



What do you think Pat!!!!

Again realy thank you!!!
REGARDS.
YASMINA.
The administrator has disabled public write access.

impose tide extracted from the global model to the smaller model. 6 years 4 months ago #30921

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hi Yasmina,

The changes you had made are sure to break parallelism. If you are wanting my modified bord.f to work in parallel, you must not make the modifications you proposed.

It looks like the beginning of your formatted data file you either have some bad values, or the subroutine is for some reason not reading the data specified. I used this subroutine for a number of different cases, and had no issues.

If you want, upload the complete case, and I can take a look.

Pat
The administrator has disabled public write access.

impose tide extracted from the global model to the smaller model. 6 years 4 months ago #30959

  • yasmina
  • yasmina's Avatar
Hello Pat,

Wich it is strang, is that in the beginning the NO_TIME_POINTS and NPT were traded.


It's just in the end wich the problem focused.


I attached here my cas file and my formatted data:

File Attachment:

File Name: init2_baie_2018-07-24.cas
File Size: 6 KB



File Attachment:

File Name: boundary2.txt
File Size: 72 KB



Thank you PAT!!

REGARDS
YASMINA.
The administrator has disabled public write access.
Moderators: pham

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