DOI-USGS / COAWST

COAWST modeling system git repository
Other
100 stars 48 forks source link

Swan mode output file merge issue #260

Closed DYB2363021436 closed 1 month ago

DYB2363021436 commented 1 month ago

I used 16 threads of parallel computing while using SWAN mode, but the output HSIGN and other files were also output as 16 files based on the number of computing cores, named XXX.nc-001 to XXX.nc.016. There were a total of 16 files, but due to a calculation interruption, they were not merged. What should I do to merge the 16 files into one. nc file

BLOCK 'COMPGRID' NOHEADER 'My_hsig.nc' LAY 4 HSIGN 1. OUTPUT 20180701.000000 5 MIn BLOCK 'COMPGRID' NOHEADER 'My_xp.nc' LAY 4 XP 1.

jcwarner-usgs commented 1 month ago

well there are several choices. you can get the model to run without errors, then the files will get merged. Or, if you are looking at Hsig, that variable can be written to the ROMS netcdf output and it will be there for each output step that the model runs.

DYB2363021436 commented 1 month ago

Thank you for your answer. What you mean is that if the calculation does not stop, it will eventually merge. Also, when Swan and ROMS are coupled, Will the variables output by Swan mode be in the ROMS output his file? Can you view it through the output file of ROMS? If so, do you need to set certain parameters in the input file of the ROMS? Is there no way to merge the output of interrupted examples?

jcwarner-usgs commented 1 month ago

if the calculation does not stop, the swan files will get merged at the end.

When swan and roms are coupled, you need to select the output variables in the roms ocean.in, that will determine which variables are written out to the roms his file. not all swan vars are sent to roms, but a lot are.

there might be utilities to merge those files but i do not have them.

DYB2363021436 commented 1 month ago

Open the following content in ROMS, is that correct? Hout(idU2Sd) == T T ! ubar_stokes 2D U-Stokes velocity Hout(idV2Sd) == T T ! vbar_stokes 2D V-Stokes velocity Hout(idU3Sd) == T T ! u_stokes 3D U-Stokes velocity Hout(idV3Sd) == T T ! v_stokes 3D V-Stokes velocity Hout(idW3Sd) == T T ! omega_stokes 3D Omega-Stokes velocity Hout(idW3St) == T T ! w_stokes 3D W-Stokes velocity Hout(idWamp) == T T ! Hwave wave height Hout(idWlen) == T T ! Lwave wave length-mean Hout(idWlep) == T T ! Lwavep wave length-peak Hout(idWdir) == T T ! Dwave wave direction Hout(idWdip) == T T ! Dwavep wave direction-peak Hout(idWptp) == T T ! Pwave_top wave surface period Hout(idWpbt) == T T ! Pwave_bot wave bottom period Hout(idWorb) == T T ! Uwave_rms wave bottom orbital velocity Hout(idWbrk) == T T ! Wave_break wave breaking (percent) Hout(idUwav) == T T ! uWave wave-depth avgeraged U-velocity Hout(idVwav) == T T ! vWave wave-depth avgeraged V-velocity Hout(idWdif) == T T ! Dissip_fric wave dissipation due to bottom friction Hout(idWdib) == T T ! Dissip_break wave dissipation due to breaking Hout(idWdiw) == T T ! Dissip_wcap wave dissipation due to white capping Hout(idWdis) == T T ! Dissip_roller wave roller dissipation Hout(idWrol) == T T ! rollA wave roller action density

jcwarner-usgs commented 1 month ago

yes give that a try