hello,
I am also working on programming a decay law of the racer (concentration of bacteries)
I tried to programme following what is written above by Mr Sebourban and I include the programme in my fortran file but it's not work !
I joined below my programme and the error message
thank you
DO ITRAC=1,NTRAC
S0TA%ADR(ITRAC)%P%TYPR='Q'
S1TA%ADR(ITRAC)%P%TYPR='Q'
ENDDO
INTEGER IPOIN3, IPOIN2, IPLAN
DOUBLE PRECISION DECAYDAY,DECAYRATE
DECAYDAY = 0.125D0
DECAYRATE = 0.9D0
UNIFORM DECAY RATE FOR TRACER NUMBER 2 (%ADR(2)) -
IF(NTRAC.GE.2) THEN
S0TA%ADR(2)%P%TYPR='Q'
S1TA%ADR(2)%P%TYPR='Q'
DO IPOIN3 = 1,NPOIN3
S0TA%ADR(2)%P%R(IPOIN3) = TA%ADR(2)%P%R(IPOIN3) *
& DLOG( 1.D0-DECAYRATE ) / ( DECAYDAY*24*3600.D0 ) / 2.D0
S1TA%ADR(2)%P%R(IPOIN3) =
& - DLOG( 1.D0-DECAYRATE ) / ( DECAYDAY*24*3600.D0 ) / 2.D0
ENDDO
!
ENDIF
! VERTICALLY VARIABLE DECAY RATE FOR TRACER NUMBER 3 (%ADR(3))
! ... A FUNCTION OF PLAN NUMBER TO DO IT SIMPLY ... (IPLAN=1 IS THE BOTTOM)
IF(NTRAC.GE.3) THEN
!
S1TA%ADR(3)%P%TYPR='Q'
DO IPOIN2 = 1,NPOIN2
DO IPLAN = 1,NPLAN
IPOIN3 = IPOIN2 + (IPLAN-1)*NPOIN2
S1TA%ADR(3)%P%R(IPOIN3) =
& - DLOG( 1.D0-DECAYRATE ) / ( DECAYDAY*24*3600.D0 ) * IPLAN
ENDDO
ENDDO
!
ENDIF