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 3318 for branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90 – NEMO

Ignore:
Timestamp:
2012-02-25T16:50:01+01:00 (12 years ago)
Author:
gm
Message:

Ediag branche: #927 split TRA/DYN trd computation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90

    r3295 r3318  
    44   !! TOP :   PISCES Source Minus Sink manager 
    55   !!====================================================================== 
    6    !! History :   1.0  !  2004-03 (O. Aumont) Original code 
    7    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90 
     6   !! History :  1.0  !  2004-03 (O. Aumont) Original code 
     7   !!            2.0  !  2007-12  (C. Ethe, G. Madec)  F90 
    88   !!---------------------------------------------------------------------- 
    99#if defined key_pisces 
     
    1111   !!   'key_pisces'                                       PISCES bio-model 
    1212   !!---------------------------------------------------------------------- 
    13    !!   trcsms_pisces        :  Time loop of passive tracers sms 
    14    !!---------------------------------------------------------------------- 
    15    USE oce_trc         !  shared variables between ocean and passive tracers 
    16    USE trc             !  passive tracers common variables  
    17    USE sms_pisces      !  PISCES Source Minus Sink variables 
    18    USE p4zbio          !  Biological model 
    19    USE p4zche          !  Chemical model 
    20    USE p4zlys          !  Calcite saturation 
    21    USE p4zflx          !  Gas exchange 
    22    USE p4zsed          !  Sedimentation 
    23    USE p4zint          !  time interpolation 
    24    USE trdmod_oce      !  Ocean trends variables 
    25    USE trdmod_trc      !  TOP trends variables 
    26    USE sedmodel        !  Sediment model 
    27    USE prtctl_trc      !  print control for debugging 
     13   !!   trcsms_pisces :  Time loop of passive tracers sms 
     14   !!---------------------------------------------------------------------- 
     15   USE oce_trc        !  shared variables between ocean and passive tracers 
     16   USE trc            !  passive tracers common variables  
     17   USE sms_pisces     !  PISCES Source Minus Sink variables 
     18   USE p4zbio         !  Biological model 
     19   USE p4zche         !  Chemical model 
     20   USE p4zlys         !  Calcite saturation 
     21   USE p4zflx         !  Gas exchange 
     22   USE p4zsed         !  Sedimentation 
     23   USE p4zint         !  time interpolation 
     24   USE trd_oce        ! trends: ocean variables 
     25   USE trdmod_trc     !  TOP trends variables 
     26   USE sedmodel       !  Sediment model 
     27   USE prtctl_trc     !  print control for debugging 
    2828 
    2929   IMPLICIT NONE 
    3030   PRIVATE 
    3131 
    32    PUBLIC   trc_sms_pisces    ! called in trcsms.F90 
    33  
    34    LOGICAL ::  ln_check_mass = .false.       !: Flag to check mass conservation  
    35  
    36    INTEGER ::  numno3  !: logical unit for NO3 budget 
    37    INTEGER ::  numalk  !: logical unit for talk budget 
    38    INTEGER ::  numsil  !: logical unit for Si budget 
     32   PUBLIC   trc_sms_pisces   ! called in trcsms.F90 
     33 
     34   LOGICAL ::   ln_check_mass = .false.   ! Flag to check mass conservation  
     35 
     36   INTEGER ::   numno3   ! logical unit for NO3 budget 
     37   INTEGER ::   numalk   ! logical unit for talk budget 
     38   INTEGER ::   numsil   ! logical unit for Si budget 
    3939 
    4040   !!---------------------------------------------------------------------- 
     
    4343   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4444   !!---------------------------------------------------------------------- 
    45  
    4645CONTAINS 
    4746 
     
    5756      !!              - ... 
    5857      !!--------------------------------------------------------------------- 
    59       ! 
    60       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    61       !! 
    62       INTEGER ::   jnt, jn 
     58      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index       
     59      ! 
     60      INTEGER ::   jnt, jn   ! dummy loop indices 
    6361      CHARACTER (len=25) :: charout 
    6462      !!--------------------------------------------------------------------- 
    6563      ! 
    66       IF( nn_timing == 1 )  CALL timing_start('trc_sms_pisces') 
     64      IF( nn_timing == 1 )   CALL timing_start('trc_sms_pisces') 
    6765      ! 
    6866      IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 )   CALL trc_sms_pisces_dmp( kt )  ! Relaxation of some tracers 
     
    102100      IF( l_trdtrc ) THEN 
    103101          DO jn = jp_pcs0, jp_pcs1 
    104             CALL trd_mod_trc( tra(:,:,:,jn), jn, jptra_trd_sms, kt )   ! save trends 
     102            CALL trd_mod_trc( tra(:,:,:,jn), jn, jptra_sms, kt )   ! save trends 
    105103          END DO 
    106104      END IF 
     
    120118   END SUBROUTINE trc_sms_pisces 
    121119 
     120 
    122121   SUBROUTINE trc_sms_pisces_dmp( kt ) 
    123122      !!---------------------------------------------------------------------- 
     
    126125      !! ** purpose  : Relaxation of some tracers 
    127126      !!---------------------------------------------------------------------- 
    128       ! 
    129127      INTEGER, INTENT( in )  ::     kt ! time step 
    130128      ! 
    131       REAL(wp) ::  alkmean = 2426.     ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) 
    132       REAL(wp) ::  po4mean = 2.165     ! mean value of phosphates 
    133       REAL(wp) ::  no3mean = 30.90     ! mean value of nitrate 
    134       REAL(wp) ::  silmean = 91.51     ! mean value of silicate 
    135       ! 
    136       REAL(wp) :: zarea, zalksum, zpo4sum, zno3sum, zsilsum 
    137       !!--------------------------------------------------------------------- 
    138  
     129      REAL(wp) ::   alkmean = 2426.   ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) 
     130      REAL(wp) ::   po4mean = 2.165   ! mean value of phosphates 
     131      REAL(wp) ::   no3mean = 30.90   ! mean value of nitrate 
     132      REAL(wp) ::   silmean = 91.51   ! mean value of silicate 
     133      ! 
     134      REAL(wp) ::   zarea, zalksum, zpo4sum, zno3sum, zsilsum   ! local scalars 
     135      !!--------------------------------------------------------------------- 
    139136 
    140137      IF(lwp)  WRITE(numout,*) 
     
    165162         ! 
    166163      ENDIF 
    167  
     164      ! 
    168165   END SUBROUTINE trc_sms_pisces_dmp 
     166 
    169167 
    170168   SUBROUTINE trc_sms_pisces_mass_conserv ( kt ) 
     
    173171      !! 
    174172      !! ** Purpose :  Mass conservation check  
    175       !! 
    176       !!--------------------------------------------------------------------- 
    177       ! 
     173      !!--------------------------------------------------------------------- 
    178174      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    179       !! 
     175      ! 
    180176      REAL(wp) :: zalkbudget, zno3budget, zsilbudget 
    181177      ! 
    182178      NAMELIST/nampismass/ ln_check_mass 
    183179      !!--------------------------------------------------------------------- 
    184  
     180      ! 
    185181      IF( kt == nittrc000 ) THEN  
    186182         REWIND( numnatp )        
     
    199195         ENDIF 
    200196      ENDIF 
    201  
     197      ! 
    202198      IF( ln_check_mass ) THEN      !   Compute the budget of NO3, ALK, Si 
    203199         zno3budget = glob_sum( (   trn(:,:,:,jpno3) + trn(:,:,:,jpnh4)  & 
     
    206202            &                     + trn(:,:,:,jppoc) + trn(:,:,:,jpgoc)  & 
    207203            &                     + trn(:,:,:,jpdoc)                     ) * cvol(:,:,:)  )  
    208          !  
     204            !  
    209205         zsilbudget = glob_sum( (   trn(:,:,:,jpsil) + trn(:,:,:,jpgsi)  & 
    210206            &                     + trn(:,:,:,jpdsi)                     ) * cvol(:,:,:)  ) 
    211          !  
     207            !  
    212208         zalkbudget = glob_sum( (   trn(:,:,:,jpno3) * rno3              & 
    213209            &                     + trn(:,:,:,jptal)                     & 
    214210            &                     + trn(:,:,:,jpcal) * 2.                ) * cvol(:,:,:)  ) 
    215  
     211            ! 
    216212         IF( lwp ) THEN 
    217213            WRITE(numno3,9500) kt,  zno3budget / areatot 
Note: See TracChangeset for help on using the changeset viewer.