I want to add a decay term to the passive tracer equation:
dC/dt = <diffusive terms> - \alpha*C
here, C is concentration of the passive tracer, dC/dt is the material derivative, <diffusive terms> are the diffusive terms, and \alpha*C is the new term I want to add where \alpha is the decay rate.
I am modifying the step3d_t.F file by adding a piece of code in the section titled 'time step vertical diffusion'. This piece of code gets compiled by using 'define TRACER_TEST' in the cppdef.h file.
Code: Select all
# ifdef TRACER_TEST
DO k=1,N(ng)
DO j=Jstr,Jend
DO i=Istr,Iend
DO itrc1=1,NPT
t(i,j,k,nnew,inert(itrc1))=t(i,j,k,nnew,inert(itrc1))* &
& (1-0.1_r8*dt(ng)) ! \alpha is 0.1/sec
END DO
END DO
END DO
END DO
# endif
What I am doing wrong?
I am attaching my step3d_t.F file and cppdef.h file.
Best regards and Happy New Year,
Aakash