The original code (with my addition for the case JMPBUMP) went as follows
Code: Select all
!
!-----------------------------------------------------------------------
! Set tracers point Sources and/or Sinks.
!-----------------------------------------------------------------------
!
TRACERS : IF (ANY(LtracerSrc(:,ng))) THEN
SOURCES(ng)%Tsrc=0.0_r8 ! initialize
!
! Set-up tracer (tracer units) point Sources/Sinks.
!
# if defined RIVERPLUME1
IF (DOMAIN(ng)%NorthEast_Test(tile)) THEN
DO k=1,N(ng)
DO is=1,Nsrc(ng)
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
END DO
END DO
END IF
# elif defined JMPBUMP
IF (DOMAIN(ng)%NorthEast_Test(tile)) THEN
DO k=1,N(ng)
DO is=1,Nsrc(ng)
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
SOURCES(ng)%Tsrc(is,k,isalt)=S0(ng)*0.5_r8
END DO
END DO
END IF
I can get get the code to run the same way each time it is run by commenting out the line "SOURCES(ng)%Tsrc=0.0_r8 ! initialize". It serves no purpose anyway that I can tell -- you need to initialize the input tracer values to something sensible anyway, just so your model run makes sense.
Cheers, Jamie