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