I would like to add a continuous virtual dye source in my case like river files with NO horizontal momentum transport. Therefore, I utilized a river file to introduce a dye source at a specified location in my setup, while kept river mass transport = 0, and other settings are as follows:
Code: Select all
! Logical switches (TRUE/FALSE) to activate horizontal momentum transport
! point Sources/Sinks (like river runoff transport) and mass point
! Sources/Sinks (like volume vertical influx), [1:Ngrids].
LuvSrc == T ! horizontal momentum transport
LwSrc == F ! volume vertical influx
! Logical switches (TRUE/FALSE) to activate tracers point Sources/Sinks
! (like river runoff) and to specify which tracer variables to consider:
! [1:NAT+NPT,Ngrids]. See glossary below for details.
LtracerSrc == F F T ! temperature, salinity, inert
I suspect the issue may be with these lines of code in step3d_uv.F. When I commented out these lines, the model blow up.
Code: Select all
IF (LuvSrc(ng)) THEN
DO is=1,Nsrc(ng)
i=SOURCES(ng)%Isrc(is)
j=SOURCES(ng)%Jsrc(is)
IF (((IstrR.le.i).and.(i.le.IendR)).and. &
& ((JstrR.le.j).and.(j.le.JendR))) THEN
IF (INT(SOURCES(ng)%Dsrc(is)).eq.0) THEN
DO k=1,N(ng)
cff1=1.0_r8/(on_u(i,j)* &
& 0.5_r8*(z_w(i-1,j,k)-z_w(i-1,j,k-1)+ &
& z_w(i ,j,k)-z_w(i ,j,k-1)))
u(i,j,k,nnew)=SOURCES(ng)%Qsrc(is,k)*cff1
END DO
ELSE
DO k=1,N(ng)
cff1=1.0_r8/(om_v(i,j)* &
& 0.5_r8*(z_w(i,j-1,k)-z_w(i,j-1,k-1)+ &
& z_w(i,j ,k)-z_w(i,j ,k-1)))
v(i,j,k,nnew)=SOURCES(ng)%Qsrc(is,k)*cff1
END DO
END IF
END IF
END DO
END IF
So, please help me with your insights. Any suggestions would be greatly appreciated!