Welcome, Guest
Username: Password: Remember me

TOPIC: HYCOM - Boundary

HYCOM - Boundary 6 years 7 months ago #29422

  • Ophelie
  • Ophelie's Avatar
Hi !

I am a new user of Telemac and BlueKenue.

I need to impose current values to the boundary conditions.
I got the HYCOM data thanks to the convertHYCOM.py script.
So now, I think I should convert the data into a liquid boundary file and that it is possible thanks to the convertToBND.py script.

However, this last script keeps returning this error :

Interpreting command line options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+> getting hold of the CONLIM file and of its liquid boundaries
+> getting hold of the GEO file and of its bathymetry
+> support extraction
+> masking and setting connectivity
+> writing header
Traceback (most recent call last):
File "converters/convertToBND_ok.py", line 160, in <module>
bnd.appendHeaderSLF()
File "converters/../parsers/parserSELAFIN.py", line 654, in appendHeaderSLF
f.write(pack(endian+str(self.NELEM3*self.NDP3)+'i',*(self.IKLE3.ravel()+1)))
struct.error: pack expected 1152 items for packing (got 576)

Does anyone know what kind of mistake I might be doing ? :dry:

Thank you very much for your help.
Ophelie
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29431

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hello Ophélie,

You didn't choose the easiest case to begin with ;)
Your error occurs during the writing of IKLE array, and it seems that there is not enough values (576 instead of expected 1152).
Check the size of your arrays and the consistency of the GEO, CLI and Hycom files.

I hope it helps!
Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: Batifoulier, Ophelie

HYCOM - Boundary 6 years 7 months ago #29435

  • Ophelie
  • Ophelie's Avatar
Thank you very much for your answer Laurent ! B)

I checked the consistency of the GEO file and BC2 file, they have the same number of nodes and elements. The CLI file looks consistent too.

However the HYCOM file has a different number of nodes because the resolution is different from my mesh and the borders are not exactly at the same place as the mesh's borders. Does it matter ? Should I try to interpolate the HYCOM file with my mesh or something like that ?

Which arrays do you think I should have look at exactly ?

Something else might be important : I've tried to use convertToBND.py with several meshes and I always get this error with different values of "items expected" but this number is always twice as much as the number of items "gotten". :blink:

Do you have any idea that could help again ?

Thank you again for your help.
Ophelie
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29437

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

Can you post your geo and cli files please? and the command lines you are using with convertHYCOM.py and convertToBND.py?

Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: Ophelie

HYCOM - Boundary 6 years 7 months ago #29441

  • Ophelie
  • Ophelie's Avatar
Thank you again for your help Laurent.

As my files are confidential, I did the same steps for another part of the world. You can find my CLI and GEO files attached (yet, I don't have any bathymetry data for this zone). (For which I get the error with "24 expected items" and "12 items gotten".)

My command to use convertHYCOM.py is :
> python convertHYCOM.py --from 2017-02-01 --stop 2017-02-02 --bl 20,-119 -tr 29,-108 -r hycom_file.slf

and for convertToBND.py :
> python convertToBND.py geo.cli geo.slf t2d_hycom_file.slf bnd_file.liq
(I am not sure about the output file format but I have tried with .slf and .liq and got the same error).

I noticed that I don't get any error if I use the t3d_hycom_file.slf but I can't read the result file (either it is in .slf or .liq format) and I am not supposed to use 3D data.

Any suggestion ?

Thank you for your time,
Ophelie
Attachments:
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29442

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

First, I think you forgot changing the bound coordinates of your confidential area... with the mesh you posted, you can use the following command line for instance:
python convertHYCOM.py --from 2017-02-01 --stop 2017-02-02 --bl 59,-3 --tr 62,0 -r hycom_file.slf

Second, the convertToBND.py script is dedicated to build a "binary boundary data file", only use by Telemac3D. It's a binary selafin file containing the values you want to prescribe only on the boundary points (on the vertical also). So in the input of the script convertToBND.py, you must use the 3D file provided by convertHYCOM.py. That is why you don't have any error when you use the 3D file.
The script convertToBND.py doesn't allow you making 2D boundary conditions, as a liquid boundaries file for instance.. sorry, you have to make it by another way.

Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: Ophelie

HYCOM - Boundary 6 years 7 months ago #29443

  • Ophelie
  • Ophelie's Avatar
:ohmy: Thank you very much for your help Laurent !

Fortunately I just forgot to change the coordinates from another example I used for the command line :silly:

Now I understand why I could'nt make it work... I will look for another solution.

Thank you again,
Ophélie
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29516

  • Ophelie
  • Ophelie's Avatar
Hello again !

I am now trying to use the HYCOM converted data with Telemac3d (after dowloading thanks to convertHYCOM.py and convert it thanks to convertToBND.py).

I call the binary file created with the key word "BINARY BOUNDARY DATA FILE".

T3DBND is created with the HYCOM data in it, but my result files don't take any of these boundary conditions into account...

Does anyone have an idea of what I might be doing wrong please ? :unsure:

Thank you for your help.
Regards,
Ophélie
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29517

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

What variables do you prescribed at the boundary (SL,U,V,T,S) ? Are your boundary conditions file and steering file in agreement with this ?

Do you check if your T3DBND contains non-zero values ?

Do you have other forcings at the same time ? tide,...

Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: Ophelie

HYCOM - Boundary 6 years 7 months ago #29518

  • Ophelie
  • Ophelie's Avatar
Thank you very much for your answer Laurent !!

The boundaries are "opened with prescribed UV and H" and Tracer is free. (I also tried with only UV prescribed once, only H prescribed another time, and UV and H prescribed another time, but results are always the same).

Yes I checked T3DBND, values are not zero. The values in T3DBND (SL, UVW, S, T) are the same as the ones before the conversion into binary boundary file (with convertToBND.py).

I am not sure how my steering file can be "not" in agreement with the boundary condition file...? I know boundaries are opened ; in the result files, currents come in and depend on the intial condition I set. But there is no change in this result if I call the binary boundary data file or if I don't.

I don't have any other forcing at the same time.

Thank you again for your time,
Ophélie
The administrator has disabled public write access.
Moderators: borisb

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