Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (11 months ago)
Author:
acc
Message:

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge —ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The —ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90

    r12276 r12377  
    4242   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   denitr   !: denitrification array 
    4343 
     44   !! * Substitutions 
     45#  include "do_loop_substitute.h90" 
    4446   !!---------------------------------------------------------------------- 
    4547   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    4951CONTAINS 
    5052 
    51    SUBROUTINE p4z_rem( kt, knt ) 
     53   SUBROUTINE p4z_rem( kt, knt, Kbb, Kmm, Krhs ) 
    5254      !!--------------------------------------------------------------------- 
    5355      !!                     ***  ROUTINE p4z_rem  *** 
     
    5759      !! ** Method  : - ??? 
    5860      !!--------------------------------------------------------------------- 
    59       INTEGER, INTENT(in) ::   kt, knt ! ocean time step 
     61      INTEGER, INTENT(in) ::   kt, knt         ! ocean time step 
     62      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs  ! time level indices 
    6063      ! 
    6164      INTEGER  ::   ji, jj, jk 
     
    8588      ! that was modeling explicitely bacteria 
    8689      ! ------------------------------------------------------- 
    87       DO jk = 1, jpkm1 
    88          DO jj = 1, jpj 
    89             DO ji = 1, jpi 
    90                zdep = MAX( hmld(ji,jj), heup(ji,jj) ) 
    91                IF( gdept_n(ji,jj,jk) < zdep ) THEN 
    92                   zdepbac(ji,jj,jk) = MIN( 0.7 * ( trb(ji,jj,jk,jpzoo) + 2.* trb(ji,jj,jk,jpmes) ), 4.e-6 ) 
    93                   ztempbac(ji,jj)   = zdepbac(ji,jj,jk) 
    94                ELSE 
    95                   zdepmin = MIN( 1., zdep / gdept_n(ji,jj,jk) ) 
    96                   zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj) 
    97                   zdepprod(ji,jj,jk) = zdepmin**0.273 
    98                   zdepeff (ji,jj,jk) = zdepeff(ji,jj,jk) * zdepmin**0.3 
    99                ENDIF 
    100             END DO 
    101          END DO 
    102       END DO 
     90      DO_3D_11_11( 1, jpkm1 ) 
     91         zdep = MAX( hmld(ji,jj), heup(ji,jj) ) 
     92         IF( gdept(ji,jj,jk,Kmm) < zdep ) THEN 
     93            zdepbac(ji,jj,jk) = MIN( 0.7 * ( tr(ji,jj,jk,jpzoo,Kbb) + 2.* tr(ji,jj,jk,jpmes,Kbb) ), 4.e-6 ) 
     94            ztempbac(ji,jj)   = zdepbac(ji,jj,jk) 
     95         ELSE 
     96            zdepmin = MIN( 1., zdep / gdept(ji,jj,jk,Kmm) ) 
     97            zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj) 
     98            zdepprod(ji,jj,jk) = zdepmin**0.273 
     99            zdepeff (ji,jj,jk) = zdepeff(ji,jj,jk) * zdepmin**0.3 
     100         ENDIF 
     101      END_3D 
    103102 
    104103      IF( ln_p4z ) THEN 
    105          DO jk = 1, jpkm1 
    106             DO jj = 1, jpj 
    107                DO ji = 1, jpi 
    108                   ! DOC ammonification. Depends on depth, phytoplankton biomass 
    109                   ! and a limitation term which is supposed to be a parameterization of the bacterial activity.  
    110                   zremik = xremik * xstep / 1.e-6 * xlimbac(ji,jj,jk) * zdepbac(ji,jj,jk)  
    111                   zremik = MAX( zremik, 2.74e-4 * xstep ) 
    112                   ! Ammonification in oxic waters with oxygen consumption 
    113                   ! ----------------------------------------------------- 
    114                   zolimit = zremik * ( 1.- nitrfac(ji,jj,jk) ) * trb(ji,jj,jk,jpdoc)  
    115                   zolimi(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpoxy) - rtrn ) / o2ut, zolimit )  
    116                   ! Ammonification in suboxic waters with denitrification 
    117                   ! ------------------------------------------------------- 
    118                   zammonic = zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) 
    119                   denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 
    120                   denitr(ji,jj,jk)  = MIN( ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit, denitr(ji,jj,jk) ) 
    121                   zoxyremc          = zammonic - denitr(ji,jj,jk) 
    122                   ! 
    123                   zolimi (ji,jj,jk) = MAX( 0.e0, zolimi (ji,jj,jk) ) 
    124                   denitr (ji,jj,jk) = MAX( 0.e0, denitr (ji,jj,jk) ) 
    125                   zoxyremc          = MAX( 0.e0, zoxyremc ) 
    126  
    127                   ! 
    128                   tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
    129                   tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
    130                   tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) - denitr (ji,jj,jk) * rdenit 
    131                   tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) - zolimi (ji,jj,jk) - denitr(ji,jj,jk) - zoxyremc 
    132                   tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - zolimi (ji,jj,jk) * o2ut 
    133                   tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
    134                   tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * ( zolimi(ji,jj,jk) + zoxyremc    & 
    135                   &                     + ( rdenit + 1.) * denitr(ji,jj,jk) ) 
    136                END DO 
    137             END DO 
    138          END DO 
     104         DO_3D_11_11( 1, jpkm1 ) 
     105            ! DOC ammonification. Depends on depth, phytoplankton biomass 
     106            ! and a limitation term which is supposed to be a parameterization of the bacterial activity.  
     107            zremik = xremik * xstep / 1.e-6 * xlimbac(ji,jj,jk) * zdepbac(ji,jj,jk)  
     108            zremik = MAX( zremik, 2.74e-4 * xstep ) 
     109            ! Ammonification in oxic waters with oxygen consumption 
     110            ! ----------------------------------------------------- 
     111            zolimit = zremik * ( 1.- nitrfac(ji,jj,jk) ) * tr(ji,jj,jk,jpdoc,Kbb)  
     112            zolimi(ji,jj,jk) = MIN( ( tr(ji,jj,jk,jpoxy,Kbb) - rtrn ) / o2ut, zolimit )  
     113            ! Ammonification in suboxic waters with denitrification 
     114            ! ------------------------------------------------------- 
     115            zammonic = zremik * nitrfac(ji,jj,jk) * tr(ji,jj,jk,jpdoc,Kbb) 
     116            denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 
     117            denitr(ji,jj,jk)  = MIN( ( tr(ji,jj,jk,jpno3,Kbb) - rtrn ) / rdenit, denitr(ji,jj,jk) ) 
     118            zoxyremc          = zammonic - denitr(ji,jj,jk) 
     119            ! 
     120            zolimi (ji,jj,jk) = MAX( 0.e0, zolimi (ji,jj,jk) ) 
     121            denitr (ji,jj,jk) = MAX( 0.e0, denitr (ji,jj,jk) ) 
     122            zoxyremc          = MAX( 0.e0, zoxyremc ) 
     123 
     124            ! 
     125            tr(ji,jj,jk,jppo4,Krhs) = tr(ji,jj,jk,jppo4,Krhs) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
     126            tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
     127            tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) - denitr (ji,jj,jk) * rdenit 
     128            tr(ji,jj,jk,jpdoc,Krhs) = tr(ji,jj,jk,jpdoc,Krhs) - zolimi (ji,jj,jk) - denitr(ji,jj,jk) - zoxyremc 
     129            tr(ji,jj,jk,jpoxy,Krhs) = tr(ji,jj,jk,jpoxy,Krhs) - zolimi (ji,jj,jk) * o2ut 
     130            tr(ji,jj,jk,jpdic,Krhs) = tr(ji,jj,jk,jpdic,Krhs) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyremc 
     131            tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) + rno3 * ( zolimi(ji,jj,jk) + zoxyremc    & 
     132            &                     + ( rdenit + 1.) * denitr(ji,jj,jk) ) 
     133         END_3D 
    139134      ELSE 
    140          DO jk = 1, jpkm1 
    141             DO jj = 1, jpj 
    142                DO ji = 1, jpi 
    143                   ! DOC ammonification. Depends on depth, phytoplankton biomass 
    144                   ! and a limitation term which is supposed to be a parameterization of the bacterial activity.  
    145                   ! ----------------------------------------------------------------- 
    146                   zremik = xstep / 1.e-6 * MAX(0.01, xlimbac(ji,jj,jk)) * zdepbac(ji,jj,jk)  
    147                   zremik = MAX( zremik, 2.74e-4 * xstep / xremikc ) 
    148  
    149                   zremikc = xremikc * zremik 
    150                   zremikn = xremikn / xremikc 
    151                   zremikp = xremikp / xremikc 
    152  
    153                   ! Ammonification in oxic waters with oxygen consumption 
    154                   ! ----------------------------------------------------- 
    155                   zolimit = zremikc * ( 1.- nitrfac(ji,jj,jk) ) * trb(ji,jj,jk,jpdoc)  
    156                   zolimic = MAX( 0.e0, MIN( ( trb(ji,jj,jk,jpoxy) - rtrn ) / o2ut, zolimit ) )  
    157                   zolimi(ji,jj,jk) = zolimic 
    158                   zolimin = zremikn * zolimic * trb(ji,jj,jk,jpdon) / ( trb(ji,jj,jk,jpdoc) + rtrn ) 
    159                   zolimip = zremikp * zolimic * trb(ji,jj,jk,jpdop) / ( trb(ji,jj,jk,jpdoc) + rtrn )  
    160  
    161                   ! Ammonification in suboxic waters with denitrification 
    162                   ! ------------------------------------------------------- 
    163                   zammonic = zremikc * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) 
    164                   denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 
    165                   denitr(ji,jj,jk)  = MAX(0., MIN(  ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit, denitr(ji,jj,jk) ) ) 
    166                   zoxyremc          = MAX(0., zammonic - denitr(ji,jj,jk)) 
    167                   zdenitrn  = zremikn * denitr(ji,jj,jk) * trb(ji,jj,jk,jpdon) / ( trb(ji,jj,jk,jpdoc) + rtrn ) 
    168                   zdenitrp  = zremikp * denitr(ji,jj,jk) * trb(ji,jj,jk,jpdop) / ( trb(ji,jj,jk,jpdoc) + rtrn ) 
    169                   zoxyremn  = zremikn * zoxyremc * trb(ji,jj,jk,jpdon) / ( trb(ji,jj,jk,jpdoc) + rtrn ) 
    170                   zoxyremp  = zremikp * zoxyremc * trb(ji,jj,jk,jpdop) / ( trb(ji,jj,jk,jpdoc) + rtrn ) 
    171  
    172                   tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zolimip + zdenitrp + zoxyremp 
    173                   tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zolimin + zdenitrn + zoxyremn 
    174                   tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) - denitr(ji,jj,jk) * rdenit 
    175                   tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) - zolimic - denitr(ji,jj,jk) - zoxyremc 
    176                   tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) - zolimin - zdenitrn - zoxyremn 
    177                   tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) - zolimip - zdenitrp - zoxyremp 
    178                   tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - zolimic * o2ut 
    179                   tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zolimic + denitr(ji,jj,jk) + zoxyremc 
    180                   tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * ( zolimin + zoxyremn + ( rdenit + 1.) * zdenitrn ) 
    181                END DO 
    182             END DO 
    183          END DO 
     135         DO_3D_11_11( 1, jpkm1 ) 
     136            ! DOC ammonification. Depends on depth, phytoplankton biomass 
     137            ! and a limitation term which is supposed to be a parameterization of the bacterial activity.  
     138            ! ----------------------------------------------------------------- 
     139            zremik = xstep / 1.e-6 * MAX(0.01, xlimbac(ji,jj,jk)) * zdepbac(ji,jj,jk)  
     140            zremik = MAX( zremik, 2.74e-4 * xstep / xremikc ) 
     141 
     142            zremikc = xremikc * zremik 
     143            zremikn = xremikn / xremikc 
     144            zremikp = xremikp / xremikc 
     145 
     146            ! Ammonification in oxic waters with oxygen consumption 
     147            ! ----------------------------------------------------- 
     148            zolimit = zremikc * ( 1.- nitrfac(ji,jj,jk) ) * tr(ji,jj,jk,jpdoc,Kbb)  
     149            zolimic = MAX( 0.e0, MIN( ( tr(ji,jj,jk,jpoxy,Kbb) - rtrn ) / o2ut, zolimit ) )  
     150            zolimi(ji,jj,jk) = zolimic 
     151            zolimin = zremikn * zolimic * tr(ji,jj,jk,jpdon,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn ) 
     152            zolimip = zremikp * zolimic * tr(ji,jj,jk,jpdop,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn )  
     153 
     154            ! Ammonification in suboxic waters with denitrification 
     155            ! ------------------------------------------------------- 
     156            zammonic = zremikc * nitrfac(ji,jj,jk) * tr(ji,jj,jk,jpdoc,Kbb) 
     157            denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 
     158            denitr(ji,jj,jk)  = MAX(0., MIN(  ( tr(ji,jj,jk,jpno3,Kbb) - rtrn ) / rdenit, denitr(ji,jj,jk) ) ) 
     159            zoxyremc          = MAX(0., zammonic - denitr(ji,jj,jk)) 
     160            zdenitrn  = zremikn * denitr(ji,jj,jk) * tr(ji,jj,jk,jpdon,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn ) 
     161            zdenitrp  = zremikp * denitr(ji,jj,jk) * tr(ji,jj,jk,jpdop,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn ) 
     162            zoxyremn  = zremikn * zoxyremc * tr(ji,jj,jk,jpdon,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn ) 
     163            zoxyremp  = zremikp * zoxyremc * tr(ji,jj,jk,jpdop,Kbb) / ( tr(ji,jj,jk,jpdoc,Kbb) + rtrn ) 
     164 
     165            tr(ji,jj,jk,jppo4,Krhs) = tr(ji,jj,jk,jppo4,Krhs) + zolimip + zdenitrp + zoxyremp 
     166            tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zolimin + zdenitrn + zoxyremn 
     167            tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) - denitr(ji,jj,jk) * rdenit 
     168            tr(ji,jj,jk,jpdoc,Krhs) = tr(ji,jj,jk,jpdoc,Krhs) - zolimic - denitr(ji,jj,jk) - zoxyremc 
     169            tr(ji,jj,jk,jpdon,Krhs) = tr(ji,jj,jk,jpdon,Krhs) - zolimin - zdenitrn - zoxyremn 
     170            tr(ji,jj,jk,jpdop,Krhs) = tr(ji,jj,jk,jpdop,Krhs) - zolimip - zdenitrp - zoxyremp 
     171            tr(ji,jj,jk,jpoxy,Krhs) = tr(ji,jj,jk,jpoxy,Krhs) - zolimic * o2ut 
     172            tr(ji,jj,jk,jpdic,Krhs) = tr(ji,jj,jk,jpdic,Krhs) + zolimic + denitr(ji,jj,jk) + zoxyremc 
     173            tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) + rno3 * ( zolimin + zoxyremn + ( rdenit + 1.) * zdenitrn ) 
     174         END_3D 
    184175         ! 
    185176      ENDIF 
    186177 
    187178 
    188       DO jk = 1, jpkm1 
    189          DO jj = 1, jpj 
    190             DO ji = 1, jpi 
    191                ! NH4 nitrification to NO3. Ceased for oxygen concentrations 
    192                ! below 2 umol/L. Inhibited at strong light  
    193                ! ---------------------------------------------------------- 
    194                zonitr  = nitrif * xstep * trb(ji,jj,jk,jpnh4) * ( 1.- nitrfac(ji,jj,jk) )  & 
    195                &         / ( 1.+ emoy(ji,jj,jk) ) * ( 1. + fr_i(ji,jj) * emoy(ji,jj,jk) )  
    196                zdenitnh4 = nitrif * xstep * trb(ji,jj,jk,jpnh4) * nitrfac(ji,jj,jk) 
    197                zdenitnh4 = MIN(  ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenita, zdenitnh4 )  
    198                ! Update of the tracers trends 
    199                ! ---------------------------- 
    200                tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) - zonitr - zdenitnh4 
    201                tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zonitr - rdenita * zdenitnh4 
    202                tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2nit * zonitr 
    203                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2 * rno3 * zonitr + rno3 * ( rdenita - 1. ) * zdenitnh4 
    204             END DO 
    205          END DO 
    206       END DO 
    207  
    208        IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     179      DO_3D_11_11( 1, jpkm1 ) 
     180         ! NH4 nitrification to NO3. Ceased for oxygen concentrations 
     181         ! below 2 umol/L. Inhibited at strong light  
     182         ! ---------------------------------------------------------- 
     183         zonitr  = nitrif * xstep * tr(ji,jj,jk,jpnh4,Kbb) * ( 1.- nitrfac(ji,jj,jk) )  & 
     184         &         / ( 1.+ emoy(ji,jj,jk) ) * ( 1. + fr_i(ji,jj) * emoy(ji,jj,jk) )  
     185         zdenitnh4 = nitrif * xstep * tr(ji,jj,jk,jpnh4,Kbb) * nitrfac(ji,jj,jk) 
     186         zdenitnh4 = MIN(  ( tr(ji,jj,jk,jpno3,Kbb) - rtrn ) / rdenita, zdenitnh4 )  
     187         ! Update of the tracers trends 
     188         ! ---------------------------- 
     189         tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) - zonitr - zdenitnh4 
     190         tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) + zonitr - rdenita * zdenitnh4 
     191         tr(ji,jj,jk,jpoxy,Krhs) = tr(ji,jj,jk,jpoxy,Krhs) - o2nit * zonitr 
     192         tr(ji,jj,jk,jptal,Krhs) = tr(ji,jj,jk,jptal,Krhs) - 2 * rno3 * zonitr + rno3 * ( rdenita - 1. ) * zdenitnh4 
     193      END_3D 
     194 
     195       IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging) 
    209196         WRITE(charout, FMT="('rem1')") 
    210197         CALL prt_ctl_trc_info(charout) 
    211          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) 
     198         CALL prt_ctl_trc(tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm) 
    212199       ENDIF 
    213200 
    214       DO jk = 1, jpkm1 
    215          DO jj = 1, jpj 
    216             DO ji = 1, jpi 
    217  
    218                ! Bacterial uptake of iron. No iron is available in DOC. So 
    219                ! Bacteries are obliged to take up iron from the water. Some 
    220                ! studies (especially at Papa) have shown this uptake to be significant 
    221                ! ---------------------------------------------------------- 
    222                zbactfer = feratb *  rfact2 * 0.6_wp / rday * tgfunc(ji,jj,jk) * xlimbacl(ji,jj,jk)     & 
    223                   &              * trb(ji,jj,jk,jpfer) / ( xkferb + trb(ji,jj,jk,jpfer) )    & 
    224                   &              * zdepprod(ji,jj,jk) * zdepeff(ji,jj,jk) * zdepbac(ji,jj,jk) 
    225                tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zbactfer*0.33 
    226                tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zbactfer*0.25 
    227                tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + zbactfer*0.08 
    228                zfebact(ji,jj,jk)   = zbactfer * 0.33 
    229                blim(ji,jj,jk)      = xlimbacl(ji,jj,jk)  * zdepbac(ji,jj,jk) / 1.e-6 * zdepprod(ji,jj,jk) 
    230             END DO 
    231          END DO 
    232       END DO 
    233  
    234        IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     201      DO_3D_11_11( 1, jpkm1 ) 
     202 
     203         ! Bacterial uptake of iron. No iron is available in DOC. So 
     204         ! Bacteries are obliged to take up iron from the water. Some 
     205         ! studies (especially at Papa) have shown this uptake to be significant 
     206         ! ---------------------------------------------------------- 
     207         zbactfer = feratb *  rfact2 * 0.6_wp / rday * tgfunc(ji,jj,jk) * xlimbacl(ji,jj,jk)     & 
     208            &              * tr(ji,jj,jk,jpfer,Kbb) / ( xkferb + tr(ji,jj,jk,jpfer,Kbb) )    & 
     209            &              * zdepprod(ji,jj,jk) * zdepeff(ji,jj,jk) * zdepbac(ji,jj,jk) 
     210         tr(ji,jj,jk,jpfer,Krhs) = tr(ji,jj,jk,jpfer,Krhs) - zbactfer*0.33 
     211         tr(ji,jj,jk,jpsfe,Krhs) = tr(ji,jj,jk,jpsfe,Krhs) + zbactfer*0.25 
     212         tr(ji,jj,jk,jpbfe,Krhs) = tr(ji,jj,jk,jpbfe,Krhs) + zbactfer*0.08 
     213         zfebact(ji,jj,jk)   = zbactfer * 0.33 
     214         blim(ji,jj,jk)      = xlimbacl(ji,jj,jk)  * zdepbac(ji,jj,jk) / 1.e-6 * zdepprod(ji,jj,jk) 
     215      END_3D 
     216 
     217       IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging) 
    235218         WRITE(charout, FMT="('rem2')") 
    236219         CALL prt_ctl_trc_info(charout) 
    237          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) 
     220         CALL prt_ctl_trc(tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm) 
    238221       ENDIF 
    239222 
     
    242225      ! --------------------------------------------------------------- 
    243226 
    244       DO jk = 1, jpkm1 
    245          DO jj = 1, jpj 
    246             DO ji = 1, jpi 
    247                zdep     = MAX( hmld(ji,jj), heup_01(ji,jj) ) 
    248                zsatur   = MAX( rtrn, ( sio3eq(ji,jj,jk) - trb(ji,jj,jk,jpsil) ) / ( sio3eq(ji,jj,jk) + rtrn ) ) 
    249                zsatur2  = ( 1. + tsn(ji,jj,jk,jp_tem) / 400.)**37 
    250                znusil   = 0.225  * ( 1. + tsn(ji,jj,jk,jp_tem) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25 
    251                ! Remineralization rate of BSi depedant on T and saturation 
    252                ! --------------------------------------------------------- 
    253                IF ( gdept_n(ji,jj,jk) > zdep ) THEN 
    254                   zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk-1) * EXP( -0.5 * ( xsiremlab - xsirem )  & 
    255                   &                   * znusil * e3t_n(ji,jj,jk) / wsbio4(ji,jj,jk) ) 
    256                   zfacsi(ji,jj,jk)  = zfacsib(ji,jj,jk) / ( 1.0 + zfacsib(ji,jj,jk) ) 
    257                   zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk) * EXP( -0.5 * ( xsiremlab - xsirem )    & 
    258                   &                   * znusil * e3t_n(ji,jj,jk) / wsbio4(ji,jj,jk) ) 
    259                ENDIF 
    260                zsiremin = ( xsiremlab * zfacsi(ji,jj,jk) + xsirem * ( 1. - zfacsi(ji,jj,jk) ) ) * xstep * znusil 
    261                zosil    = zsiremin * trb(ji,jj,jk,jpgsi) 
    262                ! 
    263                tra(ji,jj,jk,jpgsi) = tra(ji,jj,jk,jpgsi) - zosil 
    264                tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + zosil 
    265             END DO 
    266          END DO 
    267       END DO 
    268  
    269       IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     227      DO_3D_11_11( 1, jpkm1 ) 
     228         zdep     = MAX( hmld(ji,jj), heup_01(ji,jj) ) 
     229         zsatur   = MAX( rtrn, ( sio3eq(ji,jj,jk) - tr(ji,jj,jk,jpsil,Kbb) ) / ( sio3eq(ji,jj,jk) + rtrn ) ) 
     230         zsatur2  = ( 1. + ts(ji,jj,jk,jp_tem,Kmm) / 400.)**37 
     231         znusil   = 0.225  * ( 1. + ts(ji,jj,jk,jp_tem,Kmm) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25 
     232         ! Remineralization rate of BSi depedant on T and saturation 
     233         ! --------------------------------------------------------- 
     234         IF ( gdept(ji,jj,jk,Kmm) > zdep ) THEN 
     235            zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk-1) * EXP( -0.5 * ( xsiremlab - xsirem )  & 
     236            &                   * znusil * e3t(ji,jj,jk,Kmm) / wsbio4(ji,jj,jk) ) 
     237            zfacsi(ji,jj,jk)  = zfacsib(ji,jj,jk) / ( 1.0 + zfacsib(ji,jj,jk) ) 
     238            zfacsib(ji,jj,jk) = zfacsib(ji,jj,jk) * EXP( -0.5 * ( xsiremlab - xsirem )    & 
     239            &                   * znusil * e3t(ji,jj,jk,Kmm) / wsbio4(ji,jj,jk) ) 
     240         ENDIF 
     241         zsiremin = ( xsiremlab * zfacsi(ji,jj,jk) + xsirem * ( 1. - zfacsi(ji,jj,jk) ) ) * xstep * znusil 
     242         zosil    = zsiremin * tr(ji,jj,jk,jpgsi,Kbb) 
     243         ! 
     244         tr(ji,jj,jk,jpgsi,Krhs) = tr(ji,jj,jk,jpgsi,Krhs) - zosil 
     245         tr(ji,jj,jk,jpsil,Krhs) = tr(ji,jj,jk,jpsil,Krhs) + zosil 
     246      END_3D 
     247 
     248      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging) 
    270249         WRITE(charout, FMT="('rem3')") 
    271250         CALL prt_ctl_trc_info(charout) 
    272          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) 
     251         CALL prt_ctl_trc(tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm) 
    273252       ENDIF 
    274253 
    275       IF( lk_iomput .AND. knt == nrdttrc ) THEN 
     254      IF( knt == nrdttrc ) THEN 
    276255          zrfact2 = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s 
    277256          ! 
     
    314293      ENDIF 
    315294      ! 
    316       REWIND( numnatp_ref ) 
    317295      READ  ( numnatp_ref, nampisrem, IOSTAT = ios, ERR = 901) 
    318296901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nampisrem in reference namelist' ) 
    319  
    320       REWIND( numnatp_cfg ) 
    321297      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 
    322298902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nampisrem in configuration namelist' ) 
Note: See TracChangeset for help on using the changeset viewer.