New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
p4zrem.F90 in NEMO/trunk/src/TOP/PISCES/P4Z – NEMO

source: NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90

Last change on this file was 15459, checked in by cetlod, 2 years ago

Various bug fixes and more comments in PISCES routines ; sette test OK in debug mode, nn_hls=1/2, with tiling ; run.stat unchanged ; of course tracer.stat different

  • Property svn:keywords set to Id
File size: 17.3 KB
RevLine 
[3443]1MODULE p4zrem
2   !!======================================================================
3   !!                         ***  MODULE p4zrem  ***
4   !! TOP :   PISCES Compute remineralization/dissolution of organic compounds
[15459]5   !!         except for POC which is treated in p4zpoc.F90
6   !!         This module is common to both PISCES and PISCES-QUOTA
[3443]7   !!=========================================================================
8   !! History :   1.0  !  2004     (O. Aumont) Original code
9   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
10   !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
11   !!----------------------------------------------------------------------
12   !!   p4z_rem       :  Compute remineralization/dissolution of organic compounds
13   !!   p4z_rem_init  :  Initialisation of parameters for remineralisation
14   !!   p4z_rem_alloc :  Allocate remineralisation variables
15   !!----------------------------------------------------------------------
16   USE oce_trc         !  shared variables between ocean and passive tracers
17   USE trc             !  passive tracers common variables
18   USE sms_pisces      !  PISCES Source Minus Sink variables
19   USE p4zche          !  chemical model
20   USE p4zprod         !  Growth rate of the 2 phyto groups
[15459]21   USE p4zlim          !  Nutrient limitation terms
[13286]22   USE prtctl          !  print control for debugging
[3443]23   USE iom             !  I/O manager
24
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   p4z_rem         ! called in p4zbio.F90
[15459]30   PUBLIC   p4z_rem_init    ! called in trcini_pisces.F90
31   PUBLIC   p4z_rem_alloc   ! called in trcini_pisces.F90
[3443]32
[15459]33   !! * Shared module variables
34   REAL(wp), PUBLIC ::   xremikc    !: remineralisation rate of DOC (p5z)
35   REAL(wp), PUBLIC ::   xremikn    !: remineralisation rate of DON (p5z)
36   REAL(wp), PUBLIC ::   xremikp    !: remineralisation rate of DOP (p5z)
[9169]37   REAL(wp), PUBLIC ::   nitrif     !: NH4 nitrification rate
[15459]38   REAL(wp), PUBLIC ::   xsirem     !: remineralisation rate of biogenic silica
39   REAL(wp), PUBLIC ::   xsiremlab  !: fast remineralisation rate of BSi
[9169]40   REAL(wp), PUBLIC ::   xsilab     !: fraction of labile biogenic silica
41   REAL(wp), PUBLIC ::   feratb     !: Fe/C quota in bacteria
[15459]42   REAL(wp), PUBLIC ::   xkferb     !: Half-saturation constant for bacterial Fe/C
[3443]43
[9169]44   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   denitr   !: denitrification array
[3443]45
[12377]46   !! * Substitutions
47#  include "do_loop_substitute.h90"
[13237]48#  include "domzgr_substitute.h90"
[3443]49   !!----------------------------------------------------------------------
[10067]50   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
[10069]51   !! $Id$
[10068]52   !! Software governed by the CeCILL license (see ./LICENSE)
[3443]53   !!----------------------------------------------------------------------
54CONTAINS
55
[12377]56   SUBROUTINE p4z_rem( kt, knt, Kbb, Kmm, Krhs )
[3443]57      !!---------------------------------------------------------------------
58      !!                     ***  ROUTINE p4z_rem  ***
59      !!
[15459]60      !! ** Purpose :   Compute remineralization/dissolution of organic compounds
61      !!                Computes also nitrification of ammonium
62      !!                The solubilization/remineralization of POC is treated
63      !!                in p4zpoc.F90. The dissolution of calcite is processed
64      !!                in p4zlys.F90.
[3443]65      !!
[15459]66      !! ** Method  : - Bacterial biomass is computed implicitely based on a
67      !!                parameterization developed from an explicit modeling
68      !!                of PISCES in an alternative version
[3443]69      !!---------------------------------------------------------------------
[12377]70      INTEGER, INTENT(in) ::   kt, knt         ! ocean time step
71      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs  ! time level indices
[3443]72      !
73      INTEGER  ::   ji, jj, jk
[7646]74      REAL(wp) ::   zremik, zremikc, zremikn, zremikp, zsiremin, zfact 
[3446]75      REAL(wp) ::   zsatur, zsatur2, znusil, znusil2, zdep, zdepmin, zfactdep
[15459]76      REAL(wp) ::   zbactfer, zonitr, zrfact2
77      REAL(wp) ::   zammonic, zoxyremc, zosil, ztem, zdenitnh4, zolimic
[3443]78      CHARACTER (len=25) :: charout
[15459]79      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdepbac, zolimi, zfacsi, zfacsib, zdepeff, zfebact
[9125]80      REAL(wp), DIMENSION(jpi,jpj    ) :: ztempbac
[3443]81      !!---------------------------------------------------------------------
82      !
[9124]83      IF( ln_timing )   CALL timing_start('p4z_rem')
[3443]84      !
[15459]85      ! Initialisation of arrays
[10362]86      zdepeff (:,:,:) = 0.3_wp
[7753]87      zfacsib(:,:,:)  = xsilab / ( 1.0 - xsilab )
[10362]88      zfebact(:,:,:)  = 0._wp
[7753]89      zfacsi(:,:,:)   = xsilab
[3443]90
[15459]91      ! Computation of the mean bacterial concentration
[3443]92      ! this parameterization has been deduced from a model version
[15459]93      ! that was modeling explicitely bacteria. This is a very old param
94      ! that will be very soon updated based on results from a much more
95      ! recent version of PISCES with bacteria.
96      ! ----------------------------------------------------------------
[15090]97      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
[15459]98         zdep = MAX( hmld(ji,jj), heup_01(ji,jj) )
99         IF ( gdept(ji,jj,jk,Kmm) < zdep ) THEN
100            zdepbac(ji,jj,jk) = 0.6 * ( MAX(0.0, tr(ji,jj,jk,jpzoo,Kbb) + tr(ji,jj,jk,jpmes,Kbb) ) * 1.0E6 )**0.6 * 1.E-6
[12377]101            ztempbac(ji,jj)   = zdepbac(ji,jj,jk)
[15459]102!         IF( gdept(ji,jj,jk,Kmm) >= zdep ) THEN
[12377]103         ELSE
104            zdepmin = MIN( 1., zdep / gdept(ji,jj,jk,Kmm) )
105            zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj)
[15459]106!            zdepeff(ji,jj,jk) = zdepeff(ji,jj,jk) * zdepmin**0.3
107            zdepeff(ji,jj,jk) = zdepeff(ji,jj,jk) * zdepmin**0.6
[12377]108         ENDIF
109      END_3D
[3443]110
[15459]111      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
112         ! DOC ammonification. Depends on depth, phytoplankton biomass
113         ! and a limitation term which is supposed to be a parameterization of the bacterial activity.
114         ! --------------------------------------------------------------------------
115         zremik = xstep / 1.e-6 * xlimbac(ji,jj,jk) * zdepbac(ji,jj,jk) 
116         zremik = MAX( zremik, 2.74e-4 * xstep / xremikc )
117         zremikc = xremikc * zremik
118         ! Ammonification in oxic waters with oxygen consumption
119         ! -----------------------------------------------------
120         zolimic = zremikc * ( 1.- nitrfac(ji,jj,jk) ) * tr(ji,jj,jk,jpdoc,Kbb) 
121         zolimic = MAX(0., MIN( ( tr(ji,jj,jk,jpoxy,Kbb) - rtrn ) / o2ut, zolimic ) ) 
122         zolimi(ji,jj,jk) = zolimic
[8533]123
[15459]124         ! Ammonification in suboxic waters with denitrification
125         ! -----------------------------------------------------
126         zammonic = zremikc * nitrfac(ji,jj,jk) * tr(ji,jj,jk,jpdoc,Kbb)
127         denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) )
128         denitr(ji,jj,jk)  = MAX(0., MIN(  ( tr(ji,jj,jk,jpno3,Kbb) - rtrn ) / rdenit, denitr(ji,jj,jk) ) )
[3443]129
[15459]130         ! Ammonification in waters depleted in O2 and NO3 based on
131         ! other redox processes
132         ! --------------------------------------------------------
133         zoxyremc          = MAX(0., zammonic - denitr(ji,jj,jk) )
[3443]134
[15459]135         ! Update of the the trends arrays
136         tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) - denitr (ji,jj,jk) * rdenit
137         tr(ji,jj,jk,jpdoc,Krhs) = tr(ji,jj,jk,jpdoc,Krhs) - ( zolimic + denitr(ji,jj,jk) + zoxyremc )
138         tr(ji,jj,jk,jpoxy,Krhs) = tr(ji,jj,jk,jpoxy,Krhs) - zolimic * o2ut
139         tr(ji,jj,jk,jpdic,Krhs) = tr(ji,jj,jk,jpdic,Krhs) + zolimic + denitr(ji,jj,jk) + zoxyremc
140         IF( ln_p4z ) THEN ! PISCES-std
141            tr(ji,jj,jk,jppo4,Krhs) = tr(ji,jj,jk,jppo4,Krhs) + zolimic + denitr(ji,jj,jk) + zoxyremc
142            tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zolimic + denitr(ji,jj,jk) + zoxyremc
143            tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) + rno3 * ( zolimic + zoxyremc + ( rdenit + 1.) * denitr(ji,jj,jk) )
144         ELSE  ! PISCES-QUOTA (p5z)
145            zremikn = xremikn / xremikc * tr(ji,jj,jk,jpdon,kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn )
146            zremikp = xremikp / xremikc * tr(ji,jj,jk,jpdop,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn )
147            tr(ji,jj,jk,jppo4,Krhs) = tr(ji,jj,jk,jppo4,Krhs) + zremikp * ( zolimic + denitr(ji,jj,jk) + zoxyremc )
148            tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zremikn * ( zolimic + denitr(ji,jj,jk) + zoxyremc )
149            tr(ji,jj,jk,jpdon,Krhs) = tr(ji,jj,jk,jpdon,Krhs) - zremikn * ( zolimic + denitr(ji,jj,jk) + zoxyremc )
150            tr(ji,jj,jk,jpdop,Krhs) = tr(ji,jj,jk,jpdop,Krhs) - zremikp * ( zolimic + denitr(ji,jj,jk) + zoxyremc )
151            tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) + rno3 * zremikn * ( zolimic + zoxyremc + ( rdenit + 1.) * denitr(ji,jj,jk) )
152         ENDIF
153      END_3D
[7646]154
[15090]155      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
[12377]156         ! NH4 nitrification to NO3. Ceased for oxygen concentrations
157         ! below 2 umol/L. Inhibited at strong light
158         ! ----------------------------------------------------------
159         zonitr  = nitrif * xstep * tr(ji,jj,jk,jpnh4,Kbb) * ( 1.- nitrfac(ji,jj,jk) )  &
160         &         / ( 1.+ emoy(ji,jj,jk) ) * ( 1. + fr_i(ji,jj) * emoy(ji,jj,jk) ) 
161         zdenitnh4 = nitrif * xstep * tr(ji,jj,jk,jpnh4,Kbb) * nitrfac(ji,jj,jk)
[15459]162         zdenitnh4 = MAX(0., MIN(  ( tr(ji,jj,jk,jpno3,Kbb) - rtrn ) / rdenita, zdenitnh4 ) )
[12377]163         ! Update of the tracers trends
164         ! ----------------------------
165         tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) - zonitr - zdenitnh4
166         tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) + zonitr - rdenita * zdenitnh4
167         tr(ji,jj,jk,jpoxy,Krhs) = tr(ji,jj,jk,jpoxy,Krhs) - o2nit * zonitr
168         tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) - 2 * rno3 * zonitr + rno3 * ( rdenita - 1. ) * zdenitnh4
169      END_3D
[3443]170
[15459]171      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
[7753]172         WRITE(charout, FMT="('rem1')")
[13286]173         CALL prt_ctl_info( charout, cdcomp = 'top' )
174         CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm)
[15459]175      ENDIF
[3443]176
[15090]177      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
[3443]178
[12377]179         ! Bacterial uptake of iron. No iron is available in DOC. So
180         ! Bacteries are obliged to take up iron from the water. Some
181         ! studies (especially at Papa) have shown this uptake to be significant
182         ! ----------------------------------------------------------
[15459]183         zbactfer = feratb * 0.6_wp * xstep * tgfunc(ji,jj,jk) * xlimbacl(ji,jj,jk) * tr(ji,jj,jk,jpfer,Kbb)    &
184           &       / ( xkferb + tr(ji,jj,jk,jpfer,Kbb) ) * zdepeff(ji,jj,jk) * zdepbac(ji,jj,jk)
185         
186         ! Only the transfer of iron from its dissolved form to particles
187         ! is treated here. The GGE of bacteria supposed to be equal to
188         ! 0.33. This is hard-coded.
189         tr(ji,jj,jk,jpfer,Krhs) = tr(ji,jj,jk,jpfer,Krhs) - zbactfer*0.1
190         tr(ji,jj,jk,jpsfe,Krhs) = tr(ji,jj,jk,jpsfe,Krhs) + zbactfer*0.08
191         tr(ji,jj,jk,jpbfe,Krhs) = tr(ji,jj,jk,jpbfe,Krhs) + zbactfer*0.02
192         zfebact(ji,jj,jk)   = zbactfer * 0.1
193         blim(ji,jj,jk)      = xlimbacl(ji,jj,jk)  * zdepbac(ji,jj,jk) / 1.e-6
[12377]194      END_3D
[3443]195
[12377]196       IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
[7753]197         WRITE(charout, FMT="('rem2')")
[13286]198         CALL prt_ctl_info( charout, cdcomp = 'top' )
199         CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm)
[7753]200       ENDIF
[3443]201
[7646]202      ! Initialization of the array which contains the labile fraction
203      ! of bSi. Set to a constant in the upper ocean
204      ! ---------------------------------------------------------------
[15090]205      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
[15459]206         ! Remineralization rate of BSi dependent on T and saturation
207         ! The parameterization is taken from Ridgwell et al. (2002)
208         ! ---------------------------------------------------------
[12377]209         zdep     = MAX( hmld(ji,jj), heup_01(ji,jj) )
210         zsatur   = MAX( rtrn, ( sio3eq(ji,jj,jk) - tr(ji,jj,jk,jpsil,Kbb) ) / ( sio3eq(ji,jj,jk) + rtrn ) )
211         zsatur2  = ( 1. + ts(ji,jj,jk,jp_tem,Kmm) / 400.)**37
212         znusil   = 0.225  * ( 1. + ts(ji,jj,jk,jp_tem,Kmm) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25
[15459]213 
214         ! Two fractions of bSi are considered : a labile one and a more
215         ! refractory one based on the commonly observed two step
216         ! dissolution of bSi (initial rapid dissolution followed by
217         ! more slowly dissolution).
218         ! Computation of the vertical evolution of the labile fraction
219         ! of bSi. This is computed assuming steady state.
220         ! --------------------------------------------------------------
[12377]221         IF ( gdept(ji,jj,jk,Kmm) > zdep ) THEN
222            zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk-1) * EXP( -0.5 * ( xsiremlab - xsirem )  &
223            &                   * znusil * e3t(ji,jj,jk,Kmm) / wsbio4(ji,jj,jk) )
224            zfacsi(ji,jj,jk)  = zfacsib(ji,jj,jk) / ( 1.0 + zfacsib(ji,jj,jk) )
225            zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk) * EXP( -0.5 * ( xsiremlab - xsirem )    &
226            &                   * znusil * e3t(ji,jj,jk,Kmm) / wsbio4(ji,jj,jk) )
227         ENDIF
228         zsiremin = ( xsiremlab * zfacsi(ji,jj,jk) + xsirem * ( 1. - zfacsi(ji,jj,jk) ) ) * xstep * znusil
229         zosil    = zsiremin * tr(ji,jj,jk,jpgsi,Kbb)
230         !
231         tr(ji,jj,jk,jpgsi,Krhs) = tr(ji,jj,jk,jpgsi,Krhs) - zosil
232         tr(ji,jj,jk,jpsil,Krhs) = tr(ji,jj,jk,jpsil,Krhs) + zosil
233      END_3D
[3443]234
[12377]235      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
[7646]236         WRITE(charout, FMT="('rem3')")
[13286]237         CALL prt_ctl_info( charout, cdcomp = 'top' )
238         CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm)
[7753]239       ENDIF
[3443]240
[12377]241      IF( knt == nrdttrc ) THEN
[12276]242          zrfact2 = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s
[7753]243          !
[12276]244          IF( iom_use( "REMIN" ) )  THEN !  Remineralisation rate
245             zolimi(:,:,jpk) = 0. ; CALL iom_put( "REMIN"  , zolimi(:,:,:) * tmask(:,:,:) * zrfact2  )
[7753]246          ENDIF
[12276]247          CALL iom_put( "DENIT"  , denitr(:,:,:) * rdenit * rno3 * tmask(:,:,:) * zrfact2 ) ! Denitrification
248          IF( iom_use( "BACT" ) )  THEN ! Bacterial biomass
249             zdepbac(:,:,jpk) = 0.  ;   CALL iom_put( "BACT", zdepbac(:,:,:) * 1.E6 * tmask(:,:,:) )
[7753]250          ENDIF
[12276]251          CALL iom_put( "FEBACT" , zfebact(:,:,:) * 1E9 * tmask(:,:,:) * zrfact2  )
[7753]252       ENDIF
[3443]253      !
[9124]254      IF( ln_timing )   CALL timing_stop('p4z_rem')
[3443]255      !
256   END SUBROUTINE p4z_rem
257
258
259   SUBROUTINE p4z_rem_init
260      !!----------------------------------------------------------------------
261      !!                  ***  ROUTINE p4z_rem_init  ***
262      !!
263      !! ** Purpose :   Initialization of remineralization parameters
264      !!
265      !! ** Method  :   Read the nampisrem namelist and check the parameters
266      !!      called at the first timestep
267      !!
268      !! ** input   :   Namelist nampisrem
269      !!
270      !!----------------------------------------------------------------------
[15459]271      NAMELIST/nampisrem/ nitrif, xsirem, xsiremlab, xsilab, feratb, xkferb, & 
[7646]272         &                xremikc, xremikn, xremikp
[4147]273      INTEGER :: ios                 ! Local integer output status for namelist read
[9124]274      !!----------------------------------------------------------------------
[9169]275      !
276      IF(lwp) THEN
277         WRITE(numout,*)
278         WRITE(numout,*) 'p4z_rem_init : Initialization of remineralization parameters'
279         WRITE(numout,*) '~~~~~~~~~~~~'
280      ENDIF
281      !
[4147]282      READ  ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901)
[11536]283901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist' )
[4147]284      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 )
[11536]285902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist' )
[9169]286      IF(lwm) WRITE( numonp, nampisrem )
[4147]287
[3443]288      IF(lwp) THEN                         ! control print
[9169]289         WRITE(numout,*) '   Namelist parameters for remineralization, nampisrem'
[7646]290         IF( ln_p4z ) THEN
[15459]291            WRITE(numout,*) '      remineralization rate of DOC              xremikc   =', xremikc
[7646]292         ELSE
[9169]293            WRITE(numout,*) '      remineralization rate of DOC              xremikc   =', xremikc
294            WRITE(numout,*) '      remineralization rate of DON              xremikn   =', xremikn
295            WRITE(numout,*) '      remineralization rate of DOP              xremikp   =', xremikp
[7646]296         ENDIF
[9169]297         WRITE(numout,*) '      remineralization rate of Si               xsirem    =', xsirem
298         WRITE(numout,*) '      fast remineralization rate of Si          xsiremlab =', xsiremlab
299         WRITE(numout,*) '      fraction of labile biogenic silica        xsilab    =', xsilab
300         WRITE(numout,*) '      NH4 nitrification rate                    nitrif    =', nitrif
301         WRITE(numout,*) '      Bacterial Fe/C ratio                      feratb    =', feratb
302         WRITE(numout,*) '      Half-saturation constant for bact. Fe/C   xkferb    =', xkferb
[3443]303      ENDIF
304      !
[9169]305      denitr(:,:,:) = 0._wp
[3443]306      !
307   END SUBROUTINE p4z_rem_init
308
309
310   INTEGER FUNCTION p4z_rem_alloc()
311      !!----------------------------------------------------------------------
312      !!                     ***  ROUTINE p4z_rem_alloc  ***
313      !!----------------------------------------------------------------------
[7646]314      ALLOCATE( denitr(jpi,jpj,jpk), STAT=p4z_rem_alloc )
[3443]315      !
[10425]316      IF( p4z_rem_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_rem_alloc: failed to allocate arrays' )
[3443]317      !
318   END FUNCTION p4z_rem_alloc
319
320   !!======================================================================
321END MODULE p4zrem
Note: See TracBrowser for help on using the repository browser.