p4zlim.F90 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. MODULE p4zlim
  2. !!======================================================================
  3. !! *** MODULE p4zlim ***
  4. !! TOP : PISCES
  5. !!======================================================================
  6. !! History : 1.0 ! 2004 (O. Aumont) Original code
  7. !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90
  8. !! 3.4 ! 2011-04 (O. Aumont, C. Ethe) Limitation for iron modelled in quota
  9. !!----------------------------------------------------------------------
  10. #if defined key_pisces
  11. !!----------------------------------------------------------------------
  12. !! 'key_pisces' PISCES bio-model
  13. !!----------------------------------------------------------------------
  14. !! p4z_lim : Compute the nutrients limitation terms
  15. !! p4z_lim_init : Read the namelist
  16. !!----------------------------------------------------------------------
  17. USE oce_trc ! Shared ocean-passive tracers variables
  18. USE trc ! Tracers defined
  19. USE sms_pisces ! PISCES variables
  20. USE p4zopt ! Optical
  21. USE iom ! I/O manager
  22. IMPLICIT NONE
  23. PRIVATE
  24. PUBLIC p4z_lim
  25. PUBLIC p4z_lim_init
  26. !! * Shared module variables
  27. REAL(wp), PUBLIC :: concnno3 !: NO3, PO4 half saturation
  28. REAL(wp), PUBLIC :: concdno3 !: Phosphate half saturation for diatoms
  29. REAL(wp), PUBLIC :: concnnh4 !: NH4 half saturation for phyto
  30. REAL(wp), PUBLIC :: concdnh4 !: NH4 half saturation for diatoms
  31. REAL(wp), PUBLIC :: concnfer !: Iron half saturation for nanophyto
  32. REAL(wp), PUBLIC :: concdfer !: Iron half saturation for diatoms
  33. REAL(wp), PUBLIC :: concbno3 !: NO3 half saturation for bacteria
  34. REAL(wp), PUBLIC :: concbnh4 !: NH4 half saturation for bacteria
  35. REAL(wp), PUBLIC :: xsizedia !: Minimum size criteria for diatoms
  36. REAL(wp), PUBLIC :: xsizephy !: Minimum size criteria for nanophyto
  37. REAL(wp), PUBLIC :: xsizern !: Size ratio for nanophytoplankton
  38. REAL(wp), PUBLIC :: xsizerd !: Size ratio for diatoms
  39. REAL(wp), PUBLIC :: xksi1 !: half saturation constant for Si uptake
  40. REAL(wp), PUBLIC :: xksi2 !: half saturation constant for Si/C
  41. REAL(wp), PUBLIC :: xkdoc !: 2nd half-sat. of DOC remineralization
  42. REAL(wp), PUBLIC :: concbfe !: Fe half saturation for bacteria
  43. REAL(wp), PUBLIC :: oxymin !: half saturation constant for anoxia
  44. REAL(wp), PUBLIC :: qnfelim !: optimal Fe quota for nanophyto
  45. REAL(wp), PUBLIC :: qdfelim !: optimal Fe quota for diatoms
  46. REAL(wp), PUBLIC :: caco3r !: mean rainratio
  47. ! Coefficient for iron limitation
  48. REAL(wp) :: xcoef1 = 0.0016 / 55.85
  49. REAL(wp) :: xcoef2 = 1.21E-5 * 14. / 55.85 / 7.625 * 0.5 * 1.5
  50. REAL(wp) :: xcoef3 = 1.15E-4 * 14. / 55.85 / 7.625 * 0.5
  51. !!* Substitution
  52. # include "top_substitute.h90"
  53. !!----------------------------------------------------------------------
  54. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  55. !! $Id: p4zlim.F90 3160 2011-11-20 14:27:18Z cetlod $
  56. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  57. !!----------------------------------------------------------------------
  58. CONTAINS
  59. SUBROUTINE p4z_lim( kt, knt )
  60. !!---------------------------------------------------------------------
  61. !! *** ROUTINE p4z_lim ***
  62. !!
  63. !! ** Purpose : Compute the co-limitations by the various nutrients
  64. !! for the various phytoplankton species
  65. !!
  66. !! ** Method : - ???
  67. !!---------------------------------------------------------------------
  68. !
  69. INTEGER, INTENT(in) :: kt, knt
  70. !
  71. INTEGER :: ji, jj, jk
  72. REAL(wp) :: zlim1, zlim2, zlim3, zlim4, zno3, zferlim
  73. REAL(wp) :: zconcd, zconcd2, zconcn, zconcn2
  74. REAL(wp) :: z1_trbdia, z1_trbphy, ztem1, ztem2, zetot1, zetot2
  75. REAL(wp) :: zdenom, zratio, zironmin
  76. REAL(wp) :: zconc1d, zconc1dnh4, zconc0n, zconc0nnh4
  77. !!---------------------------------------------------------------------
  78. !
  79. IF( nn_timing == 1 ) CALL timing_start('p4z_lim')
  80. !
  81. DO jk = 1, jpkm1
  82. DO jj = 1, jpj
  83. DO ji = 1, jpi
  84. ! Tuning of the iron concentration to a minimum level that is set to the detection limit
  85. !-------------------------------------
  86. zno3 = trb(ji,jj,jk,jpno3) / 40.e-6
  87. zferlim = MAX( 3e-11 * zno3 * zno3, 5e-12 )
  88. zferlim = MIN( zferlim, 7e-11 )
  89. trb(ji,jj,jk,jpfer) = MAX( trb(ji,jj,jk,jpfer), zferlim )
  90. ! Computation of a variable Ks for iron on diatoms taking into account
  91. ! that increasing biomass is made of generally bigger cells
  92. !------------------------------------------------
  93. zconcd = MAX( 0.e0 , trb(ji,jj,jk,jpdia) - xsizedia )
  94. zconcd2 = trb(ji,jj,jk,jpdia) - zconcd
  95. zconcn = MAX( 0.e0 , trb(ji,jj,jk,jpphy) - xsizephy )
  96. zconcn2 = trb(ji,jj,jk,jpphy) - zconcn
  97. z1_trbphy = 1. / ( trb(ji,jj,jk,jpphy) + rtrn )
  98. z1_trbdia = 1. / ( trb(ji,jj,jk,jpdia) + rtrn )
  99. concdfe(ji,jj,jk) = MAX( concdfer, ( zconcd2 * concdfer + concdfer * xsizerd * zconcd ) * z1_trbdia )
  100. zconc1d = MAX( concdno3, ( zconcd2 * concdno3 + concdno3 * xsizerd * zconcd ) * z1_trbdia )
  101. zconc1dnh4 = MAX( concdnh4, ( zconcd2 * concdnh4 + concdnh4 * xsizerd * zconcd ) * z1_trbdia )
  102. concnfe(ji,jj,jk) = MAX( concnfer, ( zconcn2 * concnfer + concnfer * xsizern * zconcn ) * z1_trbphy )
  103. zconc0n = MAX( concnno3, ( zconcn2 * concnno3 + concnno3 * xsizern * zconcn ) * z1_trbphy )
  104. zconc0nnh4 = MAX( concnnh4, ( zconcn2 * concnnh4 + concnnh4 * xsizern * zconcn ) * z1_trbphy )
  105. ! Michaelis-Menten Limitation term for nutrients Small bacteria
  106. ! -------------------------------------------------------------
  107. zdenom = 1. / ( concbno3 * concbnh4 + concbnh4 * trb(ji,jj,jk,jpno3) + concbno3 * trb(ji,jj,jk,jpnh4) )
  108. xnanono3(ji,jj,jk) = trb(ji,jj,jk,jpno3) * concbnh4 * zdenom
  109. xnanonh4(ji,jj,jk) = trb(ji,jj,jk,jpnh4) * concbno3 * zdenom
  110. !
  111. zlim1 = xnanono3(ji,jj,jk) + xnanonh4(ji,jj,jk)
  112. zlim2 = trb(ji,jj,jk,jppo4) / ( trb(ji,jj,jk,jppo4) + concbnh4 )
  113. zlim3 = biron(ji,jj,jk) / ( concbfe + biron(ji,jj,jk) )
  114. zlim4 = trb(ji,jj,jk,jpdoc) / ( xkdoc + trb(ji,jj,jk,jpdoc) )
  115. xlimbacl(ji,jj,jk) = MIN( zlim1, zlim2, zlim3 )
  116. xlimbac (ji,jj,jk) = MIN( zlim1, zlim2, zlim3 ) * zlim4
  117. ! Michaelis-Menten Limitation term for nutrients Small flagellates
  118. ! -----------------------------------------------
  119. zdenom = 1. / ( zconc0n * zconc0nnh4 + zconc0nnh4 * trb(ji,jj,jk,jpno3) + zconc0n * trb(ji,jj,jk,jpnh4) )
  120. xnanono3(ji,jj,jk) = trb(ji,jj,jk,jpno3) * zconc0nnh4 * zdenom
  121. xnanonh4(ji,jj,jk) = trb(ji,jj,jk,jpnh4) * zconc0n * zdenom
  122. !
  123. zlim1 = xnanono3(ji,jj,jk) + xnanonh4(ji,jj,jk)
  124. zlim2 = trb(ji,jj,jk,jppo4) / ( trb(ji,jj,jk,jppo4) + zconc0nnh4 )
  125. zratio = trb(ji,jj,jk,jpnfe) * z1_trbphy
  126. zironmin = xcoef1 * trb(ji,jj,jk,jpnch) * z1_trbphy + xcoef2 * zlim1 + xcoef3 * xnanono3(ji,jj,jk)
  127. zlim3 = MAX( 0.,( zratio - zironmin ) / qnfelim )
  128. xnanopo4(ji,jj,jk) = zlim2
  129. xlimnfe (ji,jj,jk) = MIN( 1., zlim3 )
  130. xlimphy (ji,jj,jk) = MIN( zlim1, zlim2, zlim3 )
  131. !
  132. ! Michaelis-Menten Limitation term for nutrients Diatoms
  133. ! ----------------------------------------------
  134. zdenom = 1. / ( zconc1d * zconc1dnh4 + zconc1dnh4 * trb(ji,jj,jk,jpno3) + zconc1d * trb(ji,jj,jk,jpnh4) )
  135. xdiatno3(ji,jj,jk) = trb(ji,jj,jk,jpno3) * zconc1dnh4 * zdenom
  136. xdiatnh4(ji,jj,jk) = trb(ji,jj,jk,jpnh4) * zconc1d * zdenom
  137. !
  138. zlim1 = xdiatno3(ji,jj,jk) + xdiatnh4(ji,jj,jk)
  139. zlim2 = trb(ji,jj,jk,jppo4) / ( trb(ji,jj,jk,jppo4) + zconc1dnh4 )
  140. !band-aid fix for floating invalid runtime error - proper fix would be to initialize all pisces variables to 0
  141. if ( trb(ji,jj,jk,jpsil) .ne. 0 ) then
  142. zlim3 = trb(ji,jj,jk,jpsil) / ( trb(ji,jj,jk,jpsil) + xksi(ji,jj) )
  143. else
  144. zlim3 = 0
  145. endif
  146. zratio = trb(ji,jj,jk,jpdfe) * z1_trbdia
  147. zironmin = xcoef1 * trb(ji,jj,jk,jpdch) * z1_trbdia + xcoef2 * zlim1 + xcoef3 * xdiatno3(ji,jj,jk)
  148. zlim4 = MAX( 0., ( zratio - zironmin ) / qdfelim )
  149. xdiatpo4(ji,jj,jk) = zlim2
  150. xlimdfe (ji,jj,jk) = MIN( 1., zlim4 )
  151. xlimdia (ji,jj,jk) = MIN( zlim1, zlim2, zlim3, zlim4 )
  152. xlimsi (ji,jj,jk) = MIN( zlim1, zlim2, zlim4 )
  153. END DO
  154. END DO
  155. END DO
  156. ! Compute the fraction of nanophytoplankton that is made of calcifiers
  157. ! --------------------------------------------------------------------
  158. DO jk = 1, jpkm1
  159. DO jj = 1, jpj
  160. DO ji = 1, jpi
  161. zlim1 = ( trb(ji,jj,jk,jpno3) * concnnh4 + trb(ji,jj,jk,jpnh4) * concnno3 ) &
  162. & / ( concnno3 * concnnh4 + concnnh4 * trb(ji,jj,jk,jpno3) + concnno3 * trb(ji,jj,jk,jpnh4) )
  163. zlim2 = trb(ji,jj,jk,jppo4) / ( trb(ji,jj,jk,jppo4) + concnnh4 )
  164. zlim3 = trb(ji,jj,jk,jpfer) / ( trb(ji,jj,jk,jpfer) + 5.E-11 )
  165. ztem1 = MAX( 0., tsn(ji,jj,jk,jp_tem) )
  166. ztem2 = tsn(ji,jj,jk,jp_tem) - 10.
  167. zetot1 = MAX( 0., etot_ndcy(ji,jj,jk) - 1.) / ( 4. + etot_ndcy(ji,jj,jk) )
  168. zetot2 = 30. / ( 30. + etot_ndcy(ji,jj,jk) )
  169. xfracal(ji,jj,jk) = caco3r * MIN( zlim1, zlim2, zlim3 ) &
  170. & * ztem1 / ( 0.1 + ztem1 ) &
  171. & * MAX( 1., trb(ji,jj,jk,jpphy) * 1.e6 / 2. ) &
  172. & * zetot1 * zetot2 &
  173. & * ( 1. + EXP(-ztem2 * ztem2 / 25. ) ) &
  174. & * MIN( 1., 50. / ( hmld(ji,jj) + rtrn ) )
  175. xfracal(ji,jj,jk) = MIN( 0.8 , xfracal(ji,jj,jk) )
  176. xfracal(ji,jj,jk) = MAX( 0.02, xfracal(ji,jj,jk) )
  177. END DO
  178. END DO
  179. END DO
  180. !
  181. DO jk = 1, jpkm1
  182. DO jj = 1, jpj
  183. DO ji = 1, jpi
  184. ! denitrification factor computed from O2 levels
  185. nitrfac(ji,jj,jk) = MAX( 0.e0, 0.4 * ( 6.e-6 - trb(ji,jj,jk,jpoxy) ) &
  186. & / ( oxymin + trb(ji,jj,jk,jpoxy) ) )
  187. nitrfac(ji,jj,jk) = MIN( 1., nitrfac(ji,jj,jk) )
  188. !
  189. ! denitrification factor computed from NO3 levels
  190. nitrfac2(ji,jj,jk) = MAX( 0.e0, ( 1.E-6 - trb(ji,jj,jk,jpno3) ) &
  191. & / ( 1.E-6 + trb(ji,jj,jk,jpno3) ) )
  192. nitrfac2(ji,jj,jk) = MIN( 1., nitrfac2(ji,jj,jk) )
  193. END DO
  194. END DO
  195. END DO
  196. !
  197. IF( lk_iomput .AND. knt == nrdttrc ) THEN ! save output diagnostics
  198. IF( iom_use( "xfracal" ) ) CALL iom_put( "xfracal", xfracal(:,:,:) * tmask(:,:,:) ) ! euphotic layer deptht
  199. IF( iom_use( "LNnut" ) ) CALL iom_put( "LNnut" , xlimphy(:,:,:) * tmask(:,:,:) ) ! Nutrient limitation term
  200. IF( iom_use( "LDnut" ) ) CALL iom_put( "LDnut" , xlimdia(:,:,:) * tmask(:,:,:) ) ! Nutrient limitation term
  201. IF( iom_use( "LNFe" ) ) CALL iom_put( "LNFe" , xlimnfe(:,:,:) * tmask(:,:,:) ) ! Iron limitation term
  202. IF( iom_use( "LDFe" ) ) CALL iom_put( "LDFe" , xlimdfe(:,:,:) * tmask(:,:,:) ) ! Iron limitation term
  203. ENDIF
  204. !
  205. IF( nn_timing == 1 ) CALL timing_stop('p4z_lim')
  206. !
  207. END SUBROUTINE p4z_lim
  208. SUBROUTINE p4z_lim_init
  209. !!----------------------------------------------------------------------
  210. !! *** ROUTINE p4z_lim_init ***
  211. !!
  212. !! ** Purpose : Initialization of nutrient limitation parameters
  213. !!
  214. !! ** Method : Read the nampislim namelist and check the parameters
  215. !! called at the first timestep (nittrc000)
  216. !!
  217. !! ** input : Namelist nampislim
  218. !!
  219. !!----------------------------------------------------------------------
  220. NAMELIST/nampislim/ concnno3, concdno3, concnnh4, concdnh4, concnfer, concdfer, concbfe, &
  221. & concbno3, concbnh4, xsizedia, xsizephy, xsizern, xsizerd, &
  222. & xksi1, xksi2, xkdoc, qnfelim, qdfelim, caco3r, oxymin
  223. INTEGER :: ios ! Local integer output status for namelist read
  224. REWIND( numnatp_ref ) ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters
  225. READ ( numnatp_ref, nampislim, IOSTAT = ios, ERR = 901)
  226. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist', lwp )
  227. REWIND( numnatp_cfg ) ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters
  228. READ ( numnatp_cfg, nampislim, IOSTAT = ios, ERR = 902 )
  229. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp )
  230. IF(lwm) WRITE ( numonp, nampislim )
  231. IF(lwp) THEN ! control print
  232. WRITE(numout,*) ' '
  233. WRITE(numout,*) ' Namelist parameters for nutrient limitations, nampislim'
  234. WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
  235. WRITE(numout,*) ' mean rainratio caco3r = ', caco3r
  236. WRITE(numout,*) ' NO3 half saturation of nanophyto concnno3 = ', concnno3
  237. WRITE(numout,*) ' NO3 half saturation of diatoms concdno3 = ', concdno3
  238. WRITE(numout,*) ' NH4 half saturation for phyto concnnh4 = ', concnnh4
  239. WRITE(numout,*) ' NH4 half saturation for diatoms concdnh4 = ', concdnh4
  240. WRITE(numout,*) ' half saturation constant for Si uptake xksi1 = ', xksi1
  241. WRITE(numout,*) ' half saturation constant for Si/C xksi2 = ', xksi2
  242. WRITE(numout,*) ' half-sat. of DOC remineralization xkdoc = ', xkdoc
  243. WRITE(numout,*) ' Iron half saturation for nanophyto concnfer = ', concnfer
  244. WRITE(numout,*) ' Iron half saturation for diatoms concdfer = ', concdfer
  245. WRITE(numout,*) ' size ratio for nanophytoplankton xsizern = ', xsizern
  246. WRITE(numout,*) ' size ratio for diatoms xsizerd = ', xsizerd
  247. WRITE(numout,*) ' NO3 half saturation of bacteria concbno3 = ', concbno3
  248. WRITE(numout,*) ' NH4 half saturation for bacteria concbnh4 = ', concbnh4
  249. WRITE(numout,*) ' Minimum size criteria for diatoms xsizedia = ', xsizedia
  250. WRITE(numout,*) ' Minimum size criteria for nanophyto xsizephy = ', xsizephy
  251. WRITE(numout,*) ' Fe half saturation for bacteria concbfe = ', concbfe
  252. WRITE(numout,*) ' halk saturation constant for anoxia oxymin =' , oxymin
  253. WRITE(numout,*) ' optimal Fe quota for nano. qnfelim = ', qnfelim
  254. WRITE(numout,*) ' Optimal Fe quota for diatoms qdfelim = ', qdfelim
  255. ENDIF
  256. !
  257. nitrfac (:,:,:) = 0._wp
  258. nitrfac2(:,:,:) = 0._wp
  259. !
  260. END SUBROUTINE p4z_lim_init
  261. #else
  262. !!======================================================================
  263. !! Dummy module : No PISCES bio-model
  264. !!======================================================================
  265. CONTAINS
  266. SUBROUTINE p4z_lim ! Empty routine
  267. END SUBROUTINE p4z_lim
  268. #endif
  269. !!======================================================================
  270. END MODULE p4zlim