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

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

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

revision 1.2 by mmazloff, Sun Feb 28 21:49:24 2016 UTC revision 1.4 by mmazloff, Sun May 15 00:30:35 2016 UTC
# Line 196  c  Initialize output and diagnostics Line 196  c  Initialize output and diagnostics
196                mu_diaz(i,j,k)      = 0. _d 0                mu_diaz(i,j,k)      = 0. _d 0
197                irr_eff(i,j,k)      = 0. _d 0                irr_eff(i,j,k)      = 0. _d 0
198                irr_inst(i,j,k)     = 0. _d 0                irr_inst(i,j,k)     = 0. _d 0
199                  irrk(i,j,k)         = 0. _d 0
200                  NO3_lim(i,j,k)      = 0. _d 0
201                  PO4_lim(i,j,k)      = 0. _d 0
202                  Fe_lim(i,j,k)       = 0. _d 0
203                  Fe_lim_diaz(i,j,k)  = 0. _d 0
204                PtoN(i,j,k)         = 0. _d 0                PtoN(i,j,k)         = 0. _d 0
205                FetoN(i,j,k)        = 0. _d 0                FetoN(i,j,k)        = 0. _d 0
206                NPP(i,j,k)          = 0. _d 0                NPP(i,j,k)          = 0. _d 0
# Line 217  c  advection when low concentrations Line 222  c  advection when low concentrations
222        CALL TRACER_MIN_VAL( PTR_NO3, 1. _d -7)        CALL TRACER_MIN_VAL( PTR_NO3, 1. _d -7)
223        CALL TRACER_MIN_VAL( PTR_PO4, 1. _d -8)        CALL TRACER_MIN_VAL( PTR_PO4, 1. _d -8)
224        CALL TRACER_MIN_VAL( PTR_FE, 1. _d -11)        CALL TRACER_MIN_VAL( PTR_FE, 1. _d -11)
225          CALL TRACER_MIN_VAL( PTR_O2,  1. _d -11)
226          CALL TRACER_MIN_VAL( PTR_DON, 1. _d -11)
227          CALL TRACER_MIN_VAL( PTR_DOP, 1. _d -11)
228  #endif  #endif
229    
   
230  c-----------------------------------------------------------  c-----------------------------------------------------------
231  c  mixed layer depth calculation for light and dvm  c  mixed layer depth calculation for light and dvm
232  c  c
# Line 228  c Line 235  c
235       I                         bi, bj, imin, imax, jmin, jmax,       I                         bi, bj, imin, imax, jmin, jmax,
236       I                         myIter, myTime, myThid)       I                         myIter, myTime, myThid)
237    
   
238  c  Phytoplankton mixing  c  Phytoplankton mixing
239  c  The mixed layer is assumed to homogenize vertical gradients of phytoplankton.  c  The mixed layer is assumed to homogenize vertical gradients of phytoplankton.
240  c  This allows for basic Sverdrup dynamics in a qualitative sense.  c  This allows for basic Sverdrup dynamics in a qualitative sense.
241  c  This has not been thoroughly tested, and care should be  c  This has not been thoroughly tested, and care should be
242  c  taken with its interpretation.  c  taken with its interpretation.
243    
244    
245  #ifdef ML_MEAN_PHYTO      #ifdef ML_MEAN_PHYTO    
246        DO j=jmin,jmax        DO j=jmin,jmax
247         DO i=imin,imax           DO i=imin,imax  
# Line 289  c  light availability for biological pro Line 296  c  light availability for biological pro
296       I               bi, bj, imin, imax, jmin, jmax,       I               bi, bj, imin, imax, jmin, jmax,
297       I               myIter, myTime, myThid )       I               myIter, myTime, myThid )
298    
           
   
299  c  phytoplankton photoadaptation to local light level  c  phytoplankton photoadaptation to local light level
300        DO k=1,Nr        DO k=1,Nr
301         DO j=jmin,jmax         DO j=jmin,jmax
# Line 304  c  phytoplankton photoadaptation to loca Line 309  c  phytoplankton photoadaptation to loca
309         ENDDO         ENDDO
310        ENDDO        ENDDO
311    
   
312  c ---------------------------------------------------------------------  c ---------------------------------------------------------------------
313  c  Nutrient uptake and partitioning between organic pools  c  Nutrient uptake and partitioning between organic pools
314    
 C!! needed??  
 C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte  
   
315        DO k=1,Nr        DO k=1,Nr
316         DO j=jmin,jmax         DO j=jmin,jmax
317          DO i=imin,imax            DO i=imin,imax  
# Line 351  c Taking the square root, to provide the Line 350  c Taking the square root, to provide the
350    
351  c  Light-saturated maximal photosynthesis rate    c  Light-saturated maximal photosynthesis rate  
352    
 c          Pc_m = Pc_0 * expkT(i,j,k)  
 c     &           * max(1. _d -8, NO3_lim(i,j,k) * PO4_lim(i,j,k)  
 c     &           * Fe_lim(i,j,k))**(1. / 3.)  
 c     &           * maskC(i,j,k,bi,bj)  
 c  
 c          Pc_m_diaz = Pc_0_diaz    
 c     &           * exp(kappa_eppley_diaz * theta(i,j,k,bi,bj))  
 c     &           * max(1. _d -8, PO4_lim(i,j,k)  
 c     &           * Fe_lim_diaz(i,j,k))**(1. / 2.)  
 c     &           * maskC(i,j,k,bi,bj)  
   
   
353  #ifdef BLING_ADJOINT_SAFE_tmp_xxxxxxxxxxxxxxxxxx_needs_testing  #ifdef BLING_ADJOINT_SAFE_tmp_xxxxxxxxxxxxxxxxxx_needs_testing
354            th1 = tanh( (NO3_lim(i,j,k)-PO4_lim(i,j,k))*1. _d 6 )            th1 = tanh( (NO3_lim(i,j,k)-PO4_lim(i,j,k))*1. _d 6 )
355            nut_lim = ( 1. _d 0 - th1 ) * NO3_lim(i,j,k) * 0.5 _d 0            nut_lim = ( 1. _d 0 - th1 ) * NO3_lim(i,j,k) * 0.5 _d 0
# Line 395  c     &           * maskC(i,j,k,bi,bj) Line 382  c     &           * maskC(i,j,k,bi,bj)
382       &           * min(PO4_lim(i,j,k), Fe_lim_diaz(i,j,k))       &           * min(PO4_lim(i,j,k), Fe_lim_diaz(i,j,k))
383       &           * maskC(i,j,k,bi,bj)       &           * maskC(i,j,k,bi,bj)
384    
385    CMM( Pc_m and Pc_m_diaz crash adjoint if get too small
386    #ifdef BLING_ADJOINT_SAFE
387              Pc_m      = MAX(Pc_m     ,maskC(i,j,k,bi,bj)*1. _d -15)
388              Pc_m_diaz = MAX(Pc_m_diaz,maskC(i,j,k,bi,bj)*1. _d -15)
389    #endif
390    CMM)
391  #endif  #endif
392    
393    
# Line 433  c  Carbon-specific photosynthesis rate Line 426  c  Carbon-specific photosynthesis rate
426         ENDDO         ENDDO
427        ENDDO        ENDDO
428    
   
 C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte  
 Cxx needed?  
   
429  c  Instantaneous nutrient concentration in phyto biomass  c  Instantaneous nutrient concentration in phyto biomass
430  c  Separate loop so adjoint stuff above can be outside loop  c  Separate loop so adjoint stuff above can be outside loop
431  c  (fix for recomputations)  c  (fix for recomputations)
432    CMM(
433    CADJ STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte
434    CADJ STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte
435    CADJ STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte
436    CMM)
437        DO k=1,Nr        DO k=1,Nr
438         DO j=jmin,jmax         DO j=jmin,jmax
439          DO i=imin,imax          DO i=imin,imax
# Line 472  c          expkT = exp(kappa_eppley * th Line 463  c          expkT = exp(kappa_eppley * th
463         ENDDO         ENDDO
464        ENDDO        ENDDO
465    
 C$TAF STORE P_sm = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_lg = comlev1, key = ikey_dynamics, kind=isbyte  
 C$TAF STORE P_diaz = comlev1, key = ikey_dynamics, kind=isbyte  
 cxx needed?  
   
   
466        DO k=1,Nr        DO k=1,Nr
467         DO j=jmin,jmax         DO j=jmin,jmax
468          DO i=imin,imax          DO i=imin,imax
# Line 602  c  remineralization of sinking organic m Line 587  c  remineralization of sinking organic m
587       I                 bi, bj, imin, imax, jmin, jmax,       I                 bi, bj, imin, imax, jmin, jmax,
588       I                 myIter, myTime, myThid)       I                 myIter, myTime, myThid)
589    
   
590  c-----------------------------------------------------------  c-----------------------------------------------------------
591  c  remineralization from diel vertical migration  c  remineralization from diel vertical migration
592         CALL BLING_DVM(         CALL BLING_DVM(

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

  ViewVC Help
Powered by ViewVC 1.1.22