Bug in ROMS/Nonlinear/step3d_t.F when using Q_PSOURCE

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
lanerolle
Posts: 157
Joined: Mon Apr 28, 2003 5:12 pm
Location: NOAA

Bug in ROMS/Nonlinear/step3d_t.F when using Q_PSOURCE

#1 Unread post by lanerolle »

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).

Post Reply