1 |
#include "CPP_OPTIONS.h" |
2 |
#include "GCHEM_OPTIONS.h" |
3 |
|
4 |
#ifdef ALLOW_FE |
5 |
CStartOfInterFace |
6 |
SUBROUTINE Fe_CHEM( |
7 |
I bi,bj,iMin,iMax,jMin,jMax, |
8 |
I fe, freefe, |
9 |
I myIter, myThid ) |
10 |
C /==========================================================\ |
11 |
C | SUBROUTINE Fe_chem | |
12 |
C | | |
13 |
C | o Calculate L,FeL,Fe concentration | |
14 |
C |==========================================================| |
15 |
IMPLICIT NONE |
16 |
|
17 |
C == GLobal variables == |
18 |
#include "SIZE.h" |
19 |
#include "DYNVARS.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
23 |
#include "DIC_BIOTIC.h" |
24 |
#include "PTRACERS.h" |
25 |
|
26 |
C == Routine arguments == |
27 |
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
28 |
C results will be set. |
29 |
C myThid - Instance number for this innvocation of CALC_GT |
30 |
_RL freefe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
31 |
_RL fe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
32 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
33 |
INTEGER myIter,myThid |
34 |
CEndOfInterface |
35 |
|
36 |
|
37 |
INTEGER I,J,K |
38 |
_RL lig, FeL |
39 |
|
40 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
41 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
42 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
43 |
CC |
44 |
CC ADAPTED FROM PAYAL |
45 |
CC |
46 |
CC |
47 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
48 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
49 |
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc |
50 |
|
51 |
C ligand balance in surface layer |
52 |
C in surface layer |
53 |
|
54 |
DO j=jMin,jMax |
55 |
DO i=iMin,iMax |
56 |
DO k=1,nR |
57 |
IF(hFacC(i,j,k,bi,bj) .gt. 0.0)THEN |
58 |
|
59 |
C Ligand,FeL,Fe calculation |
60 |
|
61 |
lig=(-ligand_stab*fe (i,j,k,bi,bj)+ |
62 |
& ligand_stab*ligand_tot-1 |
63 |
& +((ligand_stab*fe (i,j,k,bi,bj) |
64 |
& -ligand_stab*ligand_tot+1)**2+4 |
65 |
& *ligand_stab*ligand_tot)**0.5)/(2*ligand_stab) |
66 |
|
67 |
FeL = ligand_tot-lig |
68 |
freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL |
69 |
END IF |
70 |
ENDDO |
71 |
ENDDO |
72 |
ENDDO |
73 |
c |
74 |
RETURN |
75 |
END |
76 |
#endif |