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

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

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

revision 1.2 by mmazloff, Sun May 15 00:30:35 2016 UTC revision 1.3 by mmazloff, Thu May 19 16:30:00 2016 UTC
# Line 362  C requirement for aerobic DVM respiratio Line 362  C requirement for aerobic DVM respiratio
362  C water, where O2 is available.  C water, where O2 is available.
363    
364          tmp = 0          tmp = 0
365          DO k=1,Nr          DO k=1,Nr-2
366    
367           IF ( (hFacC(i,j,k,bi,bj).gt.0. _d 0) .and. (tmp.eq.0)) THEN           IF ( (hFacC(i,j,k,bi,bj).gt.0. _d 0) .and. (tmp.eq.0)) THEN
368    
# Line 413  c          fdvm_stat = (1. - frac_migr) Line 413  c          fdvm_stat = (1. - frac_migr)
413  c     &        ( (epsln + 2. * sigma_dvm**2.)**0.5))  c     &        ( (epsln + 2. * sigma_dvm**2.)**0.5))
414    
415    
416    ! Approximation of the complementary error function  c  ! Approximation of the complementary error function
417    ! From Numerical Recipes (F90, Ch. 6, p. 216)  c  ! From Numerical Recipes (F90, Ch. 6, p. 216)
418    ! Returns the complementary error function erfc(x) with fractional error everywhere less than 1.2e-7      c  ! Returns the complementary error function erfc(x)
419    c    with fractional error everywhere less than 1.2e-7    
420             x_erfcc = (-rf(k) - z_dvm) /             x_erfcc = (-rf(k) - z_dvm) /
421       &        ( (epsln + 2. _d 0 * sigma_dvm**2. _d 0)**0.5)       &        ( (epsln + 2. _d 0 * sigma_dvm**2. _d 0)**0.5)
422    
# Line 441  C current layer is the bottom layer, or Line 442  C current layer is the bottom layer, or
442  C underlying layer is suboxic, all fluxes at and below the current  C underlying layer is suboxic, all fluxes at and below the current
443  C layer remain at the initialized value of zero. This will cause all  C layer remain at the initialized value of zero. This will cause all
444  C remaining DVM remineralization to occur in this layer.  C remaining DVM remineralization to occur in this layer.
445              IF (k.LT.NR-1) THEN
446            if (PTR_O2(i,j,k+2) .lt. (5. _d 0*oxic_min)) tmp = 1              if (PTR_O2(i,j,k+2) .lt. (5. _d 0*oxic_min)) tmp = 1
447              ENDIF
448  c!!          if (k .eq. grid_kmt(i,j)) exit  c!!          if (k .eq. grid_kmt(i,j)) exit
           if (hFacC(i,j,k+1,bi,bj) .eq. 0) tmp = 1  
             
449            dvm(i,j,k)  = fdvm_migr + fdvm_stat            dvm(i,j,k)  = fdvm_migr + fdvm_stat
450                        
451           ENDIF           ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22