Skip to content

Commit

Permalink
Changes to enable coupling with WW3 using 3d vortex formulation (#162)
Browse files Browse the repository at this point in the history
* minor fix for 3d vortex coupling

* add variables to output for vortex formulation coupling

* fix minor issue with output

* fix build issue
  • Loading branch information
uturuncoglu authored Jan 29, 2025
1 parent 205e423 commit 668a4b2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/Hydro/misc_subs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6473,7 +6473,6 @@ end subroutine compute_wave_force_lon
! /sciclone/home/yinglong/git/CoastalApp/WW3/model/ftn/w3oacpmd.ftn
! (search /OASOCM)
!=========================================================================
#ifdef USE_WW3
! Grab necessary arrays from WW3 and save into SCHISM arrays and compute wave forces
SUBROUTINE get_WW3_arrays(WW3__OHS,WW3__DIR,WW3_T0M1,WW3__WNM,WW3__BHD,WW3_USSX,WW3_USSY, &
&WW3_TWOX,WW3_TWOY,WW3_TBBX,WW3_TBBY,WW3_UBRX,WW3_UBRY)
Expand All @@ -6487,7 +6486,7 @@ SUBROUTINE get_WW3_arrays(WW3__OHS,WW3__DIR,WW3_T0M1,WW3__WNM,WW3__BHD,WW3_USSX,
!No ghost
REAL(rkind),intent(in) :: WW3__OHS(np),WW3__DIR(np),WW3_T0M1(np), &
&WW3__WNM(np),WW3__BHD(np),WW3_USSX(np),WW3_USSY(np),WW3_TWOX(np), &
&WW3_TWOY(np),WW3_TBBX(np),WW3_TBBY(np),WW3_UBRX,WW3_UBRY
&WW3_TWOY(np),WW3_TBBX(np),WW3_TBBY(np),WW3_UBRX(np),WW3_UBRY(np)

REAL(rkind) :: tmp

Expand Down Expand Up @@ -7052,4 +7051,3 @@ SUBROUTINE COMPUTE_STREAMING_VF_TERMS_SCHISM
CALL exchange_s3d_2(wwave_force)

END SUBROUTINE COMPUTE_STREAMING_VF_TERMS_SCHISM
#endif /*USE_WW3*/
53 changes: 47 additions & 6 deletions src/Hydro/schism_step.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9309,14 +9309,55 @@ subroutine schism_step(it)
#endif

#if defined USE_WW3
! Eastward wave radiation stress
call writeout_nc(id_out_ww3(1),'rsxx',1,1,npa,rsxx)
if (RADFLAG == 'VOR') then
! Significant wave height
call writeout_nc(id_out_ww3(1),'hs',1,1,npa,wave_hs)

! Eastward northward wave radiation stress
call writeout_nc(id_out_ww3(2),'rsxy',1,1,npa,rsxy)
! Mean wave direction
call writeout_nc(id_out_ww3(2),'dir',1,1,npa,wave_dir)

! Northward wave radiation stress
call writeout_nc(id_out_ww3(3),'rsyy',1,1,npa,rsyy)
! Mean wave period
call writeout_nc(id_out_ww3(3),'tm1',1,1,npa,wave_tm1)

! Mean wave number
call writeout_nc(id_out_ww3(4),'wnm',1,1,npa,wave_wnm)

! Wave-induced Bernoulli head pressure
call writeout_nc(id_out_ww3(5),'bhd',1,1,npa,wave_pres)

! Stokes drift, x component
call writeout_nc(id_out_ww3(6),'ussx',1,1,npa,wave_stokes_x)

! Stokes drift, y component
call writeout_nc(id_out_ww3(7),'ussy',1,1,npa,wave_stokes_y)

! Wave-ocean mom flux, x component
call writeout_nc(id_out_ww3(8),'twox',1,1,npa,wave_ocean_flux_x)

! Wave-ocean mom flux, y component
call writeout_nc(id_out_ww3(9),'twoy',1,1,npa,wave_ocean_flux_y)

! Momentum flux due to bottom friction, x component
call writeout_nc(id_out_ww3(10),'tbbx',1,1,npa,wave_flux_friction_x)

! Momentum flux due to bottom friction, x component
call writeout_nc(id_out_ww3(11),'tbby',1,1,npa,wave_flux_friction_y)

! Near bed orbital vel, x component
call writeout_nc(id_out_ww3(12),'ubrx',1,1,npa,wave_orbu)

! Near bed orbital vel, y component
call writeout_nc(id_out_ww3(13),'ubry',1,1,npa,wave_orbv)
else
! Eastward wave radiation stress
call writeout_nc(id_out_ww3(1),'rsxx',1,1,npa,rsxx)

! Eastward northward wave radiation stress
call writeout_nc(id_out_ww3(2),'rsxy',1,1,npa,rsxy)

! Northward wave radiation stress
call writeout_nc(id_out_ww3(3),'rsyy',1,1,npa,rsyy)
end if
#endif

#ifdef USE_MARSH
Expand Down

0 comments on commit 668a4b2

Please sign in to comment.