1 |
#include "DIC_OPTIONS.h" |
2 |
#include "GCHEM_OPTIONS.h" |
3 |
|
4 |
CStartOfInterFace |
5 |
SUBROUTINE BIO_EXPORT( PTR_PO4 , |
6 |
#ifdef ALLOW_FE |
7 |
I PTR_FE, |
8 |
#endif |
9 |
I bioac, |
10 |
I bi,bj,imin,imax,jmin,jmax, |
11 |
I myIter,myTime,myThid) |
12 |
|
13 |
C /==========================================================\ |
14 |
C | SUBROUTINE BIO_EXPORT | |
15 |
C | o Calculate biological activity and export | |
16 |
C |==========================================================| |
17 |
IMPLICIT NONE |
18 |
|
19 |
C == GLobal variables == |
20 |
#include "SIZE.h" |
21 |
#include "DYNVARS.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "GRID.h" |
25 |
#include "DIC_ABIOTIC.h" |
26 |
#include "DIC_BIOTIC.h" |
27 |
|
28 |
C == Routine arguments == |
29 |
INTEGER myIter |
30 |
_RL myTime |
31 |
INTEGER myThid |
32 |
_RL PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
33 |
#ifdef ALLOW_FE |
34 |
_RL PTR_FE(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
35 |
#endif |
36 |
_RL bioac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR) |
37 |
_RL sfac(1-OLy:sNy+OLy) |
38 |
_RL lit, atten |
39 |
INTEGER imin, imax, jmin, jmax, bi, bj |
40 |
|
41 |
#ifdef ALLOW_PTRACERS |
42 |
#ifdef DIC_BIOTIC |
43 |
C == Local variables == |
44 |
INTEGER I,J,k |
45 |
c |
46 |
call insol(myTime,sfac,bj) |
47 |
DO j=1-OLy,sNy+OLy |
48 |
DO i=1-OLx,sNx+OLx |
49 |
C Fortran-90 |
50 |
CRG C$TAF INIT bio_export = static, nlev |
51 |
C FORTRAN-77 dynamic memory uses adstore adresto |
52 |
CRG C$TAF INIT bio_export = memory |
53 |
C FORTRAN-77 with know max of nlev |
54 |
C$TAF INIT bio_export = static, 10 |
55 |
lit=sfac(j) |
56 |
DO k=1,nlev |
57 |
C$TAF STORE lit = bio_export |
58 |
atten=(k0*drF(k)*.5) |
59 |
if (k.gt.1) atten=(k0*drF(k-1)*.5) |
60 |
lit=lit*exp(-atten)*(1.d0-Fice(i,j,bi,bj)) |
61 |
if (lit.lt.0.d0.or.lit.gt.150) then |
62 |
print*,'QQ lit', lit |
63 |
endif |
64 |
bioac(i,j,k)=alpha(i,j,bi,bj)* |
65 |
& PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4)* |
66 |
#ifdef ALLOW_FE |
67 |
& PTR_FE(i,j,k)/(PTR_FE(i,j,k)+KFE)* |
68 |
#endif |
69 |
& lit/(lit+lit0)*maskC(i,j,k,bi,bj) |
70 |
ENDDO |
71 |
ENDDO |
72 |
ENDDO |
73 |
c |
74 |
#endif |
75 |
#endif |
76 |
RETURN |
77 |
END |