When using BODYFORCE, we can apply the surface stress to the whole water column. And BODYFORCE requirs sustr and svstr which can be set in smflux.F.
However, as for me, I only want to set a varying horizontal acceration in the whole water column, so I don't have sustr/svstr data but I obtain acceleration ax and ay data.
Now I modify the smflux.F as followed:
Code: Select all
!!!!!!!Hoty modified at 0614!!!!!!
open(55,file='/ubuntu/ROMS/Projects/EW01.txt',status='old')
read(55,*)(ax(i),i=1,40001)
close(55)
DO j=JstrT,JendT
DO i=IstrP,IendT
DO k=1,40001
kk = REAL(k)
IF(iic(ng).eq.kk) THEN
sustr(i,j)=0.5_r8*(abs(h(i-1,j))+abs(h(i,j))+z_w(i,j,N(ng))+z_w(i-1,j,N(ng)))*ax(k)
END IF
END DO
I wonder that if is right/ How do you deal with the acceleration when using BODYFORCE?
Thanks and look forward to your reply.
Hoty