Hello,
I am trying to do a simulation in OpenFlows only with wave forcing. I have used the Swan based method for coastal hydrodynamics.
But i have this failure.
I think it doesn't recognize my wave.hdf5 file.But I don't know how else I can convert the .dat file from swan to .hdf5.
Thank you for your attention.
Hello Yeison,
Could you please post the complete error message?
How did you convert your SWAN outputs to HDF5 format?
Thank you very much,
Luis
Hello Luis,
I used HDFview program to converter SWAN outputs to HDF5 format because the Convert HDF5 doesn't work for me.But I have question about .DAT file: What and how much information is needed in the SWAN output file (how much data and temporal resolution)?
This is the complete error message:
Do you have any example where they use waves as forcing?
Kind regards,
Yeison
It looks like the file is not in HDF5 format or does not meet the standards to be recognized by OpenFlows FLOOD.
You'll need to use the ConvertToHDF5 tool installed with OpenFlows FLOOD in:
"C:\Program Files\Bentley\OpenFlows FLOOD\MohidExe\x86\ConvertToHdf5_release_double_x86.exe"
Then, assuming you have setup your SWAN model as non-stationary and set the SWAN table outputs as:
TABLE 'COMPGRID' NOHEAD '..\res\SWAN_1.tbl' HS PER DIR FOR WLEN UBOT
you can configure the ConvertToHDF5 tool using the following commands (inside the ConvertToHDF5Action.dat setup file):
<begin_file>ACTION : CONVERT FROM SWAN NONSTATIONARYINPUT_GRID_FILENAME : Bathymetry.datINPUT_SWAN_FILENAME : SWAN_1.tblOUTPUTFILENAME : SWAN.hdf5START : 2021 2 11 0 0 0END : 2021 2 12 0 0 0OUTPUT_TIME : 0 600
<<beginproperty>>significant wave heightmean wave periodmean wave directionwave stress Xwave stress Ymean wave lengthUbw<<endproperty>>
<<beginunits>>msºPaPamm/s<<endunits>>
<end_file>
You'll then have the necessary variables (listed above) to run a wave-currents coupled simulation.
You can read more about how to input wave parameters in a coastal simulation here.
Thanks to your previous answers.
I converted the SWAN output file to HDF5 format and configured the wave module, but the model gave me the following error.
This is the SWAN output data configuration in the .tbl file
This is the waves module configuration
WAVE_PERIOD : 1WAVE_HEIGHT : 1WAVE_DIRECTION : 1
<begin_waveheight>NAME : significant wave heightUNITS : mFILE_IN_TIME : HDFFILENAME : ..\General Data\Boundary Conditions\Waves.hdf5DEFAULTVALUE : 0<end_waveheight>
<begin_wavedirection>NAME : mean wave directionUNITS : degreesFILE_IN_TIME : HDFFILENAME : ..\General Data\Boundary Conditions\Waves.hdf5DEFAULTVALUE : 0<end_wavedirection>
<begin_waveperiod>NAME : mean wave periodUNITS : sFILE_IN_TIME : HDFFILENAME : ..\General Data\Boundary Conditions\Waves.hdf5DEFAULTVALUE : 0<end_waveperiod>
I have question; the bathymetry that is used in the conversion from format to HDF5, I suppose it is the one generated with Mohid, it's ok ?. I think the HDF5 file has errors. Because I have changed some parameters and it follows the same error.
As the error message says, the time period covered by the HDF5 file does not cover the entire period of the simulation, specifically the last SWAN output is smaller or "earlier" than the simulation end time (which you define in the Model input data file).
The simulation period must be contained in the time period covered by the SWAN hdf5 file.
When you run a wave/current simulation the SWAN grid and bathymetry must be the same as the one you use in FLOOD (with MOHID Water). Thus, when you run the SWAN to HDF5 conversion tool you'll have to set the path to the bathymetry file (Grid Data format) you'll use in your hydrodynamic simulation.
Keep in mind that if you want to compute wave current interaction, you'll need to output the radiation stresses from SWAN and have them read by FLOOD MOHID Water engine in your simulation.
Kind regards,Luis