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 4996 for trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90 – NEMO

Ignore:
Timestamp:
2014-12-22T12:56:38+01:00 (9 years ago)
Author:
cetlod
Message:

trunk : New diagnostics in PISCES model, see ticket #1424

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r4800 r4996  
    3333 
    3434   !! * Module variables 
    35    REAL(wp) :: ryyss                    !: number of seconds per year  
    36    REAL(wp) :: r1_ryyss                 !: inverse of ryyss 
    3735   REAL(wp) :: r1_rday                  !: inverse of rday 
    3836 
     
    8381      ! 
    8482      IF( kt == nittrc000 .AND. jnt == 1 )  THEN 
    85          ryyss    = nyear_len(1) * rday    ! number of seconds per year and per month 
    8683         r1_rday  = 1. / rday 
    87          r1_ryyss = 1. / ryyss 
    8884         IF( ln_check_mass .AND. lwp)  & 
    8985           &  CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
     
    119115         ! 
    120116         trn(:,:,1,jpfer) = trn(:,:,1,jpfer) + zironice(:,:)  
    121          !                                               
    122          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     117         !  
     118         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "Ironice" ) )   & 
    123119            &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! iron flux from ice 
     120         ! 
    124121         CALL wrk_dealloc( jpi, jpj, zironice ) 
    125122         !                                               
     
    150147         trn(:,:,1,jpsil) = trn(:,:,1,jpsil) + zsidep  (:,:) 
    151148         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + zirondep(:,:,:)  
    152          !                                               
    153          IF( ln_diatrc ) THEN 
    154             zfact = 1.e+3 * rfact2r 
    155             IF( lk_iomput ) THEN 
    156                IF( jnt == nrdttrc ) THEN 
    157                   CALL iom_put( "Irondep", zirondep(:,:,1) * zfact * fse3t(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron 
    158                   CALL iom_put( "pdust"  , dust(:,:) / ( wdust * rday )  * tmask(:,:,1) ) ! dust concentration at surface 
    159                ENDIF 
    160             ELSE 
    161                trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1) * zfact * fse3t(:,:,1) * tmask(:,:,1) 
     149         !  
     150         IF( lk_iomput ) THEN 
     151            IF( jnt == nrdttrc ) THEN 
     152                IF( iom_use( "Irondep" ) )   & 
     153                &  CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron 
     154                IF( iom_use( "pdust" ) )   & 
     155                &  CALL iom_put( "pdust"  , dust(:,:) / ( wdust * rday )  * tmask(:,:,1) ) ! dust concentration at surface 
    162156            ENDIF 
     157         ELSE                                     
     158            IF( ln_diatrc )  & 
     159              &  trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) 
    163160         ENDIF 
    164161         CALL wrk_dealloc( jpi, jpj,      zpdep, zsidep ) 
     
    190187         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 
    191188         ! 
    192          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     189         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "Ironsed" ) )   & 
    193190            &   CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments 
    194191      ENDIF 
     
    199196         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 
    200197         ! 
    201          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     198         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "HYDR" ) )   & 
    202199            &   CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input 
    203200      ENDIF 
    204  
    205201 
    206202      ! OA: Warning, the following part is necessary, especially with Kriest 
     
    385381      END DO 
    386382 
    387   
    388       IF( ln_check_mass ) THEN 
    389         ! Global budget of N SMS : denitrification in the water column and in the sediment 
    390          !                          nitrogen fixation by the diazotrophs 
    391          ! -------------------------------------------------------------------------------- 
    392          zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 
    393          zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) ) 
    394          znitrpottot  = glob_sum ( znitrpot(:,:,:) * nitrfix              * cvol(:,:,:) ) 
    395          IF( kt == nitend .AND. jnt == nrdttrc ) THEN 
    396             zfact = 1.e+3 * rfact2r * rno3 * ryyss * 14. / 1e12 
    397             IF(lwp) WRITE(numnit,9100) ndastp, znitrpottot * nitrfix * zfact, zrdenittot * zfact , zsdenittot * zfact 
     383      ! Global budget of N SMS : denitrification in the water column and in the sediment 
     384      !                          nitrogen fixation by the diazotrophs 
     385      ! -------------------------------------------------------------------------------- 
     386      zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 
     387      zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) ) 
     388      znitrpottot  = glob_sum ( znitrpot(:,:,:) * nitrfix              * cvol(:,:,:) ) 
     389      zfact = 1.e+3 * rfact2r * rno3 * 14. / 1.e12 * ryyss   ! conversion molC/l/kt ----> TgN/m3/year 
     390      ! 
     391      IF( ln_check_mass .AND. ( kt == nitend .AND. jnt == nrdttrc ) .AND. ( lwp )  )  & 
     392         &  WRITE(numnit,9100) ndastp, znitrpottot * zfact  , & 
     393         &                             zrdenittot  * zfact  , & 
     394         &                             zsdenittot  * zfact 
     395      ! 
     396      IF( lk_iomput ) THEN 
     397         IF( jnt == nrdttrc ) THEN 
     398            zfact = 1.e+3 * rfact2r * rno3  !  conversion from molC/l/kt  to molN/m3/s 
     399            IF( iom_use("Nfix"   ) ) CALL iom_put( "Nfix"  , znitrpot(:,:,:) * nitrfix * zfact * tmask(:,:,:) )  ! nitrogen fixation  
     400            IF( iom_use("Sdenit" ) ) CALL iom_put( "Sdenit", zwork4(:,:) * zfact * tmask(:,:,1) )  ! Nitrate reduction in the sediments 
     401            IF( iom_use("tnfix"  ) ) CALL iom_put( "tnfix"  , znitrpottot * zfact  )               ! Global  nitrogen fixation 
     402            IF( iom_use("tdenit" ) ) CALL iom_put( "tdenit" , zrdenittot  * zfact  )               ! Total denitrification 
     403            IF( iom_use("INTNFIX") ) THEN   ! nitrogen fixation rate in ocean ( vertically integrated ) 
     404               zwork1(:,:) = 0. 
     405               DO jk = 1, jpkm1 
     406                 zwork1(:,:) = zwork1(:,:) + znitrpot(:,:,jk) * nitrfix * zfact * fse3t(:,:,jk) * tmask(:,:,jk) 
     407               ENDDO 
     408               CALL iom_put( "INTNFIX" , zwork1 )  
     409            ENDIF 
    398410         ENDIF 
    399        ENDIF 
    400       ! 
    401       IF( ln_diatrc ) THEN 
    402          zfact = 1.e+3 * rfact2r 
    403          IF( lk_iomput ) THEN 
    404             IF( jnt == nrdttrc ) THEN 
    405                CALL iom_put( "Nfix"  , znitrpot(:,:,:) * nitrfix * rno3 * zfact * tmask(:,:,:) )  ! nitrogen fixation  
    406                CALL iom_put( "Sdenit", zwork4(:,:)               * rno3 * zfact * tmask(:,:,1) )  ! Nitrate reduction in the sediments 
    407             ENDIF 
    408          ELSE 
    409             trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * nitrfix * zfact * fse3t(:,:,1) * tmask(:,:,1) 
    410          ENDIF 
     411      ELSE 
     412         IF( ln_diatrc )  & 
     413            &  trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * nitrfix * rno3 * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) 
    411414      ENDIF 
    412415      ! 
Note: See TracChangeset for help on using the changeset viewer.