!  Nutrient-Phytoplankton-Zooplankton-Detritus Biological Model Parameters.
!output
!svn $Id: npzd_Powell.in 1396 2011-04-01 22:28:53Z kate $
!========================================================= Hernan G. Arango ===
!  Copyright (c) 2002-2011 The ROMS/TOMS Group                                !
!    Licensed under a MIT/X style license                                     !
!    See License_ROMS.txt                                                     !
!==============================================================================
!                                                                             !
! Input parameters can be entered in ANY order, provided that the parameter   !
! KEYWORD (usually, upper case) is typed correctly followed by "="  or "=="   !
! symbols. Any comment lines are allowed and must begin with an exclamation   !
! mark (!) in column one.  Comments may  appear to the right of a parameter   !
! specification to improve documentation.  Comments will be ignored  during   !
! reading.  Blank lines are also allowed and ignored. Continuation lines in   !
! a parameter specification are allowed and must be preceded by a backslash   !
! (\).  In some instances, more than one value is required for a parameter.   !
! If fewer values are provided, the  last value  is assigned for the entire   !
! parameter array.  The multiplication symbol (*),  without blank spaces in   !
! between, is allowed for a parameter specification.  For example, in a two   !
! grids nested application:                                                   !
!                                                                             !
!    AKT_BAK == 2*1.0d-6  2*5.0d-6              ! m2/s                        !
!                                                                             !
! indicates that the first two entries of array AKT_BAK,  in fortran column-  !
! major order, will have the same value of "1.0d-6" for grid 1,  whereas the  !
! next two entries will have the same value of "5.0d-6" for grid 2.           !
!                                                                             !
! In multiple levels of nesting and/or multiple connected domains  step-ups,  !
! "Ngrids" entries are expected for some of these parameters.  In such case,  !
! the order of the entries for a parameter is extremely important.  It  must  !
! follow the same order (1:Ngrids) as in the state variable declaration. The  !
! USER may follow the above guidelines for specifying his/her values.  These  !
! parameters are marked by "==" plural symbol after the KEYWORD.              !
!                                                                             !
!==============================================================================
!
! NOTICE: Input parameter units are specified within brackets and default
! ******  values are specified within braces.
!
! Switch to control the computation of biology within nested and/or multiple
! connected grids.

    Lbiology == T

! Maximum number of iterations to achieve convergence of the nonlinear
! solution.

     BioIter == 1

! Initial concentration for analytical uniform initial conditions.
! [millimole/meter3].

BioIni(iNO3_) == 16.0d0                          ! nitrate
BioIni(iPhyt) == 1.0d0                           ! phytoplankton
BioIni(iZoop) == 1.0d0                           ! zooplankton
BioIni(iSDet) == 1.0d0                           ! detritus

! Fraction of shortwave radiation that is photosynthetically active
! (nondimensional), {0.43d0}.

     PARfrac == 0.43d0

! Light attenuation due to seawater [1/m], {0.067d0}.

       AttSW == 0.067d0                          ! k_ext

! Light attenuation due to phytoplankton, self-shading coefficient,
! [m2/millimole_N], {0.0095d0}.

      AttPhy == 0.0095d0                         ! k_extP

! Max nitrification rate: oxidation of NH4 to NO3 [1/day], {0.05d0}.
!cf. - (Chapelle et al. (2000) Ecolog. Modell 127, 161-181  

        NitriR == 0.1d0       !0.1d0


! Light limitation parameters of nitrification.
! Table 1 of Fennel et al. (2006) - Global Biogeochem. Cycles, 20, 
! GB3007, doi:10.1029/2005GB002456 
       KI == 0.1d0      ! W m-2 Light intensity at which the 
                        !inhibition of nitrification is half-saturated
       I0 == 0.0095d0   ! W m-2 Light intensity threshold for 
                        !light-inhibition of nitrification
       
! Denitrification rate: reduction of NO3 to NH4 and N2 [1/day], 
!(Chapelle et al. (2000) - Ecolog. Modell 80: 131-147)  

      kdenit == 0.0d0      !0.3d0


! Half-saturation constant for oxygen limitation of nitrification
! [mg O2 L-1], {4.00d0}, as in EcoDynamo model, 
!(Chapelle et al. (1995) - Ecolog. Modell 80: 131-147)

      knitO2 == 2.00d0


! Parameter of the oxygen inhibition denitrification function 
![mg O2 L-1], {2.00d0}, as in EcoDynamo model, 
!(Chapelle et al. (1995) - Ecolog. Modell 80: 131-147) 

     kdenitO2 == 2.00d0
  

! Temperature limiting factor for mineralization, nitrification, denitrification,...
! Degrees centigrades-1
!(Chapelle et al. (1995) - Ecolog. Modell 80: 131-147) 

      kt == 0.069d0

! Proportion of NH4 from denitrification (remaining fraction is N2)
! Dimensionless
!(Chapelle et al. (1995) - Ecolog. Modell 80: 131-147) 

      DenitNH4 == 1.0d0

! Fraction of dissolved organic nitrogen that is mineralized to ammonia
! Dimensionless
!(Chapelle et al. (1995) - Ecolog. Modell 80: 131-147) 

      MinToNH4 == 1.0d0


! Mineralization rate of particulate organic matter
!days-1
! Table 1 of Fennel et al. (2006) - Global Biogeochem. Cycles, 20,
! GB3007, doi:10.1029/2005GB002456, values for remineralization rate 
! of suspended detritus

      minRateC == 0.03d0           !0.03
      minRateN == 0.03d0           !0.03
      minRateP == 0.03d0           !0.03

! Oxygen half saturation constant for mineralization
!mg O2 / L
!Henriksen & Kemp (1988) fide Chapelle (1995,2000)
!Henriksen, K., Kemp. W.M., 1988. Nitrification in estuarine and coastal
!marine sediments. In: Backburn, T.H., Sorensen, J. (Eds.), Nitrogen
!cycling in coastal marine environments. John Wiley & Sons, New York, pp. 207-249.
  
      KminO2 == 0.5d0

! CO2 partial pressure in the air (parts per million by volume),
! {377.0d0}.

     pCO2air == 370.0d0
!Number of phytoplankton groups/taxa/species
      Phyto_groups == 2
!********************************************Generic phytoplankton (I am using it for flagellates for the time being)**********
! Phytoplankton, initial slope of P-I curve [mg C mg C-1 h-1 W m2], {0.025d0}.
! The value used here is based on Table S4 of Assmy et al. (2017) Sci. Rep. 7, 40850
! after multiplying the value of the mentioned table for P. pouchetii (0.09 mg C mg Chyl a-1 h-1 umol photons m2 s) by
! 0.014 mg Chl/mg C, which is the value given in Box 7.5 of Sakshaug et al. (2009) and then converting from micro Einsteins to W
! by dividing by 4.6 micro Einsteins W-1

      PhyIS == 0.000274d0                          ! 0.000654 (old value) alpha checked [mg C mg C-1 h-1 W m2]!

! Phytoplankton, negative slope of P-I curve [mg C mg C-1 h-1 W m2]
! The value used here is based on Table S4 of Assmy et al. (2017) Sci. Rep. 7, 40850
! after multiplying the value of the mentioned table for P. pouchetii (2.6X10-3 mg C mg Chyl a-1 h-1 umol photons m2 s) by
! 0.014 mg Chl/mg C, which is the value given in Box 7.5 of Sakshaug et al. (2009)



      Beta == 0.00000791304d0                        ! 0.0716 (old value) beta checked [mg C mg C-1 h-1 W m2]!

! Nitrate uptake rate, [1/day], {1.5d0}.

      Vm_NO3 == 1.5d0                           ! Vm

! Phytoplankton mortality rate to Detritus pool [1/day], {0.1d0}.

      PhyMRD == 0.1d0                            ! sigmaD

! Phytoplankton mortality rate to Nitrogen pool [1/day], {0.0d0}.

      PhyMRN == 0.0d0                            ! sigmaN

! Inverse half-saturation for phytoplankton nitrate uptake
! [millimole_N m-3)], {1.0d0}.

        K_NO3 == 0.2d0 ! Checked 1.0d0                           ! k_N

!***EcoDynamo stuff added to Powell model parameters**********
! Maximum photosynthetic rate 1/h]  {0.05}    
! The value used here (0.7062) is based on Table S4 of Assmy et al. (2017) Sci. Rep. 7, 40850
! after multiplying the value of the mentioned table for P. pouchetii (13.2 mg C mg Chl a-1 h-1) by
! 0.014 mg Chl/mg C, which is the value given in Box 7.5 of Sakshaug et al. (2009) 

       Pmax == 0.1848d0 !0.453d0 (old value) h-1 Checked 

! Optimal light intensity [microEisntein/m2/s] {500}
    
       Iopt == 185d0             
     
! Saturation light intensity [microEisntein/m2/s] {500}

       ImaxE == 185.0d0           

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s] 

       AEiler == 0.0d0                                  

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s] 

       BEiler == 1.0d0                                

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s]                                      

       CEiler == 1.0d0

!  MaintResp Maintenance respiration [mmol O2/mg Chl/h]{0.01}           

       MaintResp == 0.002d0 ! Checked 0.002d0

!  RespCoeff Respiration coefficient [nondimensional] {0.3}                 

       RespCoeff == 0.184d0 ! Checked 0.3
      
!  Fraction of GPP lost as dissolved organics  [nondimensional]  {0.1}                 

       DocStressLoss == 0.1d0 ! Checked 0.33

!  Redfield "default" C in mass         

       RedfieldC == 1273.06d0 ! Checked (old mass per mass 41)

!  Redfield "default" N in mass       

     RedfieldN == 224.16d0 ! Checked (old mass per mass 7.2)

!  Redfield "default" P in mass                               

     RedfieldP == 30.97d0 ! Checked

!  Exponent of the temperature limiting function [1/degrees]                                    

     TemperatureAugmentationRate == 0.069d0 ! Checked 0.0663 

!  Ratio between respiration in the light and respiration in the darkness [nondimensional]        

     RatioLightDarkRespiration == 2.0d0 ! Checked

!  Minimal N:P cell ratio [mgN/mgP]      

     minNPRatio == 4.0d0 ! Checked
               
!  Maximal N:P cell ratio [mgN/mgP]   

     maxNPRatio == 291.0d0  ! Checked                    

!  Maximal phosphorus uptake [1/h]    
 
     PMaxUptake == 0.1848d0   ! Checked                  

!  Maximal nitrogen uptake [1/h]     
  
     NMaxUptake == 0.1848d0   ! Checked                 
!     NMaxUptake == 0.0                    
   
! Half-saturation constant for P uptake [microM]

     KP == 0.03d0   ! Checked      

! Half-saturation constant for ammonia uptake [microM]     

     KNH4 == 0.10d0 ! Checked 

! Minimal P cell contents [mgP/mgC]                     

     MinPCellQuota == 0.008d0 ! Checked 

! Maximal P cell contents [mgP/mgC]                     

     MaxPCellQuota == 0.1d0  ! Checked

! Minimal N cell contents [mgN/mgC]                     

     MinNCellQuota == 0.054d0 ! Checked 

! Maximal N cell contents [mgN/mgC]                     
 
     MaxNCellQuota == 0.25d0  ! 0.53 Checked

! Half saturation constant for internal P limitation [mgP/mgC]                                             

     KPInternal == 0.008d0 ! Checked 

! Half saturation constant for internal N limitation [mgN/mgC] 
                                            
     KNInternal == 0.054d0 ! Checked 

! Mass ratio between carbon fixed and oxygen released during photosynthesis [mgC/mgO2] 
            
     CarbonToOxygenProd == 0.3125d0 ! Checked

! Mass ratio between carbon released and oxygen consumed during respiration [mgC/mgO2]                

     CarbonToOxygenResp == 0.3125d0 ! Checked

! Parameter of the exponent of the temperature limiting function for respiration [1/degrees]         
     
     TminRespiration == 0d0 ! Checked

!   Parameter of the exponent of the temperature limiting function for photosynthesis [1/degrees]      
     
     TminPhotosynthesis == 0d0 ! Checked

!   Option for not including (0) or including N limitation [nondimensional]   
                        
     NitrogenLimitation == 1

!   Option for not including (0) or including P limitation [nondimensional]
    
     PhosphorusLimitation == 0

!   Maximum chlorophyll to carbon ratio [mg Chl / mg C] {0.0535d0} as in Fennels' model 

     !Chl2C_m = 0.0535d0 0.0635d0 
      Chl2C_m == 0.0535d0

! Phytoplankton sinking rate, [m/day], {0.0d0}.

     wPhy == 0.0d0                           ! wP

! P-I function

     PIFunction == 4

! Type of nutrient limitation

     NutLimType == 1
!********************************************Diatom phytoplankton**************************************************      
! Phytoplankton, initial slope of P-I curve [mg C mg C-1 h-1 W m2], {0.025d0}.

      PhyISDiatoms == 0.000104d0                 ! alpha checked!

! Phytoplankton, negative slope of P-I curve [mg C mg C-1 h-1 W m2]

      BetaDiatoms == 0.000000835d0                ! [0.073982d0 - this value is too high]  beta checked!

! Nitrate uptake rate, [1/day], {1.5d0}.

      Vm_NO3Diatoms == 1.5d0                           ! Vm

! Phytoplankton mortality rate to Detritus pool [1/day], {0.1d0}.

      PhyMRDDiatoms == 0.1d0                            ! sigmaD

! Phytoplankton mortality rate to Nitrogen pool [1/day], {0.0d0}.

      PhyMRNDiatoms == 0.0d0                            ! sigmaN

! Inverse half-saturation for phytoplankton nitrate uptake
! [millimole_N m-3)], {1.0d0}.

        K_NO3Diatoms == 0.2d0                           ! k_N

!***EcoDynamo stuff added to Powell model parameters**********
! Maximum photosynthetic rate [1/h]  {0.05}    
                  
       PmaxDiatoms == 0.048d0 !Checked!

! Optimal light intensity [microEisntein/m2/s] {500}
    
       IoptDiatoms == 185.0d0             
     
! Saturation light intensity [microEisntein/m2/s] {500}

       ImaxEDiatoms == 185.0d0           

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s] 

       AEilerDiatoms == 0.0d0                                  

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s] 

       BEilerDiatoms == 1.0d0                                

! Parameter of the Eilers & Peeters equation [microEinstein/m2/s]                                      

       CEilerDiatoms == 1.0d0

!  MaintResp Maintenance respiration [mmol O2/mg Chl/h]{0.01}           

       MaintRespDiatoms == 0.002d0   !0.01

!  RespCoeff Respiration coefficient [nondimensional] {0.3}                 

       RespCoeffDiatoms == 0.184d0   !0.3
      
!  Fraction of GPP lost as dissolved organics  [nondimensional]  {0.1}                 

       DocStressLossDiatoms == 0.1d0

!  Redfield "default" mass of C per mass of P [gC/gP]        

       RedfieldCDiatoms == 41.0d0

!  Redfield "default" mass of N per mass of P [gN/gP]        

     RedfieldNDiatoms == 7.2d0

!  Redfield "default" mass of P                              

     RedfieldPDiatoms == 1.0d0

!  Redfield "default" mass of Si per mass of P [gSi/gP]        

     RedfieldSi == 7.0d0


!  Exponent of the temperature limiting function [1/degrees]                                    

     TemperatureAugmentationRateDiatoms == 0.069d0

!  Ratio between respiration in the light and respiration in the darkness [nondimensional]        

     RatioLightDarkRespirationDiatoms == 2.0d0

!  Minimal N:P cell ratio [mgN/mgP]      

     minNPRatioDiatoms == 4.0d0
               
!  Maximal N:P cell ratio [mgN/mgP]   

     maxNPRatioDiatoms == 291.0d0 
  
!  Maximal phosphorus uptake [1/h]    
 
     PMaxUptakeDiatoms == 0.048d0                     

!  Maximal nitrogen uptake [1/h]     
  
     NMaxUptakeDiatoms == 0.048d0  

!  Maximal silica uptake [1/h]     
  
     SiMaxUptake == 0.045d0                                         
   
! Half-saturation constant for P uptake [microM]

     KPDiatoms == 0.03d0 

! Half-saturation constant for ammonia uptake [microM]     

     KNH4Diatoms == 0.1d0

! Half-saturation constant for Si uptake [microM]     

     KSi == 0.2d0

! Minimal P cell contents [mgP/mgC]                     

     MinPCellQuotaDiatoms == 0.008d0

! Maximal P cell contents [mgP/mgC]                     

     MaxPCellQuotaDiatoms == 0.1d0

! Minimal N cell contents [mgN/mgC]                     

     MinNCellQuotaDiatoms == 0.054d0

! Maximal N cell contents [mgN/mgC]                     
 
     MaxNCellQuotaDiatoms == 0.25d0

! Minimal Si cell contents [mgSi/mgC]                     

     MinSiCellQuota == 0.054d0

! Maximal Si cell contents [mgSi/mgC]                     
 
     MaxSiCellQuota == 0.25d0

!  Minimal N:Si cell ratio [mgN/mgSi]      

     minNSiRatio == 0.25d0 ! 

! Half saturation constant for internal P limitation [mgP/mgC]                                             

     KPInternalDiatoms == 0.004d0

! Half saturation constant for internal N limitation [mgN/mgC] 
                                            
     KNInternalDiatoms == 0.028d0

! Half saturation constant for internal Si limitation [mgSi/mgC]                                             

     KSiInternal == 0.004d0

! Mass ratio between carbon fixed and oxygen released during photosynthesis [mgC/mgO2] 
            
     CarbonToOxygenProdDiatoms == 0.3125d0

! Mass ratio between carbon released and oxygen consumed during respiration [mgC/mgO2]                

     CarbonToOxygenRespDiatoms == 0.3125d0

! Parameter of the exponent of the temperature limiting function for respiration [1/degrees]         
     
     TminRespirationDiatoms == 0.0d0

!   Parameter of the exponent of the temperature limiting function for photosynthesis [1/degrees]      
     
     TminPhotosynthesisDiatoms == 0.0d0

!   Option for not including (0) or including N limitation [nondimensional]   
                        
     NitrogenLimitationDiatoms == 1

!   Option for not including (0) or including P limitation [nondimensional]
    
     PhosphorusLimitationDiatoms == 0

!   Option for not including (0) or including Si limitation [nondimensional]
    
     SilicaLimitation == 1

!   Maximum chlorophyll to carbon ratio [mg Chl / mg C] {0.0535d0} as in Fennels' model 

     Chl2C_mDiatoms == 0.0535d0

! Phytoplankton sinking rate, [m/day], {0.0d0}.

      wPhyDiatoms == 5.0d0                           ! wP

! P-I function

     PIFunctionDiatoms == 4

! Type of nutrient limitation

     NutLimTypeDiatoms == 1

!********************************************Zooplankton***********************************************************
! Ivlev constant for zooplankton grazing parameterization
! [Nondimensional], {112*0.06=0.84d0}

        Ivlev == 0.84d0

! Zooplankton grazing rate, [1/day], {0.52}.

!        ZooGR == 0.52d0                          ! R_m

! Zooplankton excretion efficiency to Detritus pool [nondimensional],
! {0.3d0}

       ZooEED == 0.0d0                           ! gammaD

! Zooplankton excretion efficiency to Nitrogen pool [nondimensional],
! {0.3d0}

       ZooEEN == 0.3d0                           ! gammaN

! Zooplankton mortality rate to Detritus pool, [1/day], {0.0d0}.

       ZooMRD == 0.145d0                         ! zetaD

! Zooplankton mortality rate to Nitrogen pool, [1/day], {0.145d0}.

       ZooMRN == 0.0d0                           ! zetaN

! Fennel zooplankton model paramaters
! Zooplankton Nitrogen assimilation efficiency [nondimesnional], {0.75d0}.

       ZooAE_N == 0.75d0

! Zooplankton Basal metabolism [1/day], {0.1d0}.

       ZooBM == 0.1d0

! Zooplankton Carbon:Nitrogen ratio [mole_C/mole_N], {5.0d0}.

       ZooCN == 6.625d0

! Zooplankton specific excretion rate [1/day], {0.1d0}.

       ZooER == 0.1d0

! Zooplankton maximum growth rate [1/day], {0.75d0}.

       ZooGR == 0.6d0

! Zooplankton minimum threshold value [millimole_N/m3], {0.0d0}.

      ZooMin == 0.001d0

! Zooplankton mortality rate [1/day], {0.025d0}.

      ZooMR == 0.025d0

! Zooplankton half-saturation constant (squared) for ingestion [millimole_N m-3]2, {1.0d0}.
       K_Phy == 2.0d0
!****************************************************************************************************************
! Detritus remineralization rate, [1/day], {0.1d0}.

        DetRR == 1.03d0                          ! delta

! Detrital sinking rate, [m/day], {8.0d0}.

         wDet == 8.0d0                           ! wD

! CO2 partial pressure in the air [parts per million by volume],As in Fennels' model 
! {377.0d0}.

     pCO2air == 370.0d0

! Harmonic/biharmonic horizontal diffusion of biological tracer for
! nonlinear model and adjoint-based algorithms: [1:NBT,Ngrids].

         TNU2 == 21*0.0d0                         ! m2/s
         TNU4 == 21*0.0d0                         ! m4/s

      ad_TNU2 == 21*0.0d0                         ! m2/s
      ad_TNU4 == 21*0.0d0                         ! m4/s

! Vertical mixing coefficients for biological tracers for nonlinear
! model and basic state scale factor in adjoint-based algorithms:
! [1:NBT,Ngrids].

      AKT_BAK == 21*1.0d-6                        ! m2/s

   ad_AKT_fac == 21*1.0d0                         ! nondimensional

! Nudging/relaxation time scales, inverse scales will be computed
! internally: [1:NBT,Ngrids].

        TNUDG == 21*0.0d0                         ! days

! KK 2017-11-24

! Set lateral boundary conditions keyword. Notice that a value is expected
! for each boundary segment per nested grid for each state variable.
!
! The biological tracer variables require [1:4,1:NBT,Ngrids] values. The
! boundary order is: 1=west, 2=south, 3=east, and 4=north. That is,
! anticlockwise starting at the western boundary.
!
! The keyword is case insensitive and usually has three characters. However,
! it is possible to have compound keywords, if applicable. For example, the
! keyword "RadNud" implies radiation boundary condition with nudging. This
! combination is usually used in active/passive radiation conditions.
!
! NOTICE: It is possible to specify the lateral boundary conditions for
! ======  all biological tracers in a compact form with a single entry.
! If so, all the biological tracers are assumed to have the same boundary
! condition as in the single entry.
!
!   Keyword    Lateral Boundary Condition Type
!
!   Cla        Clamped                                _____N_____     j=Mm
!   Clo        Closed                                |     4     |
!   Gra        Gradient                              |           |
!   Nes        Nested                              1 W           E 3
!   Nud        Nudging                               |           |
!   Per        Periodic                              |_____S_____|
!   Rad        Radiation                                   2          j=1
!                                                   i=1         i=Lm
!                   W       S       E       N
!                   e       o       a       o
!                   s       u       s       r
!                   t       t       t       t
!                           h               h
!
!                   1       2       3       4

   LBC(isTvar) ==   RadNud  RadNud  RadNud  RadNud \    ! idbio(1), NO3
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(2), phytoplankton
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(3), zooplankton
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(4), detritus
                    RadNud  RadNud  RadNud  RadNud \    ! NH4
                    RadNud  RadNud  RadNud  RadNud \    ! PO4
                    RadNud  RadNud  RadNud  RadNud \    ! Phy_N
                    RadNud  RadNud  RadNud  RadNud \    ! Phy_P
                    RadNud  RadNud  RadNud  RadNud \    ! SdetritusN
                    RadNud  RadNud  RadNud  RadNud \    ! SdetritusP
                    RadNud  RadNud  RadNud  RadNud \    ! zooplanktonN
                    RadNud  RadNud  RadNud  RadNud \    ! zooplanktonP
                    RadNud  RadNud  RadNud  RadNud \    ! chlorophyll
!                    RadNud  RadNud  RadNud  RadNud \    ! TIC
                    RadNud  RadNud  RadNud  RadNud \    ! alkalinity
                    RadNud  RadNud  RadNud  RadNud \    ! oxygen
                    RadNud  RadNud  RadNud  RadNud \    ! silicic acid
                    RadNud  RadNud  RadNud  RadNud \    ! diatom
                    RadNud  RadNud  RadNud  RadNud \    ! diatomN
                    RadNud  RadNud  RadNud  RadNud \    ! diatomP
                    RadNud  RadNud  RadNud  RadNud \    ! diatomSi
                    RadNud  RadNud  RadNud  RadNud      ! diatomChl


! Adjoint-based algorithms can have different lateral boundary
! conditions keywords.

ad_LBC(isTvar) ==   RadNud  RadNud  RadNud  RadNud \    ! idbio(1), NO3
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(2), phytoplankton
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(3), zooplankton
                    RadNud  RadNud  RadNud  RadNud \    ! idbio(4), detritus
                    RadNud  RadNud  RadNud  RadNud \    ! NH4
                    RadNud  RadNud  RadNud  RadNud \    ! PO4
                    RadNud  RadNud  RadNud  RadNud \    ! Phy_N
                    RadNud  RadNud  RadNud  RadNud \    ! Phy_P
                    RadNud  RadNud  RadNud  RadNud \    ! SdetritusN
                    RadNud  RadNud  RadNud  RadNud \    ! SdetritusP
                    RadNud  RadNud  RadNud  RadNud \    ! zooplanktonN
                    RadNud  RadNud  RadNud  RadNud \    ! zooplanktonP
                    RadNud  RadNud  RadNud  RadNud \    ! chlorophyll
!                    RadNud  RadNud  RadNud  RadNud \    ! TIC
                    RadNud  RadNud  RadNud  RadNud \    ! alkalinity
                    RadNud  RadNud  RadNud  RadNud \    ! oxygen
                    RadNud  RadNud  RadNud  RadNud \    ! silicic acid
                    RadNud  RadNud  RadNud  RadNud \    ! diatom
                    RadNud  RadNud  RadNud  RadNud \    ! diatomN
                    RadNud  RadNud  RadNud  RadNud \    ! diatomP
                    RadNud  RadNud  RadNud  RadNud \    ! diatomSi
                    RadNud  RadNud  RadNud  RadNud      ! diatomChl


! Logical switches (TRUE/FALSE) to specify which variables to process for
! tracers climatology: [NBT,Ngrids] values are expected. See glossary below
! for details.
  
  LtracerCLM == 21*F


! Logical switches (TRUE/FALSE) to specify which variables to consider on
! tracers point Sources/Sinks (like river runoff): [NBT,Ngrids] values are
! expected. See glossary below for details.

! LtracerSrc == 21*F
!  LtracerSrc(idbio(1),ng)
!  LtracerSrc(idbio(5),ng)
!  LtracerSrc(idbio(6),ng)
   LtracerSrc == F F F F F F F F F F F F F F F F F F F F F ! nitrate, ammonia, phosphate
  
! Logical switches (TRUE/FALSE) to activate writing of biological fields
! into HISTORY output files: [1:NBT,Ngrids].

Hout(idTvar) == 21*T     ! NO3, ...                biological tracer
Hout(idTsur) == 21*F     ! NO3_sflux, ...          surface tracer flux

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file: [1:NBT,Ngrids].

Aout(idTvar) == 21*T     ! ..., NO3, ...           biological tracer

Aout(idTTav) == 21*F     ! ..., NO3_2, ...         quadratic <t*t> tracer terms
Aout(idUTav) == 21*F     ! ..., u_NO3, ...         quadratic <u*t> tracer terms
Aout(idVTav) == 21*F     ! ..., v_NO3, ...         quadratic <v*t> tracer terms
Aout(iHUTav) == 21*F     ! ..., Huon_NO3, ...      tracer volume flux, <Huon*t>
Aout(iHVTav) == 21*F     ! ..., Hvom_NO3, ...      tracer volume flux, <Hvom*t>

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! biological tracer diagnostic terms into DIAGNOSTIC output file:
! [1:NBT,Ngrids].

Dout(iTrate) == 21*F     ! NO3_rate, ...           time rate of change
Dout(iThadv) == 21*F     ! NO3_hadv, ...           horizontal total advection
Dout(iTxadv) == 21*F     ! NO3_xadv, ...           horizontal XI-advection
Dout(iTyadv) == 21*F     ! NO3_yadv, ...           horizontal ETA-advection
Dout(iTvadv) == 21*F     ! NO3_vadv, ...           vertical advection
Dout(iThdif) == 21*F     ! NO3_hdiff, ...          horizontal total diffusion
Dout(iTxdif) == 21*F     ! NO3_xdiff, ...          horizontal XI-diffusion
Dout(iTydif) == 21*F     ! NO3_ydiff, ...          horizontal ETA-diffusion
Dout(iTsdif) == 21*F     ! NO3_sdiff, ...          horizontal S-diffusion
Dout(iTvdif) == 21*F     ! NO3_vdiff, ...          vertical diffusion

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! biological processes diagnostics terms into DIAGNOSTIC output file [Ngrids].

!Dout(iCOfx) == T        ! CO2_airsea         air-sea CO2 flux
Dout(iDNIT) == T        ! denitrification    denitrification flux
!Dout(ipCO2) == T        ! pCO2               CO2 partial pressure
!Dout(iO2fx) == T        ! O2_airsea          air-sea O2 flux
Dout(iPPro) == T        ! P_Production       primary production
Dout(iNO3u) == F        ! NO3_uptake         NO3 uptake

!
!  GLOSSARY:
!  =========
!
!------------------------------------------------------------------------------
! NPZD (Powell et al, 2006) Biological Model Parameters. Currently, it is
! configured with 4 biological tracers:
!
! idbio(1)      NO3               Nitrate concentration
! idbio(2)      phytoplankton     Phytoplankton biomass
! idbio(3)      zooplankton       Zooplankton biomass
! idbio(4)      detritus          Detritus concentration
!
!------------------------------------------------------------------------------
!
!  Lbiology       Switch to control the computation of a particular module
!                   within nested and/or multiple connected grids. By default
!                   this switch is set to TRUE in "mod_scalars" for all grids.
!                   Ngrids values are expected. The USER has the option, for
!                   example, to compute the biology in just one of the nested
!                   grids. If so, this switch needs to be consistent with the
!                   dimension parameter NBT in "mod_param".  In order to make
!                   the model more efficient in memory usage, NBT(:) should
!                   be zero in such grids.
!
!  BioIter        Maximum number of iterations to achieve convergence of
!                   the nonlinear implicit solution.
!
!  BioIni         Initial concentration for analytical uniform initial
!                   conditions, [millimole/meter3]. It is only used when
!                   ANA_BIOLOGY is activated.
!
!                     BioIni(iNO3_)          Nitrate concentration
!                     BioIni(iPhyt)          Phytoplankton biomass
!                     BioIni(iZoop)          Zooplankton biomass
!                     BioIni(iSDet)          Detritus concentration
!
!  PARfrac        Fraction of shortwave radiation that is photosynthetically
!                   active (nondimensional).
!
!  AttSW          Light attenuation due to seawater [1/m].
!
!  AttPhy         Light attenuation by phytoplankton, self-shading
!                   coefficient, [m2/millimole_N].
!
!  PhyIS          Phytoplankton, initial slope of P-I curve [m2/W].
!
!  Vm_NO3         Nitrate uptake rate, [1/day].
!
!  PhyMRD         Phytoplankton mortality rate to Detritus, [1/day].
!
!  PhyMRN         Phytoplankton mortality rate to Nitrogen, [1/day].
!
!  K_NO3          Inverse half-saturation for phytoplankton nitrate uptake
!                   [1/(millimole_N m-3)].
!
!  Ivlev          Ivlev constant for zooplankton grazing parameterization,
!                   [nondimensional].
!
!  ZooGR          Zooplankton grazing rate, [1/day].
!
!  ZooEED         Zooplankton excretion efficiency to Detritus pool,
!                   [nondimensional].
!
!  ZooEEN         Zooplankton excretion efficiency to Nitrogen pool,
!                   [nondimensional].
!
!  ZooMRD         Zooplankton mortality rate to Detritus pool, [1/day].
!
!  ZooMRN         Zooplankton mortality rate to Nitrogen pool, [1/day].
!
!  DetRR          Detritus remineralization rate, [1/day].
!
!  wPhy           Phytoplankton sinking rate, [m/day].
!
!  wDet           Detrital sinking rate, [m/day].
!
!
!------------------------------------------------------------------------------
! Physical Parameters, [1:NBT,1:Ngrids] values are expected.
!------------------------------------------------------------------------------
!
!  TNU2           Nonlinear model lateral, harmonic, constant, mixing
!                   coefficient (m2/s) for biological tracer variables;
!                   [1:NBT,1:Ngrids] values are expected. If variable
!                   horizontal diffusion is activated, TNU2 is the mixing
!                   coefficient for the largest grid-cell in the domain.
!
!  TNU4           Nonlinear model lateral, biharmonic, constant, mixing
!                   coefficient (m4/s) for biological tracer variables;
!                   [1:NBT,1:Ngrids] values are expected. If variable
!                   horizontal diffusion is activated, TNU4 is the mixing
!                   coefficient for the largest grid-cell in the domain.
!
!  ad_TNU2        Adjoint-based algorithms lateral, harmonic, constant,
!                   mixing coefficient (m2/s) for biological tracer variables;
!                   [1:NBT,1:Ngrids] values are expected. If variable
!                   horizontal diffusion is activated, ad_TNU2 is the mixing
!                   coefficient for the largest grid-cell in the domain.
!
!  ad_TNU4        Adjoint-based algorithms lateral, biharmonic, constant,
!                   mixing coefficient (m4/s) for biological tracer variables;
!                   [1:NBT,1:Ngrids] values are expected. If variable
!                   horizontal diffusion is activated, ad_TNU4 is the mixing
!                   coefficient for the largest grid-cell in the domain.
!
!  AKT_BAK        Background vertical mixing coefficient (m2/s) for biological
!                   tracer variables, [1:NBT,1:Ngrids] values are expected.
!
!
!  ad_AKT_fac     Adjoint-based algorithms vertical mixing, basic state,
!                   scale factor (nondimensional) for biological tracer
!                   variables; [1:NBT,1:Ngrids] values are expected. In
!                   some applications, a smaller/larger values of vertical
!                   mixing are necessary for stability. It is only used
!                   when FORWARD_MIXING is activated.
!
!  TNUDG          Nudging time scale (days), [1:NBT,1:Ngrids]. Inverse scale
!                   will be computed internally.
!
!
!------------------------------------------------------------------------------
!  Tracer point Sources/Sink sources switches.
!------------------------------------------------------------------------------
!
!  LtracerSrc     Logical switches (T/F) to specify which tracer variables
!                   to consider when the option TS_PSOURCE is activated;
!                   [1:NBT,1:Ngrids] values are expected.
!
!                     LtracerSrc(idbio(1),ng)     Nitrate concetration
!                     LtracerSrc(idbio(2),ng)     Phytoplankton biomass
!                     LtracerSrc(idbio(3),ng)     Zooplankton biomass
!                     LtracerSrc(idbio(4),ng)     Detritus concentration
!
!                   Recall that TS_PSOURCE is usually activated to add river
!                   runoff as a point source. At minimum, it is necessary to
!                   specify both temperature and salinity for all rivers. The
!                   other tracers are optional. The user needs to know the
!                   correspondence between biological variables and indices
!                   idbio(1:NBT) when activating one or more of these switches.
!
!                   This logical switch REPLACES and ELIMINATES the need to
!                   have or read the variable "river_flag(river)" in the input
!                   rivers forcing NetCDF file:
!
!                     double river_flag(river)
!                        river_flag:long_name = "river runoff tracer flag"
!                        river_flag:option_0 = "all tracers are off"
!                        river_flag:option_1 = "only temperature"
!                        river_flag:option_2 = "only salinity"
!                        river_flag:option_3 = "both temperature and salinity"
!                        river_flag:units = "nondimensional"
!
!                   This logic was too cumbersome and complicated when
!                   additional tracers are considered. However, this change
!                   is backward compatible.
!
!                   The LtracerSrc switch will be used to activate the reading
!                   of respective tracer variable from input river forcing
!                   NetCDF file. If you want to add other tracer variables
!                   (other than temperature and salinity) as a source for a
!                   particular river(s), you just need to specify such values
!                   on those river(s). Then, set the values to ZERO on the
!                   other river(s) that do NOT require such river forcing for
!                   that tracer. Recall that you need to specify the tracer
!                   values for all rivers, even if their values are zero.
!
!------------------------------------------------------------------------------
! Logical switches (T/F) to activate writing of fields into HISTORY files.
!------------------------------------------------------------------------------
!
!  Hout           Logical switches to write out biological fields into
!                   output HISTORY NetCDF file, [1:NBT,1:Ngrids] values
!                   are expected:
!
!                   Hout(idTvar)              biological tracers
!                   Hout(idTsur)              biological tracers surface flux
!
!                   idTvar(idbio(1))=iNO3_    Nitrate concentration
!                   idTvar(idbio(2))=iPhyt    Phytoplankton biomass
!                   idTvar(idbio(3))=iZoop    Zooplankton biomass
!                   idTvar(idbio(4))=iSdet    Detritus concentration
!
!------------------------------------------------------------------------------
! Logical switches (T/F) to activate writing of fields into AVERAGE file.
!------------------------------------------------------------------------------
!
!  Aout           Logical switches to write out biological fields into
!                   output AVERAGE NetCDF file, [1:NBT,1:Ngrids] values
!                   are expected:
!
!                   Aout(idTvar)              biological tracers
!
!                   The idTvar(idbio(:)) are the same to those in the HISTORY
!                   file.
!
!------------------------------------------------------------------------------
! Logical switches (T/F) to activate writing of time-averaged fields into
! DIAGNOSTIC file.
!------------------------------------------------------------------------------
!
!  Time-averaged, biological tracers  diagnostic terms, [1:NBT,Ngrids] values
!  expected: (if DIAGNOSTICS_TS)
!
!                 Dout(idDtrc(idbio(1:NBT),iT....),1:Ngrids)
!
!  Dout(iTrate)   Write out time rate of change.
!  Dout(iThadv)   Write out horizontal total advection.
!  Dout(iTxadv)   Write out horizontal  XI-advection.
!  Dout(iTyadv)   Write out horizontal ETA-advection.
!  Dout(iTvadv)   Write out vertical advection.
!  Dout(iThdif)   Write out horizontal total diffusion, if TS_DIF2 or TS_DIF4.
!  Dout(iTxdif)   Write out horizonta1  XI-diffusion, if TS_DIF2 or TS_DIF4.
!  Dout(iTydif)   Write out horizontal ETA-diffusion, if TS_DIF2 or TS_DIF4.
!  Dout(iTsdif)   Write out horizontal   S-diffusion, if TS_DIF2 or TS_DIF4 and
!                   rotated tensor (MIX_GEO_TS or MIX_ISO_TS).
!  Dout(iTvdif)   Write out vertical diffusion.
!
