MODULE p5zrem !!====================================================================== !! *** MODULE p5zrem *** !! TOP : PISCES Compute remineralization/dissolution of organic compounds !!========================================================================= !! History : 1.0 ! 2004 (O. Aumont) Original code !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 !! 3.4 ! 2011-06 (O. Aumont, C. Ethe) Quota model for iron !! 3.6 ! 2015-05 (O. Aumont) PISCES quota !!---------------------------------------------------------------------- #if defined key_pisces_quota !!---------------------------------------------------------------------- !! 'key_top' and TOP models !! 'key_pisces_quota' PISCES bio-model with variable stoichiometry !!---------------------------------------------------------------------- !! p5z_rem : Compute remineralization/dissolution of organic compounds !! p5z_rem_init : Initialisation of parameters for remineralisation !! p5z_rem_alloc : Allocate remineralisation variables !!---------------------------------------------------------------------- USE oce_trc ! shared variables between ocean and passive tracers USE trc ! passive tracers common variables USE sms_pisces ! PISCES Source Minus Sink variables USE p4zopt ! optical model USE p4zche ! chemical model USE p5zlim ! Phytoplankton limitation factors USE p5zsink ! Sinking of particles USE p5zprod ! Production by phytoplankton USE prtctl_trc ! print control for debugging USE iom ! I/O manager IMPLICIT NONE PRIVATE PUBLIC p5z_rem ! called in p4zbio.F90 PUBLIC p5z_rem_init ! called in trcsms_pisces.F90 PUBLIC p5z_rem_alloc !! * Shared module variables REAL(wp), PUBLIC :: xremikc !: remineralisation rate of DOC REAL(wp), PUBLIC :: xremikn !: remineralisation rate of DON REAL(wp), PUBLIC :: xremikp !: remineralisation rate of DOP REAL(wp), PUBLIC :: nitrif !: NH4 nitrification rate REAL(wp), PUBLIC :: xsirem !: remineralisation rate of BSi REAL(wp), PUBLIC :: xsiremlab !: fast remineralisation rate of BSi REAL(wp), PUBLIC :: xsilab !: fraction of labile biogenic silica REAL(wp), PUBLIC :: oxymin !: half saturation constant for anoxia REAL(wp), PUBLIC :: oxymin2 !: Minimum O2 concentration for oxic remin. REAL(wp), PUBLIC :: feratb !: Fe/C quota in bacteria REAL(wp), PUBLIC :: xkferb !: Half-saturation constant for bacteria Fe/C REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: denitrc !: denitrification array !!* Substitution # include "top_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/TOP 3.3 , NEMO Consortium (2010) !! $Id: p4zrem.F90 3160 2011-11-20 14:27:18Z cetlod $ !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE p5z_rem( kt, knt ) !!--------------------------------------------------------------------- !! *** ROUTINE p5z_rem *** !! !! ** Purpose : Compute remineralization/scavenging of organic compounds !! !! ** Method : - ??? !!--------------------------------------------------------------------- ! INTEGER, INTENT(in) :: kt, knt ! ocean time step ! INTEGER :: ji, jj, jk REAL(wp) :: zremik, zremikc, zremikn, zremikp, zsiremin REAL(wp) :: zsatur, zsatur2, znusil, znusil2, zdep, zdepmin, zfactdep REAL(wp) :: zbactfer, zolimit, zonitr, zstep, zrfact2 REAL(wp) :: zosil, ztem, zdenitnh4, zolimic, zolimin, zolimip, zdenitrn, zdenitrp CHARACTER (len=25) :: charout REAL(wp), POINTER, DIMENSION(:,: ) :: ztempbac REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepbac, zwork1, zdepprod, zfacsi, zfacsib, znitr !!--------------------------------------------------------------------- ! IF( nn_timing == 1 ) CALL timing_start('p5z_rem') ! ! Allocate temporary workspace CALL wrk_alloc( jpi, jpj, ztempbac ) CALL wrk_alloc( jpi, jpj, jpk, zdepbac, zdepprod, zwork1, zfacsi, zfacsib, znitr ) ! Initialisation of temprary arrys zdepprod(:,:,:) = 1._wp ztempbac(:,:) = 0._wp zfacsib(:,:,:) = xsilab / ( 1.0 - xsilab ) zfacsi(:,:,:) = xsilab ! Computation of the mean phytoplankton concentration as ! a crude estimate of the bacterial biomass ! this parameterization has been deduced from a model version ! that was modeling explicitely bacteria ! ------------------------------------------------------- DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi zdep = MAX( hmld(ji,jj), heup(ji,jj) ) IF( fsdept(ji,jj,jk) < zdep ) THEN zdepbac(ji,jj,jk) = MIN( 0.7 * ( trb(ji,jj,jk,jpzoo) + 2.* trb(ji,jj,jk,jpmes) ), 4.e-6 ) ztempbac(ji,jj) = zdepbac(ji,jj,jk) ELSE zdepmin = MIN( 1., zdep / fsdept(ji,jj,jk) ) zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj) zdepprod(ji,jj,jk) = zdepmin**0.273 ENDIF END DO END DO END DO DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi ! denitrification factor computed from O2 levels ! ---------------------------------------------- nitrfac(ji,jj,jk) = MAX( 0.e0, 0.4 * ( oxymin2 - trb(ji,jj,jk,jpoxy) ) & & / ( oxymin + trb(ji,jj,jk,jpoxy) ) ) nitrfac(ji,jj,jk) = MIN( 1., nitrfac(ji,jj,jk) ) END DO END DO END DO DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi zstep = xstep # if defined key_degrad zstep = zstep * facvol(ji,jj,jk) # endif ! DOC ammonification. Depends on depth, phytoplankton biomass ! and a limitation term which is supposed to be a parameterization ! of the bacterial activity. ! ----------------------------------------------------------------- zremik = zstep / 1.e-6 * MAX(0.01, xlimbac(ji,jj,jk)) * zdepbac(ji,jj,jk) zremik = MAX( zremik, 2.74e-4 * xstep / xremikc ) zremikc = xremikc * zremik zremikn = xremikn / xremikc zremikp = xremikp / xremikc ! Ammonification in oxic waters with oxygen consumption ! ----------------------------------------------------- zolimit = zremikc * ( 1.- nitrfac(ji,jj,jk) ) * trb(ji,jj,jk,jpdoc) zolimic = MAX( 0.e0, MIN( ( trb(ji,jj,jk,jpoxy) - rtrn ) / o2ut, zolimit ) ) zwork1(ji,jj,jk) = zolimic zolimin = zremikn * zolimic * trb(ji,jj,jk,jpdon) / ( trb(ji,jj,jk,jpdoc) + rtrn ) zolimip = zremikp * zolimic * trb(ji,jj,jk,jpdop) / ( trb(ji,jj,jk,jpdoc) + rtrn ) ! Ammonification in suboxic waters with denitrification ! ------------------------------------------------------- zolimit = zremikc * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) denitrc(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit, zolimit ) denitrc (ji,jj,jk) = MAX( 0.e0, denitrc (ji,jj,jk) ) zdenitrn = zremikn * denitrc(ji,jj,jk) * trb(ji,jj,jk,jpdon) / ( trb(ji,jj,jk,jpdoc) + rtrn ) zdenitrp = zremikp * denitrc(ji,jj,jk) * trb(ji,jj,jk,jpdop) / ( trb(ji,jj,jk,jpdoc) + rtrn ) ! Update of trends TRA ! -------------------- tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zolimip + zdenitrp tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zolimin + zdenitrn tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) - denitrc(ji,jj,jk) * rdenit tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) - zolimic - denitrc(ji,jj,jk) tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) - zolimin - zdenitrn tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) - zolimip - zdenitrp tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - zolimic * o2ut tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zolimic + denitrc(ji,jj,jk) tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * ( zolimin + ( rdenit + 1.) * zdenitrn ) END DO END DO END DO DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi zstep = xstep # if defined key_degrad zstep = zstep * facvol(ji,jj,jk) # endif ! NH4 nitrification to NO3. Ceased for oxygen concentrations ! below 2 umol/L. Inhibited at strong light ! ---------------------------------------------------------- zonitr = nitrif * zstep * trb(ji,jj,jk,jpnh4) * ( 1.- nitrfac(ji,jj,jk) ) & & * ( 0.2 + 0.8 / ( 1.+ emoy(ji,jj,jk) ) * ( 1. + fr_i(ji,jj) * emoy(ji,jj,jk) ) ) zdenitnh4 = nitrif * zstep * trb(ji,jj,jk,jpnh4) * nitrfac(ji,jj,jk) ! ! Update of the tracers trends ! ---------------------------- tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) - zonitr - zdenitnh4 tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zonitr - rdenita * zdenitnh4 tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2nit * zonitr tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2 * rno3 * zonitr + rno3 * ( rdenita - 1. ) * zdenitnh4 znitr(ji,jj,jk) = zonitr END DO END DO END DO IF(ln_ctl) THEN ! print mean trends (used for debugging) WRITE(charout, FMT="('rem1')") CALL prt_ctl_trc_info(charout) CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) ENDIF DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi ! Bacterial uptake of iron. No iron is available in DOC. So ! Bacteries are obliged to take up iron from the water. Some ! studies (especially at Papa) have shown this uptake to be significant ! ---------------------------------------------------------- zbactfer = feratb * rfact2 * prmaxp(ji,jj,jk) * xlimbacl(ji,jj,jk) & & * biron(ji,jj,jk) / ( xkferb + biron(ji,jj,jk) ) & & * zdepprod(ji,jj,jk) * zdepbac(ji,jj,jk) #if defined key_kriest tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zbactfer*0.05 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zbactfer*0.05 #else tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zbactfer*0.12 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zbactfer*0.09 tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + zbactfer*0.03 #endif END DO END DO END DO IF(ln_ctl) THEN ! print mean trends (used for debugging) WRITE(charout, FMT="('rem2')") CALL prt_ctl_trc_info(charout) CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) ENDIF ! Initialization of the array which contains the labile fraction ! of bSi. Set to a constant in the upper ocean ! --------------------------------------------------------------- DO jk = 1, jpkm1 DO jj = 1, jpj DO ji = 1, jpi zstep = xstep # if defined key_degrad zstep = zstep * facvol(ji,jj,jk) # endif zdep = MAX( hmld(ji,jj), heup_01(ji,jj) ) zsatur = MAX( rtrn, ( sio3eq(ji,jj,jk) - trb(ji,jj,jk,jpsil) ) / ( sio3eq(ji,jj,jk) + rtrn ) ) zsatur2 = ( 1. + tsn(ji,jj,jk,jp_tem) / 400.)**37 znusil = 0.225 * ( 1. + tsn(ji,jj,jk,jp_tem) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25 ! Remineralization rate of BSi depedant on T and saturation ! --------------------------------------------------------- IF ( fsdept(ji,jj,jk) > zdep ) THEN zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk-1) * EXP( -0.5 * ( xsiremlab - xsirem ) & & * znusil * fse3t(ji,jj,jk) / wsbio4(ji,jj,jk) ) zfacsi(ji,jj,jk) = zfacsib(ji,jj,jk) / ( 1.0 + zfacsib(ji,jj,jk) ) zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk) * EXP( -0.5 * ( xsiremlab - xsirem ) & & * znusil * fse3t(ji,jj,jk) / wsbio4(ji,jj,jk) ) ENDIF zsiremin = ( xsiremlab * zfacsi(ji,jj,jk) + xsirem * ( 1. - zfacsi(ji,jj,jk) ) ) * zstep * znusil zosil = zsiremin * trb(ji,jj,jk,jpgsi) ! tra(ji,jj,jk,jpgsi) = tra(ji,jj,jk,jpgsi) - zosil tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + zosil END DO END DO END DO IF(ln_ctl) THEN ! print mean trends (used for debugging) WRITE(charout, FMT="('rem3')") CALL prt_ctl_trc_info(charout) CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) ENDIF IF( ln_diatrc .AND. lk_iomput .AND. knt == nrdttrc ) THEN zrfact2 = 1.e3 * rfact2r CALL iom_put( "REMIN" , zwork1(:,:,:) * tmask(:,:,:) * zrfact2 ) ! Remineralisation rate CALL iom_put( "DENIT" , denitrc(:,:,:) * rdenit * rno3 * tmask(:,:,:) * zrfact2 ) ! Denitrification CALL iom_put( "NIT" , znitr(:,:,:) * rno3 * tmask(:,:,:) * zrfact2 ) ! CALL iom_put( "BACT" , zdepbac(:,:,:) * 1.E6 * tmask(:,:,:) ) ! Bacterial biomass ENDIF ! CALL wrk_dealloc( jpi, jpj, ztempbac ) CALL wrk_dealloc( jpi, jpj, jpk, zdepbac, zdepprod, zwork1, zfacsi, zfacsib, znitr ) ! IF( nn_timing == 1 ) CALL timing_stop('p5z_rem') ! END SUBROUTINE p5z_rem SUBROUTINE p5z_rem_init !!---------------------------------------------------------------------- !! *** ROUTINE p5z_rem_init *** !! !! ** Purpose : Initialization of remineralization parameters !! !! ** Method : Read the nampisrem namelist and check the parameters !! called at the first timestep !! !! ** input : Namelist nampisrem !! !!---------------------------------------------------------------------- NAMELIST/nampisrem/ xremikc, xremikn, xremikp, & & nitrif, xsirem, xsiremlab, xsilab, oxymin, oxymin2, & & feratb, xkferb INTEGER :: ios ! Local integer output status for namelist read REWIND( numnatp_ref ) ! Namelist nampisrem in reference namelist : Pisces remineralization READ ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901) 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in reference namelist', lwp ) REWIND( numnatp_cfg ) ! Namelist nampisrem in configuration namelist : Pisces remineralization READ ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp ) IF(lwm) WRITE ( numonp, nampisrem ) IF(lwp) THEN ! control print WRITE(numout,*) ' ' WRITE(numout,*) ' Namelist parameters for remineralization, nampisrem' WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' WRITE(numout,*) ' remineralization rate of DOC xremikc =', xremikc WRITE(numout,*) ' remineralization rate of DON xremikn =', xremikn WRITE(numout,*) ' remineralization rate of DOP xremikp =', xremikp WRITE(numout,*) ' remineralization rate of Si xsirem =', xsirem WRITE(numout,*) ' fast remineralization rate of Si xsiremlab =', xsiremlab WRITE(numout,*) ' fraction of labile biogenic silica xsilab =', xsilab WRITE(numout,*) ' NH4 nitrification rate nitrif =', nitrif WRITE(numout,*) ' half saturation constant for anoxia oxymin =', oxymin WRITE(numout,*) ' Minimum O2 concentration for oxic remin. oxymin2 =', oxymin2 WRITE(numout,*) ' Bacterial Fe/C ratio feratb =', feratb WRITE(numout,*) ' Half-saturation constant for bact. Fe/C xkferb =', xkferb ENDIF ! nitrfac (:,:,:) = 0._wp denitrc (:,:,:) = 0._wp ! END SUBROUTINE p5z_rem_init INTEGER FUNCTION p5z_rem_alloc() !!---------------------------------------------------------------------- !! *** ROUTINE p5z_rem_alloc *** !!---------------------------------------------------------------------- ALLOCATE( denitrc(jpi,jpj,jpk), STAT=p5z_rem_alloc ) ! IF( p5z_rem_alloc /= 0 ) CALL ctl_warn('p5z_rem_alloc: failed to allocate arrays') ! END FUNCTION p5z_rem_alloc #else !!====================================================================== !! Dummy module : No PISCES bio-model !!====================================================================== CONTAINS SUBROUTINE p5z_rem ! Empty routine END SUBROUTINE p5z_rem #endif !!====================================================================== END MODULE p5zrem