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.
Changeset 3531 for branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90 – NEMO

Ignore:
Timestamp:
2012-11-08T11:10:54+01:00 (11 years ago)
Author:
cetlod
Message:

branch:2012/dev_r3438_LOCEAN15_PISLOB minor bug correction, to ensure restartability see ticket #972

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r3496 r3531  
    7272      REAL(wp) ::  zsiloss, zcaloss, zwsbio3, zwsbio4, zwscal, zdep, zwstpoc 
    7373      REAL(wp) ::  ztrfer, ztrpo4, zwdust 
    74 !!Ch   
    75       REAL(wp) ::  zrdenittot, zsdenittot, znitrpottot, znitrfix 
    76 !!Ch   
     74      REAL(wp) ::  zrdenittot, zsdenittot, znitrpottot 
     75      ! 
    7776      CHARACTER (len=25) :: charout 
    7877      REAL(wp), POINTER, DIMENSION(:,:  ) :: zpdep, zsidep, zwork1, zwork2, zwork3, zwork4 
     
    8887         r1_rday  = 1. / rday 
    8988         r1_ryyss = 1. / ryyss 
    90          IF(lwp) CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
     89         IF( ln_check_mass .AND. lwp)  & 
     90           &  CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
    9191      ENDIF 
    9292      ! 
     
    333333      END DO 
    334334  
    335       ! The total gain from nitrogen fixation is scaled to balance the loss by denitrification 
    336       ! ------------------------------------------------------------- 
    337       zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 
    338       zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) ) 
    339       znitrpottot  = glob_sum ( znitrpot(:,:,:)                        * cvol(:,:,:) ) 
    340       IF( kt == nitend .AND. jnt == nrdttrc ) THEN 
    341          zfact = 1.e+3 * rfact2r * rno3 * 365. * 86400. * 14. / 1e12 
    342          IF(lwp) WRITE(numnit,9100) ndastp, znitrpottot * nitrfix * zfact, zrdenittot * zfact , zsdenittot * zfact 
    343       ENDIF 
     335      IF( ln_check_mass ) THEN 
     336         ! The total gain from nitrogen fixation is scaled to balance the loss by denitrification 
     337         ! ------------------------------------------------------------- 
     338         zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 
     339         zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) ) 
     340         znitrpottot  = glob_sum ( znitrpot(:,:,:)                        * cvol(:,:,:) ) 
     341         IF( kt == nitend .AND. jnt == nrdttrc ) THEN 
     342            zfact = 1.e+3 * rfact2r * rno3 * 365. * 86400. * 14. / 1e12 
     343            IF(lwp) WRITE(numnit,9100) ndastp, znitrpottot * nitrfix * zfact, zrdenittot * zfact , zsdenittot * zfact 
     344         ENDIF 
     345       ENDIF 
    344346 
    345347      ! Nitrogen change due to nitrogen fixation 
     
    348350         DO jj = 1, jpj 
    349351            DO ji = 1, jpi 
     352               ! zfact = znitrpot(ji,jj,jk) * ( zrdenittot + zsdenittot ) / znitrpottot 
    350353               zfact = znitrpot(ji,jj,jk) * nitrfix 
    351354               trn(ji,jj,jk,jpnh4) = trn(ji,jj,jk,jpnh4) +             zfact 
Note: See TracChangeset for help on using the changeset viewer.