/[MITgcm]/MITgcm_contrib/bling/pkg/bling_remineralization.F
ViewVC logotype

Diff of /MITgcm_contrib/bling/pkg/bling_remineralization.F

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

revision 1.3 by mmazloff, Sun May 15 00:30:35 2016 UTC revision 1.4 by mmazloff, Thu May 19 16:30:00 2016 UTC
# Line 106  C     P_recycle     :: recycling of newl Line 106  C     P_recycle     :: recycling of newl
106  C     Fe_recycle    :: recycling of newly-produced organic iron  C     Fe_recycle    :: recycling of newly-produced organic iron
107  c xxx to be completed  c xxx to be completed
108        INTEGER i,j,k                INTEGER i,j,k        
109          INTEGER bttmlyr
110        _RL PONflux_u        _RL PONflux_u
111        _RL POPflux_u        _RL POPflux_u
112        _RL PFEflux_u        _RL PFEflux_u
# Line 195  C  Initialize upper flux Line 196  C  Initialize upper flux
196          PFEflux_u            = 0. _d 0          PFEflux_u            = 0. _d 0
197          CaCO3flux_u          = 0. _d 0          CaCO3flux_u          = 0. _d 0
198    
 c C$TAF init remin_stuff = static, Nr  
   
199          DO k=1,Nr          DO k=1,Nr
200    
201           Fe_ads_org   = 0. _d 0           Fe_ads_org   = 0. _d 0
202    
203    C ARE WE ON THE BOTTOM
204             bttmlyr = 1
205              IF (k.LT.Nr) THEN
206               IF (hFacC(i,j,k+1,bi,bj).GT.0) bttmlyr = 0
207    C          we are not yet at the bottom
208              ENDIF
209    
210           IF ( hFacC(i,j,k,bi,bj).gt.0. _d 0 ) THEN           IF ( hFacC(i,j,k,bi,bj).gt.0. _d 0 ) THEN
211    
212  C  Sinking speed is evaluated at the bottom of the cell  C  Sinking speed is evaluated at the bottom of the cell
# Line 239  C  CaCO3 flux leaving the cell Line 246  C  CaCO3 flux leaving the cell
246       &           *hFacC(i,j,k,bi,bj))       &           *hFacC(i,j,k,bi,bj))
247  C!! multiply by intercept_frac ???  C!! multiply by intercept_frac ???
248    
   
249  C  Start with cells that are not the deepest cells  C  Start with cells that are not the deepest cells
250            IF ((k.LT.Nr) .AND. (hFacC(i,j,k+1,bi,bj).GT.0)) THEN            IF (bttmlyr.EQ.0) THEN
   
251  C  Nutrient accumulation in a cell is given by the biological production  C  Nutrient accumulation in a cell is given by the biological production
252  C  (and instant remineralization) of particulate organic matter  C  (and instant remineralization) of particulate organic matter
253  C  plus flux thought upper interface minus flux through lower interface.  C  plus flux thought upper interface minus flux through lower interface.
# Line 257  C  (Since not deepest cell: hFacC=1) Line 262  C  (Since not deepest cell: hFacC=1)
262       &                    *drF(k) - CaCO3flux_l)*recip_drF(k)       &                    *drF(k) - CaCO3flux_l)*recip_drF(k)
263    
264             Fe_sed(i,j,k) = 0. _d 0             Fe_sed(i,j,k) = 0. _d 0
265    C NOW DO BOTTOM LAYER
   
266            ELSE            ELSE
267  C  If this layer is adjacent to bottom topography or it is the deepest  C  If this layer is adjacent to bottom topography or it is the deepest
268  C  cell of the domain, then remineralize/dissolve in this grid cell  C  cell of the domain, then remineralize/dissolve in this grid cell
# Line 284  C  Maximum value added for numerical sta Line 288  C  Maximum value added for numerical sta
288             Fe_sed(i,j,k) = min(1. _d -11,             Fe_sed(i,j,k) = min(1. _d -11,
289       &            max(epsln, FetoC_sed * POC_sed * recip_drF(k)       &            max(epsln, FetoC_sed * POC_sed * recip_drF(k)
290       &            *recip_hFacC(i,j,k,bi,bj)))       &            *recip_hFacC(i,j,k,bi,bj)))
291                  
292  #ifdef BLING_ADJOINT_SAFE  #ifdef BLING_ADJOINT_SAFE
293             Fe_sed(i,j,k) = 0. _d 0             Fe_sed(i,j,k) = 0. _d 0
294  #endif  #endif

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22