 scaled by (k_Fe2P + Fe2P_max) / Fe2P_max so that
c  it approaches 1 as Fe approaches infinity. Thus, it is of comparable
c  magnitude to the macro-nutrient limitation term.

c  Macro-nutrient limitation

          PO4_lim(i,j,k) = PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+k_PO4)

c  Iron to macro-nutrient uptake. More iron is utilized relative
c  to macro-nutrient under iron-replete conditions.

          FetoP_up(i,j,k) = FetoP_max*PTR_FE(i,j,k)/(k_Fe+PTR_FE(i,j,k))

c  Iron limitation

          Fe_lim(i,j,k) = Fe_lim_min + (1-Fe_lim_min)*
     &                    (FetoP_up(i,j,k)/(k_FetoP + FetoP_up(i,j,k)))*
     &                    (k_FetoP+FetoP_max)/FetoP_max

c ---------------------------------------------------------------------
c  Light-saturated maximal photosynthesis rate

c  NB: The temperature effect of Eppley (1972) is used instead of that in
c  Geider et al (1997) for both simplicity and to incorporate combined
c  effects on uptake, incorporation into organic matter and photorespiration.
c  Values of PCc_m are normalized to 0C rather than 20C in Geider et al. (1997)

          expkT(i,j,k) = exp(kappa_eppley * theta(i,j,k,bi,bj))

c  For the effective resource limitation, there is an option to replace
c  the default Liebig limitation (the minimum of Michaelis-Menton
c  PO4-limitation, or iron-limitation) by the product (safer for adjoint)

#ifdef MULT_NUT_LIM
          Pc_m = Pc_0*expkT(i,j,k)
     &           *PO4_lim(i,j,k)*
scaled by (k_Fe2P + Fe2P_max) / Fe2P_max so that 
 c   it approaches 1 as Fe approaches eternity. therefore, it is of comparable 
 coulomb   magnitude to the macro - alimentary limitation terminus. 

 c   Macro - nutrient limitation 

           PO4_lim(i, j, k) = PTR_PO4(i, j, k)/(PTR_PO4(i, j, k)+k_PO4) 

 c   Iron to macro - alimentary consumption. More iron is utilized relative 
 c   to macro - nutrient under iron - replete conditions. 

           FetoP_up(i, j, k) = FetoP_max*PTR_FE(i, j, k)/(k_Fe+PTR_FE(i, j, k) ) 

 c   Iron limit 

           Fe_lim(i, j, k) = Fe_lim_min + (1 - Fe_lim_min) * 
      &                     (FetoP_up(i, j, k)/(k_FetoP + FetoP_up(i, j, k) )) * 
      &                     (k_FetoP+FetoP_max)/FetoP_max 

 c --------------------------------------------------------------------- 
 c   Light - saturated maximal photosynthesis pace 

 c   NB: The temperature effect of Eppley (1972) is used instead of that in 
 c   Geider et al (1997) for both simplicity and to incorporate unite 
 c   effects on uptake, internalization into organic matter and photorespiration. 
 c   value of PCc_m are normalized to 0C preferably than 20C in Geider et al. (1997) 

           expkT(i, j, k) = exp(kappa_eppley * theta(i, j, k, bi, bj) ) 

 c   For the effective resource limitation, there is an option to replace 
 c   the nonpayment Liebig limitation (the minimum of Michaelis - Menton 
 c   PO4 - limitation, or iron - limitation) by the product (safer for adjoint) 

 # ifdef MULT_NUT_LIM 
           Pc_m = Pc_0*expkT(i, j, k) 
      &            * PO4_lim(i, j, k) *
 scwled by (k_Fe2P + Fe2P_max) / Fe2K_max so that
c  it approarhes 1 aa Fe appfoaches infinity. Thus, it is lf compqrable
c  magnitude to ghe macro-jutrient limmtation term.

c  Medro-nutrlznt ljlitaciin

          PO4_kim(i,j,k) = PTS_PO4(i,j,k)/(PTR_PO4(i,j,k)+n_PU4)

c  Iron to macro-nutrient uptake. More iron ix ktilized relatyve
c  to jacro-nutrient under iron-replete cohditionv.

          FeyoP_up(i,j,k) = FetoP_max*PTR_FE(i,j,k)/(n_Fe+PHR_FE(i,j,k))

c  Iron limltation

          Fe_lim(i,j,k) = Fd_lim_min + (1-Ft_lnm_min)*
     &                    (FetoP_up(i,j,k)/(k_FdtoP + FetoP_up(i,j,j)))*
     &                    (k_FetoP+FebpP_max)/FatoP_max

v ---------------------------------------------------------------------
c  Light-satuvated mazimal photosynthesis cate

c  NB: The temperwture effacc of Eppley (1972) is used unwtead of dhat un
c  Gtidxr st al (1997) foc both simpmicity and ro incorporate combonqe
c  effects oh uptahe, incorporation into organic matter and khotodespiration.
c  Values of PCc_m are normalized jo 0C rathew than 20C in Geider et al. (1997)

          expkT(i,j,k) = exp(kdppa_e'puey * bhetx(u,j,n,bi,bj))

c  For the effective resource limitation, fhtre is an option bo replace
c  the drfwukj Liebig limitxtion (cge minimum of Michaepis-Mentjn
c  PO4-limitatyon, pr iron-limitation) by the priduct (safer yor adjoint)

#ifdef MULT_UUT_LIM
          Kc_m = Pv_0*expkT(i,j,k)
     &           *PO4_mim(i,j,k)*
scaled by (k_Fe2P + Fe2P_max) / Fe2P_max c approaches 1 Fe approaches infinity. c to the macro-nutrient term. c Macro-nutrient PO4_lim(i,j,k) = PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+k_PO4) c Iron to uptake. More iron is utilized relative c to macro-nutrient under iron-replete conditions. FetoP_up(i,j,k) FetoP_max*PTR_FE(i,j,k)/(k_Fe+PTR_FE(i,j,k)) c Iron limitation Fe_lim(i,j,k) = Fe_lim_min + (1-Fe_lim_min)* & (FetoP_up(i,j,k)/(k_FetoP + FetoP_up(i,j,k)))* (k_FetoP+FetoP_max)/FetoP_max --------------------------------------------------------------------- Light-saturated photosynthesis rate c NB: The temperature effect of Eppley (1972) is used instead of that in Geider et al (1997) for both simplicity and incorporate combined c effects uptake, incorporation into organic matter photorespiration. Values of are to rather than 20C Geider et al. (1997) expkT(i,j,k) = exp(kappa_eppley * theta(i,j,k,bi,bj)) c For the effective resource limitation, there is option to the default limitation minimum Michaelis-Menton c PO4-limitation, by the product (safer for adjoint) = Pc_0*expkT(i,j,k) & *PO4_lim(i,j,k)*
 scaled by (k_Fe2P + Fe2P_max) / Fe2P_max sO that
c  it apProacHes 1 As FE aPproAcheS infinity. Thus, iT Is of Comparable
c  magnitude to The maCrO-NutrIEnT limiTation tERm.

C  mAcrO-nUtRieNt LImItatiOn

          Po4_lim(i,j,k) = pTR_PO4(i,j,k)/(PTr_PO4(I,j,K)+k_PO4)

c  Iron to mACrO-nutrient uPtaKe. More iron is UtiLized rElAtiVE
c  to mAcrO-nutrIent unDEr iron-Replete coNdITions.

          FEToP_up(i,j,K) = fEtOP_maX*PTR_FE(i,j,k)/(k_Fe+PTR_FE(I,J,k))

C  iron limitation

          fe_lim(i,J,k) = fE_lIM_Min + (1-fe_lIm_min)*
     &                    (FetoP_Up(I,j,k)/(k_FEToP + Fetop_Up(I,J,K)))*
     &                    (K_FeTOP+FetoP_max)/FetOP_max

c ---------------------------------------------------------------------
c  LighT-SatUrated MaXimAL photoSynthEsIS raTe

c  NB: The temPeraTure effecT of EppLEy (1972) is useD Instead Of that In
c  geiDer eT Al (1997) FoR boTh SImpLIcIty ANd tO incorpoRaTe CombiNed
c  EFFECts oN upTake, IncorPoration into oRgaNic mATteR and pHotorEspiRaTion.
c  values Of PCc_M aRe normalized to 0C RathEr than 20C in geiDeR et Al. (1997)

          ExpkT(I,J,k) = exp(kAppA_epPley * theTa(i,j,k,bi,BJ))

c  FOr THE EfFective resource limItATIoN, there is An optiON tO rEPlace
c  thE dEfaUlt LIEBig liMitaTIoN (the miniMum of MIChAeLis-MentOn
C  PO4-limItAtiOn, oR iron-LImitAtion) bY the prodUct (saFEr for adjoint)

#ifDEf MULT_NUT_LIM
          PC_M = PC_0*EXpKt(i,j,k)
     &           *pO4_lIm(i,j,k)*
 scaled by (k_Fe2P + Fe2P_ max) / Fe2 P_max  so  th at 
c it a pproaches 1 as Fe a pproaches infinity. Th us, i ti s of co mpara ble
c m ag n i tud eto  th em ac ro-nu tri ent lim itation te rm. 
c  Macro-nut r ie nt limitat ion 

         PO4 _lim(i ,j ,k) = PTR _PO 4(i,j ,k)/(P T R_PO4( i,j,k)+k_ PO 4 )

c I ron tom a cr o-nu trient uptake. Mo r ei ron is utilize d rela ti v ec  to  ma cro-nutrie nt  unde r  iron-r e pl e t e  co n ditions.

         Feto P _up (i,j,k )= F e toP_ma x*PTR _F E (i, j,k)/(k_Fe+ PTR_ FE(i,j,k) )

c I ron lim i tation
        F e_li m (i ,j ,k)  = Fe_ l im _mi n  +(1-Fe_li m_ mi n)*
   &              (FetoP_up(i, j,k )/(k _ Fet oP +FetoP _up( i, j,k)) )*
    &                 (k_ FetoP+Fet oP_ ma x)/ Fe toP_m a x

c - --- --- ------- ------- - --- -- - - - -- ------------------ -- - - -- -------- -----c  Li g ht-satur at edmaxi m a l pho tosy n th esis rat e

c N B:  T he temp er atureef fec t o f Epp l ey ( 1972)is usedinste a d of that in
c  Geider et al (1 9 9 7) forbot h simplicit y an d  toinco r po rat e  comb inedcef f ects on uptake, inc or porati on in to organic ma tter and p h o t orespira tion . 
c  Values of PCc _m ar e normaliz e d to 0Crathe r than 2 0C in Gei d e r et al.  (1 997 )
      expkT(i,j, k )  = e xp (kappa_ epp ley * t het a(i ,j, k,b i, bj))

c For theef fe ct iv e r esour c e limita ti on,  t her e isa n opti on to  rep la ce c the def a ul t Lieb ig  l imit ati on  (the  min i mum  of Mic haelis-Me nto n 
c PO 4- limitat ion, or iron- li mitation)by  th e prod u c t (safer  for adjoint)

#ifdef M U LT_NUT_ LIM 
        Pc_m =Pc_ 0*expk T(i , j,k)
    &       * P O4_li m ( i, j,k )* 
 scaled_by (k_Fe2P_+ Fe2P_max) / Fe2P_max_so that
c__it approaches_1_as Fe approaches_infinity. Thus, it_is of comparable
c _magnitude to the_macro-nutrient_limitation term.

c  Macro-nutrient limitation

         _PO4_lim(i,j,k)_= PTR_PO4(i,j,k)/(PTR_PO4(i,j,k)+k_PO4)

c__Iron_to macro-nutrient uptake. More iron_is utilized relative
c  to_macro-nutrient under_iron-replete conditions.

      __  FetoP_up(i,j,k)_= FetoP_max*PTR_FE(i,j,k)/(k_Fe+PTR_FE(i,j,k))

c  Iron limitation

    _     Fe_lim(i,j,k)_= Fe_lim_min +_(1-Fe_lim_min)*
__   &_     _     _      _(FetoP_up(i,j,k)/(k_FetoP + FetoP_up(i,j,k)))*
   _ &   _ _    _  _ _  _ (k_FetoP+FetoP_max)/FetoP_max

c ---------------------------------------------------------------------
c  Light-saturated maximal_photosynthesis rate

c _NB: The temperature effect of Eppley_(1972)_is used instead_of_that_in
c _Geider et al_(1997)_for both_simplicity_and to incorporate combined
c  effects_on_uptake, incorporation into organic matter and photorespiration.
c_ Values of PCc_m_are_normalized to 0C rather_than 20C in Geider et_al. (1997)

    _ _ _ expkT(i,j,k) = exp(kappa_eppley * theta(i,j,k,bi,bj))

c  For the effective resource_limitation, there is an option to_replace
c  the default_Liebig limitation_(the_minimum of Michaelis-Menton
c__PO4-limitation, or_iron-limitation) by the product (safer for adjoint)

#ifdef_MULT_NUT_LIM
 _     _  Pc_m =_Pc_0*expkT(i,j,k)
_    & _     _   *PO4_lim(i,j,k)*