c_ --------------------------------------------------------------------- c_ RCS lines preceded by "c_ " c_ --------------------------------------------------------------------- c_ c_ $Source: /home/orr/WWW/Biotic/boundcond/RCS/jbio.f,v $ c_ $Revision: 1.1 $ c_ $Date: 1999/03/22 12:57:47 $ ; $State: Exp $ c_ $Author: orr $ ; $Locker: $ c_ c_ --------------------------------------------------------------------- c_ $Log: jbio.f,v $ c_ Revision 1.1 1999/03/22 12:57:47 orr c_ Initial revision c_ c_ --------------------------------------------------------------------- c_ subroutine jbio c c********************************************************************* c c Subroutine for computing jpo4, jdop, jo2, jdic and jalk in units of c mol/m^3/s. Numbers in brackets refer to equations in simulation c design document. c c********************************************************************* c c Variables in common with main program c include 'bio.h' c real jprod(kc), jca(km), f(km), fca(km) c c Compute phosphate uptake in surface layers as a result of c restoring towards observations. Allow for likelihood c that grid box interface will not lie exactly at compensation c depth. [24] c do k=1,kc if (tb(k,1) .gt. po4star(k)) then jprod(k) = (tb(k,1) - po4star(k))/tau else jprod(k) = 0.0 endif enddo jprod(kc) = jprod(kc)*(zc - z(kc-1))/dz(kc) c c Compute DOP source/sink term everywhere. [25] c do k=1,kc jdop(k) = sigma*jprod(k) - kappa*tb(k,2) enddo c do k=kcp1,kmt jdop(k) = -kappa*tb(k,2) enddo c c Compute particulate P flux at compensation depth. [26] c fc = 0.0 do k=1,kc fc = fc + (1.0-sigma)*jprod(k)*dz(k) enddo c c Do the same for the bottom of all grid boxes below compensation c depth. [27] c do k=kc,kmt f(k) = fc*zforg(k) enddo c c Compute phosphate source/sink term. Make sure material hitting c bottom is remineralized in bottom box. [28] (Note that the sigma c in equation 28a in the document should be removed.) c do k=1,kc jpo4(k) = -jprod(k) + kappa*tb(k,2) enddo c jpo4(kc) = jpo4(kc) + (fc - f(kc))/dz(kc) c do k=kcp1,kmt jpo4(k) = (f(k-1) - f(k))/dz(k) + kappa*tb(k,2) enddo jpo4(kmt) = jpo4(kmt) + f(kmt)/dz(kmt) c c Compute oxygen source/sink term. [30] c do k=1,kmt if (tb(k,3) .gt. o2min) then jo2(k) = -ro2p*jpo4(k) else jo2(k) = 0.0 endif enddo c c Compute formation of calcium carbonate above compensation depth [31a] c Note that a minus sign is missing in front of the right hand side of c Equation 31a in the document. c do k=1,kc jca(k) = -r*rcp*(1.0-sigma)*jprod(k) enddo c c Compute flux of calcium carbonate at compensation depth and at c bottom of all grid boxes below compesation depth [32] c fcca = r*rcp*fc c do k=kc,kmt fca(k) = fcca*zfca(k) enddo c c Compute dissolution of calcium carbonate below compensation c depth. [31b] c jca(kc) = jca(kc) + (fcca - fca(kc))/dz(kc) c do k=kcp1,kmt jca(k) = (fca(k-1) - fca(k))/dz(k) enddo jca(kmt) = jca(kmt) + fca(kmt)/dz(kmt) c c Compute source/sink terms for DIC and Alk. [33] and [34]. c do k=1,kmt jdic(k) = rcp*jpo4(k) + jca(k) jalk(k) = -rnp*jpo4(k) + 2.0*jca(k) enddo c return end