/[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.8 by stephd, Fri Dec 16 21:07:53 2005 UTC revision 1.9 by stephd, Tue Nov 28 21:16:03 2006 UTC
# Line 23  C     == GLobal variables == Line 23  C     == GLobal variables ==
23  #include "PARAMS.h"  #include "PARAMS.h"
24  #include "GRID.h"  #include "GRID.h"
25  #include "DIC_BIOTIC.h"  #include "DIC_BIOTIC.h"
 #include "PTRACERS_SIZE.h"  
 #include "PTRACERS.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 34  C     myThid - Instance number for this Line 32  C     myThid - Instance number for this
32        _RL  fe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL  fe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
33        INTEGER bi,bj,iMin,iMax,jMin,jMax        INTEGER bi,bj,iMin,iMax,jMin,jMax
34        INTEGER myIter,myThid        INTEGER myIter,myThid
35    #ifdef AD_SAFE
36          _RL thx, thy, theps
37    #endif
38  CEndOfInterface  CEndOfInterface
39    
40  #ifdef ALLOW_FE  #ifdef ALLOW_FE
# Line 71  C   Ligand,FeL,Fe calculation Line 72  C   Ligand,FeL,Fe calculation
72                FeL = ligand_tot-lig                FeL = ligand_tot-lig
73                freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL                freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL
74  #ifdef MINFE  #ifdef MINFE
75    #ifdef AD_SAFE
76                  thx=freefe(i,j,k,bi,bj)
77                  thy=freefemax
78                  theps=1.d-8
79                  freefe(i,j,k,bi,bj) =
80         &                 ( 1.d0 - tanh((thx-thy)/theps) ) * thx/2 +
81         &                 ( 1.d0 + tanh((thx-thy)/theps) ) * thy/2
82    
83    #else
84                freefe(i,j,k,bi,bj) = min(freefe(i,j,k,bi,bj),freefemax)                freefe(i,j,k,bi,bj) = min(freefe(i,j,k,bi,bj),freefemax)
85    #endif
86                fe(i,j,k,bi,bj) = FeL+freefe(i,j,k,bi,bj)                fe(i,j,k,bi,bj) = FeL+freefe(i,j,k,bi,bj)
87  #endif  #endif
88            END IF              END IF  

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22