1 |
#include "DIC_OPTIONS.h" |
2 |
#include "GCHEM_OPTIONS.h" |
3 |
|
4 |
CBOP |
5 |
C !ROUTINE: BIO_EXPORT |
6 |
|
7 |
C !INTERFACE: ========================================================== |
8 |
SUBROUTINE BIO_EXPORT( PTR_PO4 , |
9 |
#ifdef ALLOW_FE |
10 |
I PTR_FE, |
11 |
#endif |
12 |
I bioac, |
13 |
I bi,bj,imin,imax,jmin,jmax, |
14 |
I myIter,myTime,myThid) |
15 |
|
16 |
c !DESCRIPTION: |
17 |
C Calculate biological activity and export |
18 |
|
19 |
C !USES: =============================================================== |
20 |
IMPLICIT NONE |
21 |
#include "SIZE.h" |
22 |
#include "DYNVARS.h" |
23 |
#include "EEPARAMS.h" |
24 |
#include "PARAMS.h" |
25 |
#include "GRID.h" |
26 |
#include "DIC_ABIOTIC.h" |
27 |
#include "DIC_BIOTIC.h" |
28 |
|
29 |
C !INPUT PARAMETERS: =================================================== |
30 |
C myThid :: thread number |
31 |
C myIter :: current timestep |
32 |
C myTime :: current time |
33 |
C PTR_PO4 :: phosphate tracer field |
34 |
C PTR_FE :: iron tracer field |
35 |
INTEGER myIter |
36 |
_RL myTime |
37 |
INTEGER myThid |
38 |
_RL PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
39 |
#ifdef ALLOW_FE |
40 |
_RL PTR_FE(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
41 |
#endif |
42 |
INTEGER imin, imax, jmin, jmax, bi, bj |
43 |
|
44 |
|
45 |
C !OUTPUT PARAMETERS: ================================================== |
46 |
C bioac :: biological productivity (will be split |
47 |
C between export and dissolved pool) |
48 |
_RL bioac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR) |
49 |
|
50 |
#ifdef ALLOW_PTRACERS |
51 |
#ifdef DIC_BIOTIC |
52 |
|
53 |
C !LOCAL VARIABLES: ==================================================== |
54 |
C i,j,k :: loop indices |
55 |
INTEGER I,J,k |
56 |
_RL sfac(1-OLy:sNy+OLy) |
57 |
_RL lit, atten |
58 |
CEOP |
59 |
call insol(myTime,sfac,bj) |
60 |
DO j=1-OLy,sNy+OLy |
61 |
DO i=1-OLx,sNx+OLx |
62 |
C Fortran-90 |
63 |
CRG C$TAF INIT bio_export = static, nlev |
64 |
C FORTRAN-77 dynamic memory uses adstore adresto |
65 |
CRG C$TAF INIT bio_export = memory |
66 |
C FORTRAN-77 with know max of nlev |
67 |
C$TAF INIT bio_export = static, 10 |
68 |
lit=sfac(j) |
69 |
DO k=1,nlev |
70 |
C$TAF STORE lit = bio_export |
71 |
atten=(k0*drF(k)*.5) |
72 |
if (k.gt.1) atten=atten+(k0*drF(k-1)*.5) |
73 |
lit=lit*exp(-atten)*(1.d0-Fice(i,j,bi,bj)) |
74 |
if (lit.lt.0.d0.or.lit.gt.150) then |
75 |
print*,'QQ lit', lit |
76 |
endif |
77 |
bioac(i,j,k)=alpha(i,j,bi,bj)* |
78 |
& lit/(lit+lit0)*maskC(i,j,k,bi,bj)* |
79 |
#ifdef ALLOW_FE |
80 |
& min(PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4), |
81 |
& PTR_FE(i,j,k)/(PTR_FE(i,j,k)+KFE) ) |
82 |
#else |
83 |
& PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+KPO4) |
84 |
#endif |
85 |
ENDDO |
86 |
ENDDO |
87 |
ENDDO |
88 |
c |
89 |
#endif |
90 |
#endif |
91 |
RETURN |
92 |
END |