Welcome, Guest
Username: Password: Remember me

TOPIC: Problems with BINARY BOUNDARY DATA FILE

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29093

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi all,

For me, it works in v7p2r1 (both sequential and parallel) and also in v7p3r0 but only with "RESULT FILE IN LONGITUDE-LATITUDE = NO" (default is YES).
I didn't look closely to results yet.

Cheers,
Laurent
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29100

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi,

Here is a new write_mesh.f subroutine for v7p3 that allows the writing of 3D results files in lat/lon.

File Attachment:

File Name: write_mesh.f
File Size: 7 KB


The modifications are:
- line 127 : NPOIN=MESH%NPOIN replaces by NPOIN=MESH%NPOIN/NPLAN
- lines 128-129 : removal of the 2 calls to cpstvc
Indeed, in 3D, MESH3D contains NPOIN3 while T1 and T2 arrays are allocated for 2D structures and are later filled by NPOIN2 from GEO file.

Agnès, I let you check this fix, maybe this is not the best way to correct this issue, but for me, it works.

Luz, I don't understand how you can have an error in the call to cpstvc with v7p2r2 version, as write_mesh doesn't call it... or maybe elsewhere
In your case, I noticed that the river was not taking into account, you have to uncomment the line PRESCRIBED FLOWRATES in your steering file. Maybe you can also use SCHEME FOR ADVECTION OF VELOCITIES = 14 as you have tidal flats.
Your case works fine for me in v7p2r1 and v7p3r0, both sequential and parallel modes (up to 14 processors).

Regards,
Laurent
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29111

  • luz.garcia
  • luz.garcia's Avatar
Hi Laurent,

Thanks for your comments. I keep getting an error (see below). I am trying to run just with 2 processors. I get exactly the same error in v7p2r2 and v7p3.

Does this mean something to you??

Thanks a lot,
Luz

At line 219 of file /gpfs/home/e088/opentelemac_72/v7p2r2/sources/telemac3d/read_bin_frliq.f
Fortran runtime error: Index '60037' of dimension 1 of array 'q' above upper bound of 59610
At line 219 of file /gpfs/home/e088/opentelemac_72/v7p2r2/sources/telemac3d/read_bin_frliq.f
Fortran runtime error: Index '65938' of dimension 1 of array 'q' above upper bound of 61160
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29114

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Luz,

Did you change something since your previous configuration ? you didn't have this error before. It seems that you're trying to read from your binary boundary file more values than your mesh needs..

Can you try in v7p3 with these files:

File Attachment:

File Name: DartEstuary_3D_bathy_v0.cas
File Size: 8 KB


File Attachment:

File Name: write_mesh_2018-03-02.f
File Size: 7 KB


Laurent
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29115

  • luz.garcia
  • luz.garcia's Avatar
Hi Laurent,

This is indeed very weird. I have copied your files and even my binary boundary from the forum (in case I have modified something) and keep getting the error. I think I have to investigate a little bit further what is happening.

Thanks,
Luz
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29117

  • luz.garcia
  • luz.garcia's Avatar
Hi,

I have been analyzing the error I get and this is in read_bin_frliq.f. The problem has to do with the indexing of the boundary points in the partitioned geometry.

Around line 195 IPOIN2 is, to my understanding, defined as the local index of the boundary point, but in the next line we have
IF(NCSIZE.GT.1) IPOIN2=MESH2D%KNOLG%I(IPOIN2),
which overwrites the value of IPOIN2 and gives it its value in the global geometry.

Then, around line 226 we have
IPOIN3 = (NPLAN-1)*NPOIN2+IPOIN2,
where NPOIN2 is the number of 2D points in the current partition of the geometry. IPOIN3 should have a maximum value of NPOIN2*NPLAN, so IPOIN2 should be <=NPOIN2. But since we have the transformation from local to global above, this is giving an error when Q is filled in the next line (Q is allocated as NPOIN3=NPOIN2*NPLAN)
Q(IPOIN3) = VARVALUE(IPOB + (NPLANBND-1)*NPOIN2BND)
I have tried to use the local coordinates for NPOIN2 rather than the global and I do not get errors in this script anymore.

But then I get errors in bord3d.f for similar reasons...

I do understand that I get this error but, why don't you get it?
I am using v7p3r0 with the correction in telemac3d.dico.

Thanks for your ideas!!

Luz
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29124

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Luz,

I think you're right ! I didn't have this message because I don't use bounds check options for the compilation and I didn't see it in the results as the tide is largely dominant.

Can you please try again with the 3 following modified source files ? it should be good now ;)

File Attachment:

File Name: bord3d.f
File Size: 31 KB

File Attachment:

File Name: read_bin_frliq.f
File Size: 11 KB

File Attachment:

File Name: write_mesh_2018-03-05.f
File Size: 7 KB


Regards,
Laurent
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29161

  • luz.garcia
  • luz.garcia's Avatar
Hi Laurent,

This is working!! Thanks a lot!

But now I have a couple of other questions :) :

1) If I use a global model (Hycom or others), sometimes the time step is daily or they do not have tides directly. If I would like to have the surface elevations and velocities at the boundary provided by TPXO, How do I do that?? Just keeping the temperatures and salinities read from the binary boundaries, for example.

2) Another application: I want the tides from TPXO, but I would also like to provide through the boundaries the u,v,temp and salt provided by a global model (no tides), and I want to keep these 3D baroclinic velocities through my boundaries plus the tides. How to do this??

Hope these questions make sense!

Cheers,
Luz
The administrator has disabled public write access.

Problems with BINARY BOUNDARY DATA FILE 6 years 8 months ago #29170

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Luz,

Great to see it's finally working!

1) You're already prescribing H,U,V from TPXO. If you want to add SSH,T,S from a global model, I think you just have to remove U,V and add T,S in your binary boundary file (SSH is already taken into account in the first layer of ELEVATION variable, but you can remove it in the python script convertToBND.py or set the SSH to zeros).
Don't forget adding the 2 prescribed tracers in your steering file (PRESCRIBED TRACERS VALUES and associated keywords) and boundary conditions files (LITBOR=5 on the 8th column). You can then choose a density law.
Maybe bord3d will tell you that U,V are missing in the binary boundary file, but you just have to comment out the associated lines or set it to zeros. UBORL and VBORL will be filled after by tidal_model_t3d with TPXO data.


2) You just have to keep U,V,T,S in your binary boundary file also. bord3d will first fill UBORL and VBORL with binary boundary data and then tidal_model_t3d will add U,V contribution from TPXO.
You have to keep in tidal_model_t3d the contribution of your global model firstly filled in bord3d instead of overwrite it:
HBOR(K) = HBOR(K) + HBTIDE%R(K)
UBORL%R(IBORD) = UBORL%R(IBORD) + UBTIDE%R(K)
VBORL%R(IBORD) = VBORL%R(IBORD) + VBTIDE%R(K)

I hope it helps!
Good luck !

Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: olslewfoot, liuy, Cyangou

Problems with BINARY BOUNDARY DATA FILE 4 years 8 months ago #35484

  • Cyangou
  • Cyangou's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 2
Hi Laurent

First of all, thank you very much for sharing the knowledge and experience. It is very helpful to my research.

In this post, I downloaded write mesh.f in order to write the result file in latitude and longitude coordinates.
And downloaded the bord3d.f file (modified), which preserves the U, V, T, S of global data in binary boundaries and strengthens the U, V contribution in TPXO.
and adding 2 trackers To represent temperature and salinity, I added a boundary condition of 566-5 and some settings for the tracker.

But I have the following errors:
1. i can run perfectly in a simple Mesh with tpxo and hycom (without use_fortran), but the 3d result file opens normally in BK, but XY does not show coordinates in 2D 3D view. (See Figure 1) Not shown.

2. But when i trying to run a more complex/larger mesh (using the use_fortan above), it always showed a problem :
CORRXY (BIEF):NO MODIFICATION OF COORDINATES
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

First I checked the mesh, no problem. Secondly, I set DEBUGGER= 1 to check where is a problem with sub fortran file. And i think the BK problem is also caused by the .f sub-example, regarding the coordinates.

i attached a screenshot of BK, output.txt and my steering file, if needs any other material please let me know and I will attach it as soon as possible.

Thanks in advance

Best regards
Yang
The administrator has disabled public write access.
Moderators: pham

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