I found a bug in step3d_t.F when using the Q_PSOURCE CPP option. If you go to code block with line numbers 902-919, a logical switch is missing. We need to insert:
!
! Apply mass point sources - Volume influx.
!
IF (LtracerSrc(itrc,ng)) THEN
.
.
.
END IF
Otherwise, if we do a simulation with point sources which only have passive tracer discharges and no T, S discharges, ROMS blows-up because Tsrc(:,:,itemp)=0, Tsrc(:,:,isalt)=0 (as we put river_temp, river_salt to be zero in the river forcing NetCDF file because we do not have any realistic values for them).
In the ocean.in file, we will have:
GAMMA2 == 1.0d0
! Logical switches (TRUE/FALSE) to specify which variables to consider on
! tracers point Sources/Sinks (like river runoff): [1:NAT+NPT,Ngrids].
! See glossary below for details.
LtracerSrc == F F T ! temperature, salinity, inert
The blow-up occurs due to the nonlinear Equation of State having T, S with zero values.
This will not happen if we use UV_PSOURCE instead of Q_PSOURCE because it checks for the logical value of LtracerSrc(.) in step3d_t.F (lines 631-684).