/[MITgcm]/MITgcm/pkg/dic/fe_chem.F
ViewVC logotype

Diff of /MITgcm/pkg/dic/fe_chem.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10 by dfer, Fri Oct 26 21:08:13 2007 UTC revision 1.12 by dfer, Fri Apr 4 21:37:06 2008 UTC
# Line 22  C     == GLobal variables == Line 22  C     == GLobal variables ==
22  #include "EEPARAMS.h"  #include "EEPARAMS.h"
23  #include "PARAMS.h"  #include "PARAMS.h"
24  #include "GRID.h"  #include "GRID.h"
25  #include "DIC_BIOTIC.h"  #include "DIC_VARS.h"
26    
27  C     == Routine arguments ==                  C     == Routine arguments ==                
28  C     bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation  C     bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation
# Line 41  CEndOfInterface Line 41  CEndOfInterface
41    
42        INTEGER I,J,K        INTEGER I,J,K
43        _RL  lig, FeL        _RL  lig, FeL
44          _RL  tmpfe
45    
46  CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc  CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc
47  CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc  CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc
# Line 61  C in surface layer Line 62  C in surface layer
62           DO k=1,Nr           DO k=1,Nr
63            IF (hFacC(i,j,k,bi,bj) .GT. 0. _d 0) THEN            IF (hFacC(i,j,k,bi,bj) .GT. 0. _d 0) THEN
64    
65  C   Ligand,FeL,Fe calculation  #ifdef DIC_NO_NEG
66                  tmpfe=max(0. _d0 , fe (i,j,k,bi,bj))
67    #else
68                  tmpfe=fe (i,j,k,bi,bj)
69    #endif
70                            
71                lig=(-ligand_stab*fe (i,j,k,bi,bj)+  C   Ligand,FeL,Fe calculation
72                  lig=(-ligand_stab*tmpfe +
73       &              ligand_stab*ligand_tot-1. _d 0       &              ligand_stab*ligand_tot-1. _d 0
74       &             +((ligand_stab*fe (i,j,k,bi,bj)       &             +((ligand_stab*tmpfe
75       &                -ligand_stab*ligand_tot+1. _d 0)**2       &                -ligand_stab*ligand_tot+1. _d 0)**2
76       &               +4. _d 0*ligand_stab*ligand_tot)**0.5 _d 0       &               +4. _d 0*ligand_stab*ligand_tot)**0.5 _d 0
77       &            )/(2. _d 0*ligand_stab)       &            )/(2. _d 0*ligand_stab)
78    
79                FeL = ligand_tot-lig                FeL = ligand_tot-lig
80                freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL                if (tmpfe.eq.0. _d 0) then
81                    freefe(i,j,k,bi,bj) = tmpfe -FeL
82                  else
83                    freefe(i,j,k,bi,bj) = 0. _d 0
84                  endif
85  #ifdef MINFE  #ifdef MINFE
86  #ifdef AD_SAFE  #ifdef AD_SAFE
87                thx=freefe(i,j,k,bi,bj)                thx=freefe(i,j,k,bi,bj)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22