Welcome, Guest
Username: Password: Remember me

TOPIC: HYCOM - Boundary

HYCOM - Boundary 6 years 7 months ago #29637

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Great B)
That's what I told you in previous post !
For the velocities, you just have to change you cli file into 566 and add PRESCRIBED VELOCITIES in your steering file. It should also work !
Be aware that with Thompson option, you'll not have exactly the same values as prescribed in your T3DBND file.

Good luck !
Laurent
The administrator has disabled public write access.

HYCOM - Boundary 6 years 7 months ago #29639

  • Ophelie
  • Ophelie's Avatar
Yes I realized this about the Thompson option. It works perfectly now !

Thank you very very much again !
Ophélie
The administrator has disabled public write access.

HYCOM - Boundary 4 years 9 months ago #35368

  • Cyangou
  • Cyangou's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 2
I am doing a work very similar to Ophélie, but my job is not confidential. At present I downloaded the r2d / r3d_hycom_file data from the converthycom.py script, and built the binary selafin file by using the r3d_hycom_file data and the convert_to_bnd.py script. (by the way, r2d can be opend in BK, but r3d not)

I checked the solutions that you mentioned earlier, but still get errors when using convert_to_bnd script.
Traceback (most recent call last): ] 0% | ---s
File "convert_to_bnd.py", line 232, in <module>
generate_bnd(cli_file, geo_file, slf_file, bnd_file)
File "convert_to_bnd.py", line 209, in generate_bnd
data = get_value_history_slf(slf.file, slf.tags, [itime], support3d,
File "C:\Users\chenyangspain\AppData\Local\Programs\Python\Python38\lib\site-packages\formats\parser_selafin.py", line 148, in get_value_history_slf
varsor = unpack(endian+str(npoin3)+ftype, f.read(fsize*npoin3))
struct.error: unpack requires a buffer of 54912 bytes

if you could be have time,also you can check my post currently #35315 conver_to_bnd.py script occurred struct error

you can check my file, conditions and my commands of scripts. sorry about reactivate this post, i truly need someone who using HyCOM data helping me. but take your time

thanks in advance.
Regards
Yang
The administrator has disabled public write access.

HYCOM - Boundary 4 years 9 months ago #35377

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

If after convert_hycom.py, your 3D selafin file is not readable by BlueKenue, it means there is first an issue at this stage, and it's useless to try to convert it to bnd file. That's why you got this error message.
As Christophe already told you, you have to investigate why convert_hycom.py does not provide you with valid 2D and 3D selafin files. what about the execution log of convert_hycom.py ?

Regards,
Laurent
The administrator has disabled public write access.

HYCOM - Boundary 4 years 9 months ago #35393

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

thank you for your reply!
I will attach the execution log, and my script (from python3 I have modified itime-T on line 234, with the main function added at the end)

my command: python convert_hycom.py --from 2018-11-01 --stop 2018-11-27 --bl 39,-1 --tr 42,2 -r hycom_bahia_big.slf

I run everything smoothly, I don't know what's wrong with the generated 3d file.

Secondly, in the 2d file, I opened it with BK, the current is perfect, but the salinity and temperature data are very strange. Outside the normal range, do you know where the problem is?

thanks in advance, i am using python3 in windows

All ragards
Yang
Attachments:
The administrator has disabled public write access.

HYCOM - Boundary 4 years 9 months ago #35394

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

Just to be sure, can you put in your script:
only_2d=False

You also have to modify the line 375 (itime-T)

With these settings, it works fine on my computer and python3 also.

For temperature and salinity values, for the 2D file, the script processes the surface temperature and salinity trends, expressed in degrees or psu by day, as mentioned in the log file. Maybe this can explain the values you obtain.

I hope it helps.

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

HYCOM - Boundary 4 years 9 months ago #35398

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

According to your modification,3d file its works fine now, thanks a lot!
now i can try the convert_to_bnd.py, hope its working too

Regards,
Yang
The administrator has disabled public write access.
Moderators: borisb

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