Ignore:
Timestamp:
2017-09-18T14:58:22+02:00 (3 years ago)
Author:
cetlod
Message:

v3.6 stable: bugfixes to solve problem particle in PISCES, see ticket #1940

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90

    r6943 r8532  
    6969      ! 
    7070      INTEGER  ::   ji, jj, jk 
    71       REAL(wp) ::   zremip, zremik, zsiremin  
     71      REAL(wp) ::   zremip, zremik, zsiremin, zammonic  
    7272      REAL(wp) ::   zsatur, zsatur2, znusil, znusil2, zdep, zdepmin, zfactdep 
    7373      REAL(wp) ::   zbactfer, zorem, zorem2, zofer, zolimit 
     
    8080      REAL(wp), POINTER, DIMENSION(:,:  ) :: ztempbac 
    8181      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepbac, zolimi, zdepprod, zw3d 
     82      REAL(wp), POINTER, DIMENSION(:,:,:) :: zoxyrem 
    8283      !!--------------------------------------------------------------------- 
    8384      ! 
     
    8687      ! Allocate temporary workspace 
    8788      CALL wrk_alloc( jpi, jpj,      ztempbac                  ) 
    88       CALL wrk_alloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi ) 
     89      CALL wrk_alloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zoxyrem ) 
    8990 
    9091      ! Initialisation of temprary arrys 
     
    131132               ! Ammonification in suboxic waters with denitrification 
    132133               ! ------------------------------------------------------- 
    133                denitr(ji,jj,jk)  = MIN(  ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit,   & 
    134                   &                     zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc)  ) 
     134               zammonic = zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) 
     135               denitr(ji,jj,jk)  = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 
     136               zoxyrem(ji,jj,jk) = zammonic *        nitrfac2(ji,jj,jk) 
    135137               ! 
    136138               zolimi (ji,jj,jk) = MAX( 0.e0, zolimi (ji,jj,jk) ) 
    137139               denitr (ji,jj,jk) = MAX( 0.e0, denitr (ji,jj,jk) ) 
     140               zoxyrem(ji,jj,jk) = MAX( 0.e0, zoxyrem(ji,jj,jk) ) 
    138141               ! 
    139142            END DO 
     
    159162               tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zonitr - rdenita * denitnh4(ji,jj,jk) 
    160163               tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2nit * zonitr 
    161                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2 * rno3 * zonitr + rno3 * ( rdenita - 1. ) * denitnh4(ji,jj,jk) 
     164               tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2 * rno3 * zonitr & 
     165                  &                + rno3 * ( rdenita - 1. ) * denitnh4(ji,jj,jk) 
    162166            END DO 
    163167         END DO 
     
    293297 
    294298      DO jk = 1, jpkm1 
    295          tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zolimi (:,:,jk) + denitr(:,:,jk) 
    296          tra(:,:,jk,jpnh4) = tra(:,:,jk,jpnh4) + zolimi (:,:,jk) + denitr(:,:,jk) 
     299         tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk) 
     300         tra(:,:,jk,jpnh4) = tra(:,:,jk,jpnh4) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk) 
    297301         tra(:,:,jk,jpno3) = tra(:,:,jk,jpno3) - denitr (:,:,jk) * rdenit 
    298          tra(:,:,jk,jpdoc) = tra(:,:,jk,jpdoc) - zolimi (:,:,jk) - denitr(:,:,jk) 
     302         tra(:,:,jk,jpdoc) = tra(:,:,jk,jpdoc) - zolimi (:,:,jk) - denitr(:,:,jk) - zoxyrem(:,:,jk) 
    299303         tra(:,:,jk,jpoxy) = tra(:,:,jk,jpoxy) - zolimi (:,:,jk) * o2ut 
    300          tra(:,:,jk,jpdic) = tra(:,:,jk,jpdic) + zolimi (:,:,jk) + denitr(:,:,jk) 
    301          tra(:,:,jk,jptal) = tra(:,:,jk,jptal) + rno3 * ( zolimi(:,:,jk) + ( rdenit + 1.) * denitr(:,:,jk) ) 
     304         tra(:,:,jk,jpdic) = tra(:,:,jk,jpdic) + zolimi (:,:,jk) + denitr(:,:,jk) + zoxyrem(:,:,jk) 
     305         tra(:,:,jk,jptal) = tra(:,:,jk,jptal) + rno3 * ( zolimi(:,:,jk) + zoxyrem(:,:,jk) & 
     306              &                                        + ( rdenit + 1.) * denitr(:,:,jk) ) 
    302307      END DO 
    303308 
Note: See TracChangeset for help on using the changeset viewer.