p4zrem.F90 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. MODULE p4zrem
  2. !!======================================================================
  3. !! *** MODULE p4zrem ***
  4. !! TOP : PISCES Compute remineralization/dissolution of organic compounds
  5. !!=========================================================================
  6. !! History : 1.0 ! 2004 (O. Aumont) Original code
  7. !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90
  8. !! 3.4 ! 2011-06 (O. Aumont, C. Ethe) Quota model for iron
  9. !!----------------------------------------------------------------------
  10. #if defined key_pisces
  11. !!----------------------------------------------------------------------
  12. !! 'key_top' and TOP models
  13. !! 'key_pisces' PISCES bio-model
  14. !!----------------------------------------------------------------------
  15. !! p4z_rem : Compute remineralization/dissolution of organic compounds
  16. !! p4z_rem_init : Initialisation of parameters for remineralisation
  17. !! p4z_rem_alloc : Allocate remineralisation variables
  18. !!----------------------------------------------------------------------
  19. USE oce_trc ! shared variables between ocean and passive tracers
  20. USE trc ! passive tracers common variables
  21. USE sms_pisces ! PISCES Source Minus Sink variables
  22. USE p4zopt ! optical model
  23. USE p4zche ! chemical model
  24. USE p4zprod ! Growth rate of the 2 phyto groups
  25. USE p4zmeso ! Sources and sinks of mesozooplankton
  26. USE p4zint ! interpolation and computation of various fields
  27. USE p4zlim
  28. USE prtctl_trc ! print control for debugging
  29. USE iom ! I/O manager
  30. IMPLICIT NONE
  31. PRIVATE
  32. PUBLIC p4z_rem ! called in p4zbio.F90
  33. PUBLIC p4z_rem_init ! called in trcsms_pisces.F90
  34. PUBLIC p4z_rem_alloc
  35. !! * Shared module variables
  36. REAL(wp), PUBLIC :: xremik !: remineralisation rate of POC
  37. REAL(wp), PUBLIC :: xremip !: remineralisation rate of DOC
  38. REAL(wp), PUBLIC :: nitrif !: NH4 nitrification rate
  39. REAL(wp), PUBLIC :: xsirem !: remineralisation rate of POC
  40. REAL(wp), PUBLIC :: xsiremlab !: fast remineralisation rate of POC
  41. REAL(wp), PUBLIC :: xsilab !: fraction of labile biogenic silica
  42. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: denitr !: denitrification array
  43. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: denitnh4 !: - - - - -
  44. !!* Substitution
  45. # include "top_substitute.h90"
  46. !!----------------------------------------------------------------------
  47. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  48. !! $Id: p4zrem.F90 3160 2011-11-20 14:27:18Z cetlod $
  49. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  50. !!----------------------------------------------------------------------
  51. CONTAINS
  52. SUBROUTINE p4z_rem( kt, knt )
  53. !!---------------------------------------------------------------------
  54. !! *** ROUTINE p4z_rem ***
  55. !!
  56. !! ** Purpose : Compute remineralization/scavenging of organic compounds
  57. !!
  58. !! ** Method : - ???
  59. !!---------------------------------------------------------------------
  60. !
  61. INTEGER, INTENT(in) :: kt, knt ! ocean time step
  62. !
  63. INTEGER :: ji, jj, jk
  64. REAL(wp) :: zremip, zremik, zsiremin, zammonic
  65. REAL(wp) :: zsatur, zsatur2, znusil, znusil2, zdep, zdepmin, zfactdep
  66. REAL(wp) :: zbactfer, zorem, zorem2, zofer, zolimit
  67. REAL(wp) :: zosil, ztem
  68. #if ! defined key_kriest
  69. REAL(wp) :: zofer2
  70. #endif
  71. REAL(wp) :: zonitr, zstep, zfact
  72. CHARACTER (len=25) :: charout
  73. REAL(wp), POINTER, DIMENSION(:,: ) :: ztempbac
  74. REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepbac, zolimi, zdepprod, zw3d
  75. REAL(wp), POINTER, DIMENSION(:,:,:) :: zoxyrem
  76. !!---------------------------------------------------------------------
  77. !
  78. IF( nn_timing == 1 ) CALL timing_start('p4z_rem')
  79. !
  80. ! Allocate temporary workspace
  81. CALL wrk_alloc( jpi, jpj, ztempbac )
  82. CALL wrk_alloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zoxyrem )
  83. ! Initialisation of temprary arrys
  84. zdepprod(:,:,:) = 1._wp
  85. ztempbac(:,:) = 0._wp
  86. ! Computation of the mean phytoplankton concentration as
  87. ! a crude estimate of the bacterial biomass
  88. ! this parameterization has been deduced from a model version
  89. ! that was modeling explicitely bacteria
  90. ! -------------------------------------------------------
  91. DO jk = 1, jpkm1
  92. DO jj = 1, jpj
  93. DO ji = 1, jpi
  94. zdep = MAX( hmld(ji,jj), heup(ji,jj) )
  95. IF( fsdept(ji,jj,jk) < zdep ) THEN
  96. zdepbac(ji,jj,jk) = MIN( 0.7 * ( trb(ji,jj,jk,jpzoo) + 2.* trb(ji,jj,jk,jpmes) ), 4.e-6 )
  97. ztempbac(ji,jj) = zdepbac(ji,jj,jk)
  98. ELSE
  99. zdepmin = MIN( 1., zdep / fsdept(ji,jj,jk) )
  100. zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj)
  101. zdepprod(ji,jj,jk) = zdepmin**0.273
  102. ENDIF
  103. END DO
  104. END DO
  105. END DO
  106. DO jk = 1, jpkm1
  107. DO jj = 1, jpj
  108. DO ji = 1, jpi
  109. zstep = xstep
  110. # if defined key_degrad
  111. zstep = zstep * facvol(ji,jj,jk)
  112. # endif
  113. ! DOC ammonification. Depends on depth, phytoplankton biomass
  114. ! and a limitation term which is supposed to be a parameterization
  115. ! of the bacterial activity.
  116. zremik = xremik * zstep / 1.e-6 * xlimbac(ji,jj,jk) * zdepbac(ji,jj,jk)
  117. zremik = MAX( zremik, 2.74e-4 * xstep )
  118. ! Ammonification in oxic waters with oxygen consumption
  119. ! -----------------------------------------------------
  120. zolimit = zremik * ( 1.- nitrfac(ji,jj,jk) ) * trb(ji,jj,jk,jpdoc)
  121. zolimi(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpoxy) - rtrn ) / o2ut, zolimit )
  122. ! Ammonification in suboxic waters with denitrification
  123. ! -------------------------------------------------------
  124. zammonic = zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc)
  125. denitr(ji,jj,jk) = zammonic * ( 1. - nitrfac2(ji,jj,jk) )
  126. denitr(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit, denitr(ji,jj,jk) )
  127. zoxyrem(ji,jj,jk) = zammonic - denitr(ji,jj,jk)
  128. !
  129. zolimi (ji,jj,jk) = MAX( 0.e0, zolimi (ji,jj,jk) )
  130. denitr (ji,jj,jk) = MAX( 0.e0, denitr (ji,jj,jk) )
  131. zoxyrem(ji,jj,jk) = MAX( 0.e0, zoxyrem(ji,jj,jk) )
  132. !
  133. END DO
  134. END DO
  135. END DO
  136. DO jk = 1, jpkm1
  137. DO jj = 1, jpj
  138. DO ji = 1, jpi
  139. zstep = xstep
  140. # if defined key_degrad
  141. zstep = zstep * facvol(ji,jj,jk)
  142. # endif
  143. ! NH4 nitrification to NO3. Ceased for oxygen concentrations
  144. ! below 2 umol/L. Inhibited at strong light
  145. ! ----------------------------------------------------------
  146. zonitr =nitrif * zstep * trb(ji,jj,jk,jpnh4) / ( 1.+ emoy(ji,jj,jk) ) * ( 1.- nitrfac(ji,jj,jk) )
  147. denitnh4(ji,jj,jk) = nitrif * zstep * trb(ji,jj,jk,jpnh4) * nitrfac(ji,jj,jk)
  148. denitnh4(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenita, denitnh4(ji,jj,jk) )
  149. ! Update of the tracers trends
  150. ! ----------------------------
  151. tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) - zonitr - denitnh4(ji,jj,jk)
  152. tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zonitr - rdenita * denitnh4(ji,jj,jk)
  153. tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2nit * zonitr
  154. tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2 * rno3 * zonitr &
  155. & + rno3 * ( rdenita - 1. ) * denitnh4(ji,jj,jk)
  156. END DO
  157. END DO
  158. END DO
  159. IF(ln_ctl) THEN ! print mean trends (used for debugging)
  160. WRITE(charout, FMT="('rem1')")
  161. CALL prt_ctl_trc_info(charout)
  162. CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
  163. ENDIF
  164. DO jk = 1, jpkm1
  165. DO jj = 1, jpj
  166. DO ji = 1, jpi
  167. ! Bacterial uptake of iron. No iron is available in DOC. So
  168. ! Bacteries are obliged to take up iron from the water. Some
  169. ! studies (especially at Papa) have shown this uptake to be significant
  170. ! ----------------------------------------------------------
  171. zbactfer = 10.e-6 * rfact2 * prmax(ji,jj,jk) * xlimbacl(ji,jj,jk) &
  172. & * trb(ji,jj,jk,jpfer) / ( 2.5E-10 + trb(ji,jj,jk,jpfer) ) &
  173. & * zdepprod(ji,jj,jk) * zdepbac(ji,jj,jk)
  174. #if defined key_kriest
  175. tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zbactfer*0.05
  176. tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zbactfer*0.05
  177. #else
  178. tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zbactfer*0.16
  179. tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zbactfer*0.12
  180. tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + zbactfer*0.04
  181. #endif
  182. END DO
  183. END DO
  184. END DO
  185. IF(ln_ctl) THEN ! print mean trends (used for debugging)
  186. WRITE(charout, FMT="('rem2')")
  187. CALL prt_ctl_trc_info(charout)
  188. CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
  189. ENDIF
  190. DO jk = 1, jpkm1
  191. DO jj = 1, jpj
  192. DO ji = 1, jpi
  193. zstep = xstep
  194. # if defined key_degrad
  195. zstep = zstep * facvol(ji,jj,jk)
  196. # endif
  197. ! POC disaggregation by turbulence and bacterial activity.
  198. ! --------------------------------------------------------
  199. zremip = xremip * zstep * tgfunc(ji,jj,jk) * ( 1.- 0.55 * nitrfac(ji,jj,jk) )
  200. ! POC disaggregation rate is reduced in anoxic zone as shown by
  201. ! sediment traps data. In oxic area, the exponent of the martin s
  202. ! law is around -0.87. In anoxic zone, it is around -0.35. This
  203. ! means a disaggregation constant about 0.5 the value in oxic zones
  204. ! -----------------------------------------------------------------
  205. zorem = zremip * trb(ji,jj,jk,jppoc)
  206. zofer = zremip * trb(ji,jj,jk,jpsfe)
  207. #if ! defined key_kriest
  208. zorem2 = zremip * trb(ji,jj,jk,jpgoc)
  209. zofer2 = zremip * trb(ji,jj,jk,jpbfe)
  210. #else
  211. zorem2 = zremip * trb(ji,jj,jk,jpnum)
  212. #endif
  213. ! Update the appropriate tracers trends
  214. ! -------------------------------------
  215. tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zorem
  216. tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + zofer
  217. #if defined key_kriest
  218. tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) - zorem
  219. tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) - zorem2
  220. tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) - zofer
  221. #else
  222. tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zorem2 - zorem
  223. tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) - zorem2
  224. tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zofer2 - zofer
  225. tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) - zofer2
  226. #endif
  227. END DO
  228. END DO
  229. END DO
  230. IF(ln_ctl) THEN ! print mean trends (used for debugging)
  231. WRITE(charout, FMT="('rem3')")
  232. CALL prt_ctl_trc_info(charout)
  233. CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
  234. ENDIF
  235. DO jk = 1, jpkm1
  236. DO jj = 1, jpj
  237. DO ji = 1, jpi
  238. zstep = xstep
  239. # if defined key_degrad
  240. zstep = zstep * facvol(ji,jj,jk)
  241. # endif
  242. ! Remineralization rate of BSi depedant on T and saturation
  243. ! ---------------------------------------------------------
  244. zsatur = ( sio3eq(ji,jj,jk) - trb(ji,jj,jk,jpsil) ) / ( sio3eq(ji,jj,jk) + rtrn )
  245. zsatur = MAX( rtrn, zsatur )
  246. zsatur2 = ( 1. + tsn(ji,jj,jk,jp_tem) / 400.)**37
  247. znusil = 0.225 * ( 1. + tsn(ji,jj,jk,jp_tem) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25
  248. znusil2 = 0.225 * ( 1. + tsn(ji,jj,1,jp_tem) / 15.) + 0.775 * zsatur2
  249. ! Two classes of BSi are considered : a labile fraction and
  250. ! a more refractory one. The ratio between both fractions is
  251. ! constant and specified in the namelist.
  252. ! ----------------------------------------------------------
  253. zdep = MAX( hmld(ji,jj), heup(ji,jj) )
  254. zdep = MAX( 0., fsdept(ji,jj,jk) - zdep )
  255. ztem = MAX( tsn(ji,jj,1,jp_tem), 0. )
  256. zfactdep = xsilab * EXP(-( xsiremlab - xsirem ) * znusil2 * zdep / wsbio2 ) * ztem / ( ztem + 10. )
  257. zsiremin = ( xsiremlab * zfactdep + xsirem * ( 1. - zfactdep ) ) * zstep * znusil
  258. zosil = zsiremin * trb(ji,jj,jk,jpgsi)
  259. !
  260. tra(ji,jj,jk,jpgsi) = tra(ji,jj,jk,jpgsi) - zosil
  261. tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + zosil
  262. !
  263. END DO
  264. END DO
  265. END DO
  266. IF(ln_ctl) THEN ! print mean trends (used for debugging)
  267. WRITE(charout, FMT="('rem4')")
  268. CALL prt_ctl_trc_info(charout)
  269. CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
  270. ENDIF
  271. ! Update the arrays TRA which contain the biological sources and sinks
  272. ! --------------------------------------------------------------------
  273. DO jk = 1, jpkm1
  274. tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk)
  275. tra(:,:,jk,jpnh4) = tra(:,:,jk,jpnh4) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk)
  276. tra(:,:,jk,jpno3) = tra(:,:,jk,jpno3) - denitr (:,:,jk) * rdenit
  277. tra(:,:,jk,jpdoc) = tra(:,:,jk,jpdoc) - zolimi (:,:,jk) - denitr(:,:,jk) - zoxyrem(:,:,jk)
  278. tra(:,:,jk,jpoxy) = tra(:,:,jk,jpoxy) - zolimi (:,:,jk) * o2ut
  279. tra(:,:,jk,jpdic) = tra(:,:,jk,jpdic) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk)
  280. tra(:,:,jk,jptal) = tra(:,:,jk,jptal) + rno3 * ( zolimi(:,:,jk) + zoxyrem(:,:,jk) &
  281. & + ( rdenit + 1.) * denitr(:,:,jk) )
  282. END DO
  283. IF( knt == nrdttrc ) THEN
  284. CALL wrk_alloc( jpi, jpj, jpk, zw3d )
  285. zfact = 1.e+3 * rfact2r ! conversion from mol/l/kt to mol/m3/s
  286. !
  287. IF( iom_use( "REMIN" ) ) THEN
  288. zw3d(:,:,:) = zolimi(:,:,:) * tmask(:,:,:) * zfact ! Remineralisation rate
  289. CALL iom_put( "REMIN" , zw3d )
  290. ENDIF
  291. IF( iom_use( "DENIT" ) ) THEN
  292. zw3d(:,:,:) = denitr(:,:,:) * rdenit * rno3 * tmask(:,:,:) * zfact ! Denitrification
  293. CALL iom_put( "DENIT" , zw3d )
  294. ENDIF
  295. !
  296. CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
  297. ENDIF
  298. IF(ln_ctl) THEN ! print mean trends (used for debugging)
  299. WRITE(charout, FMT="('rem6')")
  300. CALL prt_ctl_trc_info(charout)
  301. CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
  302. ENDIF
  303. !
  304. CALL wrk_dealloc( jpi, jpj, ztempbac )
  305. CALL wrk_dealloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zoxyrem )
  306. !
  307. IF( nn_timing == 1 ) CALL timing_stop('p4z_rem')
  308. !
  309. END SUBROUTINE p4z_rem
  310. SUBROUTINE p4z_rem_init
  311. !!----------------------------------------------------------------------
  312. !! *** ROUTINE p4z_rem_init ***
  313. !!
  314. !! ** Purpose : Initialization of remineralization parameters
  315. !!
  316. !! ** Method : Read the nampisrem namelist and check the parameters
  317. !! called at the first timestep
  318. !!
  319. !! ** input : Namelist nampisrem
  320. !!
  321. !!----------------------------------------------------------------------
  322. NAMELIST/nampisrem/ xremik, xremip, nitrif, xsirem, xsiremlab, xsilab
  323. INTEGER :: ios ! Local integer output status for namelist read
  324. REWIND( numnatp_ref ) ! Namelist nampisrem in reference namelist : Pisces remineralization
  325. READ ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901)
  326. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in reference namelist', lwp )
  327. REWIND( numnatp_cfg ) ! Namelist nampisrem in configuration namelist : Pisces remineralization
  328. READ ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 )
  329. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp )
  330. IF(lwm) WRITE ( numonp, nampisrem )
  331. IF(lwp) THEN ! control print
  332. WRITE(numout,*) ' '
  333. WRITE(numout,*) ' Namelist parameters for remineralization, nampisrem'
  334. WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
  335. WRITE(numout,*) ' remineralisation rate of POC xremip =', xremip
  336. WRITE(numout,*) ' remineralization rate of DOC xremik =', xremik
  337. WRITE(numout,*) ' remineralization rate of Si xsirem =', xsirem
  338. WRITE(numout,*) ' fast remineralization rate of Si xsiremlab =', xsiremlab
  339. WRITE(numout,*) ' fraction of labile biogenic silica xsilab =', xsilab
  340. WRITE(numout,*) ' NH4 nitrification rate nitrif =', nitrif
  341. ENDIF
  342. !
  343. denitr (:,:,:) = 0._wp
  344. denitnh4(:,:,:) = 0._wp
  345. !
  346. END SUBROUTINE p4z_rem_init
  347. INTEGER FUNCTION p4z_rem_alloc()
  348. !!----------------------------------------------------------------------
  349. !! *** ROUTINE p4z_rem_alloc ***
  350. !!----------------------------------------------------------------------
  351. ALLOCATE( denitr(jpi,jpj,jpk), denitnh4(jpi,jpj,jpk), STAT=p4z_rem_alloc )
  352. !
  353. IF( p4z_rem_alloc /= 0 ) CALL ctl_warn('p4z_rem_alloc: failed to allocate arrays')
  354. !
  355. END FUNCTION p4z_rem_alloc
  356. #else
  357. !!======================================================================
  358. !! Dummy module : No PISCES bio-model
  359. !!======================================================================
  360. CONTAINS
  361. SUBROUTINE p4z_rem ! Empty routine
  362. END SUBROUTINE p4z_rem
  363. #endif
  364. !!======================================================================
  365. END MODULE p4zrem