Code: Select all
FROM:
DO k=1,N(ng)
FC(i,k)=FC(i,k)+0.5_r8* &
& (Qsrc(is,k )*Tsrc(is,k ,itrc)+ &
& Qsrc(is,k+1)*Tsrc(is,k+1,itrc))
END DO
TO:
DO k=1,N(ng)-1
FC(i,k-1)=FC(i,k-1)+0.5_r8* &
& (Qsrc(is,k )*Tsrc(is,k ,itrc)+ &
& Qsrc(is,k+1)*Tsrc(is,k+1,itrc))
END DO
k=n(ng)
FC(i,k)=FC(i,k)+Qsrc(is,k)*Tsrc(is,k ,itrc)
Unfortunately, this does not completely fix step3d_t.F because if you integrate the concentration (in my case, of a passive tracer dye_01) in ocean_his.nc over the entire volume at each time step it is much less than what is being added in the forcing netcdf file. This note is contributed with the intent of getting someone to fix this properly as I have no further time for it for a while. Thanks! By the way I am testing it with TS_MPDATA and Q_PSOURCE.