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 5075 for branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90 – NEMO

Ignore:
Timestamp:
2015-02-11T11:50:34+01:00 (9 years ago)
Author:
timgraham
Message:

Upgraded branch to current head of trunk (r5072) so it can be used with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r4641 r5075  
    3333 
    3434   !! * Module variables 
    35    REAL(wp) :: ryyss                    !: number of seconds per year  
    36    REAL(wp) :: r1_ryyss                 !: inverse of ryyss 
    37    REAL(wp) :: rmtss                    !: number of seconds per month 
    3835   REAL(wp) :: r1_rday                  !: inverse of rday 
    3936 
     
    8481      ! 
    8582      IF( kt == nittrc000 .AND. jnt == 1 )  THEN 
    86          ryyss    = nyear_len(1) * rday    ! number of seconds per year and per month 
    87          rmtss    = ryyss / raamo 
    8883         r1_rday  = 1. / rday 
    89          r1_ryyss = 1. / ryyss 
    9084         IF( ln_check_mass .AND. lwp)  & 
    9185           &  CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
     
    9993      zdenit2d(:,:) = 0.e0 
    10094      zbureff (:,:) = 0.e0 
     95      zwork1  (:,:) = 0.e0 
     96      zwork2  (:,:) = 0.e0 
     97      zwork3  (:,:) = 0.e0 
     98      zwork4  (:,:) = 0.e0 
    10199 
    102100      ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al. 
     
    117115         ! 
    118116         trn(:,:,1,jpfer) = trn(:,:,1,jpfer) + zironice(:,:)  
    119          !                                               
    120          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     117         !  
     118         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "Ironice" ) )   & 
    121119            &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! iron flux from ice 
     120         ! 
    122121         CALL wrk_dealloc( jpi, jpj, zironice ) 
    123122         !                                               
     
    132131         !                                              ! Iron and Si deposition at the surface 
    133132         IF( ln_solub ) THEN 
    134             zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / ( 55.85 * rmtss ) + 3.e-10 * r1_ryyss  
     133            zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 55.85 + 3.e-10 * r1_ryyss  
    135134         ELSE 
    136             zirondep(:,:,1) = dustsolub  * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / ( 55.85 * rmtss ) + 3.e-10 * r1_ryyss  
     135            zirondep(:,:,1) = dustsolub  * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 55.85 + 3.e-10 * r1_ryyss  
    137136         ENDIF 
    138          zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / ( 28.1  * rmtss ) 
    139          zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / ( 31.   * rmtss ) / po4r  
     137         zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 28.1  
     138         zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 31. / po4r  
    140139         !                                              ! Iron solubilization of particles in the water column 
    141140         !                                              ! dust in kg/m2/s ---> 1/55.85 to put in mol/Fe ;  wdust in m/j 
     
    148147         trn(:,:,1,jpsil) = trn(:,:,1,jpsil) + zsidep  (:,:) 
    149148         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + zirondep(:,:,:)  
    150          !                                               
    151          IF( ln_diatrc ) THEN 
    152             zfact = 1.e+3 * rfact2r 
    153             IF( lk_iomput ) THEN 
    154                IF( jnt == nrdttrc ) THEN 
    155                   CALL iom_put( "Irondep", zirondep(:,:,1) * zfact * fse3t(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron 
    156                   CALL iom_put( "pdust"  , dust(:,:) / ( wdust * rday )  * tmask(:,:,1) ) ! dust concentration at surface 
    157                ENDIF 
    158             ELSE 
    159                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 
    160156            ENDIF 
     157         ELSE                                     
     158            IF( ln_diatrc )  & 
     159              &  trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) 
    161160         ENDIF 
    162161         CALL wrk_dealloc( jpi, jpj,      zpdep, zsidep ) 
     
    188187         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 
    189188         ! 
    190          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     189         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "Ironsed" ) )   & 
    191190            &   CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments 
    192191      ENDIF 
     
    197196         trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 
    198197         ! 
    199          IF( ln_diatrc .AND. lk_iomput .AND. jnt == nrdttrc )   & 
     198         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "HYDR" ) )   & 
    200199            &   CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input 
    201200      ENDIF 
    202  
    203201 
    204202      ! OA: Warning, the following part is necessary, especially with Kriest 
     
    250248      DO jj = 1, jpj 
    251249         DO ji = 1, jpi 
    252             ikt = mbkt(ji,jj)  
     250            IF( tmask(ji,jj,1) == 1 ) THEN 
     251               ikt = mbkt(ji,jj)  
    253252# if defined key_kriest 
    254             zwork1(ji,jj) = trn(ji,jj,ikt,jpgsi) * zwscal (ji,jj) 
    255             zwork2(ji,jj) = trn(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) 
     253               zwork1(ji,jj) = trn(ji,jj,ikt,jpgsi) * zwscal (ji,jj) 
     254               zwork2(ji,jj) = trn(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) 
    256255# else 
    257             zwork1(ji,jj) = trn(ji,jj,ikt,jpgsi) * zwsbio4(ji,jj) 
    258             zwork2(ji,jj) = trn(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) + trn(ji,jj,ikt,jppoc) * zwsbio3(ji,jj)  
     256               zwork1(ji,jj) = trn(ji,jj,ikt,jpgsi) * zwsbio4(ji,jj) 
     257               zwork2(ji,jj) = trn(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) + trn(ji,jj,ikt,jppoc) * zwsbio3(ji,jj)  
    259258# endif 
    260             ! For calcite, burial efficiency is made a function of saturation 
    261             zfactcal      = MIN( excess(ji,jj,ikt), 0.2 ) 
    262             zfactcal      = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) ) 
    263             zwork3(ji,jj) = trn(ji,jj,ikt,jpcal) * zwscal(ji,jj) * 2.e0 * zfactcal 
     259               ! For calcite, burial efficiency is made a function of saturation 
     260               zfactcal      = MIN( excess(ji,jj,ikt), 0.2 ) 
     261               zfactcal      = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) ) 
     262               zwork3(ji,jj) = trn(ji,jj,ikt,jpcal) * zwscal(ji,jj) * 2.e0 * zfactcal 
     263            ENDIF 
    264264         END DO 
    265265      END DO 
     
    381381      END DO 
    382382 
    383   
    384       IF( ln_check_mass ) THEN 
    385         ! Global budget of N SMS : denitrification in the water column and in the sediment 
    386          !                          nitrogen fixation by the diazotrophs 
    387          ! -------------------------------------------------------------------------------- 
    388          zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 
    389          zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) ) 
    390          znitrpottot  = glob_sum ( znitrpot(:,:,:) * nitrfix              * cvol(:,:,:) ) 
    391          IF( kt == nitend .AND. jnt == nrdttrc ) THEN 
    392             zfact = 1.e+3 * rfact2r * rno3 * ryyss * 14. / 1e12 
    393             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 
    394410         ENDIF 
    395        ENDIF 
    396       ! 
    397       IF( ln_diatrc ) THEN 
    398          zfact = 1.e+3 * rfact2r 
    399          IF( lk_iomput ) THEN 
    400             IF( jnt == nrdttrc ) THEN 
    401                CALL iom_put( "Nfix"  , znitrpot(:,:,:) * nitrfix * rno3 * zfact * tmask(:,:,:) )  ! nitrogen fixation  
    402                CALL iom_put( "Sdenit", zwork4(:,:)               * rno3 * zfact * tmask(:,:,1) )  ! Nitrate reduction in the sediments 
    403             ENDIF 
    404          ELSE 
    405             trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * nitrfix * zfact * fse3t(:,:,1) * tmask(:,:,1) 
    406          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) 
    407414      ENDIF 
    408415      ! 
Note: See TracChangeset for help on using the changeset viewer.