/[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.4 by mmazloff, Thu May 19 20:00:53 2016 UTC
# Line 340  C!! I'm replacing hblt_depth(i,j) with m Line 340  C!! I'm replacing hblt_depth(i,j) with m
340    
341  #else  #else
342    
343          z_dvm_regr = 398. _d 0 - 0.56 _d 0*min(300. _d 0,          z_dvm_regr = 398. _d 0
344       & max(-10. _d 0,(o2_upper - o2_lower))) -       &   - 0.56 _d 0*min(300. _d 0,max(-10. _d 0,(o2_upper - o2_lower)))
345       & 115. _d 0*min(0.85 _d 0,max(-1.80 _d 0,log10(chl(i,j,1,bi,bj))))       &   - 115. _d 0*min(0.85 _d 0,max(-1.80 _d 0,
346       &  + 0.36 _d 0*min(500. _d 0,max(epsln,mld(i,j))) -       &                            log10(max(chl(i,j,1,bi,bj),chl_min))))
347       &  2.4 _d 0*min(20. _d 0,max(-3. _d 0, (temp_upper - temp_lower)))       &   + 0.36 _d 0*min(500. _d 0,max(epsln,mld(i,j)))
348         &   - 2.40 _d 0*min(20. _d 0,max(-3. _d 0,(temp_upper-temp_lower)))
349          ! Limit the depth of migration in polar winter.  
350          ! Use irr_mem since this is averaged over multiple days, dampening the diurnal cycle.  c        ! Limit the depth of migration in polar winter.
351          ! Tapers Z_DVM to the minimum when surface irradince is below a given threshold (here 10 W/m2).  c        ! Use irr_mem since this is averaged over multiple days, dampening the diurnal cycle.
352    c        ! Tapers Z_DVM to the minimum when surface irradince is below a given threshold (here 10 W/m2).
353    
354          if ( irr_mem(i,j,1,bi,bj) .lt. 10. ) then                                if ( irr_mem(i,j,1,bi,bj) .lt. 10. ) then                      
355            z_dvm_regr = 150. _d 0 + (z_dvm_regr - 150. _d 0) *            z_dvm_regr = 150. _d 0 + (z_dvm_regr - 150. _d 0) *
# Line 362  C requirement for aerobic DVM respiratio Line 363  C requirement for aerobic DVM respiratio
363  C water, where O2 is available.  C water, where O2 is available.
364    
365          tmp = 0          tmp = 0
366          DO k=1,Nr          DO k=1,Nr-2
367    
368           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
369    
# Line 413  c          fdvm_stat = (1. - frac_migr) Line 414  c          fdvm_stat = (1. - frac_migr)
414  c     &        ( (epsln + 2. * sigma_dvm**2.)**0.5))  c     &        ( (epsln + 2. * sigma_dvm**2.)**0.5))
415    
416    
417    ! Approximation of the complementary error function  c  ! Approximation of the complementary error function
418    ! From Numerical Recipes (F90, Ch. 6, p. 216)  c  ! From Numerical Recipes (F90, Ch. 6, p. 216)
419    ! Returns the complementary error function erfc(x) with fractional error everywhere less than 1.2e-7      c  ! Returns the complementary error function erfc(x)
420    c    with fractional error everywhere less than 1.2e-7    
421             x_erfcc = (-rf(k) - z_dvm) /             x_erfcc = (-rf(k) - z_dvm) /
422       &        ( (epsln + 2. _d 0 * sigma_dvm**2. _d 0)**0.5)       &        ( (epsln + 2. _d 0 * sigma_dvm**2. _d 0)**0.5)
423    
# Line 441  C current layer is the bottom layer, or Line 443  C current layer is the bottom layer, or
443  C underlying layer is suboxic, all fluxes at and below the current  C underlying layer is suboxic, all fluxes at and below the current
444  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
445  C remaining DVM remineralization to occur in this layer.  C remaining DVM remineralization to occur in this layer.
446              IF (k.LT.NR-1) THEN
447            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
448              ENDIF
449  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  
             
450            dvm(i,j,k)  = fdvm_migr + fdvm_stat            dvm(i,j,k)  = fdvm_migr + fdvm_stat
451                        
452           ENDIF           ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22