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 763 for branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90 – NEMO

Ignore:
Timestamp:
2007-12-13T14:52:50+01:00 (16 years ago)
Author:
gm
Message:

dev_001_GM - Style only addition in TOP F90 h90 routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90

    r719 r763  
    11MODULE initrc 
    2    !!================================================ 
    3    !! 
    4    !!                       *** MODULE initrc *** 
    5    !! Initialisation the tracer model 
    6    !!================================================ 
    7                                                                                                                              
     2   !!====================================================================== 
     3   !!                         ***  MODULE initrc  *** 
     4   !! TOP :   Initialisation of passive tracers 
     5   !!====================================================================== 
     6   !! History :    -   !  1991-03  ()  original code 
     7   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90 
     8   !!              -   !  2005-10 (C. Ethe) print control 
     9   !!---------------------------------------------------------------------- 
    810#if defined key_passivetrc 
    9  
    10    !!------------------------------------------------------- 
    11    !!  TOP 1.0,  LOCEAN-IPSL (2005)  
    12    !! $Header$  
    13    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    14    !!------------------------------------------------------- 
    15  
    16    !!-------------------------------------------------------------- 
    17    !! * Modules used 
    18    !! ============== 
     11   !!---------------------------------------------------------------------- 
     12   !!   'key_passivetrc'                                    Passive tracers 
     13   !!---------------------------------------------------------------------- 
     14   !!   ini_trc    :  initialisation of passive tracers 
     15   !!---------------------------------------------------------------------- 
    1916   USE oce_trc 
    2017   USE trc 
     
    2926   PRIVATE 
    3027    
    31     
    32    !! * Accessibility 
    33    PUBLIC ini_trc 
     28   PUBLIC   ini_trc   ! called by ??? 
    3429 
    3530    !! * Substitutions 
    3631#  include "domzgr_substitute.h90" 
     32   !!---------------------------------------------------------------------- 
     33   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005)  
     34   !! $Id:$  
     35   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     36   !!---------------------------------------------------------------------- 
    3737   
    3838CONTAINS 
     
    4040   SUBROUTINE ini_trc 
    4141      !!--------------------------------------------------------------------- 
     42      !!                     ***  ROUTINE ini_trc  *** 
    4243      !! 
    43       !!                       ROUTINE ini_trc 
    44       !!                     ****************** 
     44      !! ** Purpose :   Initialization of the passive tracer fields  
    4545      !! 
    46       !!  PURPOSE : 
    47       !!  --------- 
    48       !!     initialize the tracer model 
    49       !! 
    50       !!   METHOD : 
    51       !!   ------- 
    52       !! 
    53       !! 
    54       !!   History: 
    55       !!   ------- 
    56       !!      original  : 91-03 () 
    57       !!      additions : 92-01 (C. Levy) 
    58       !!                  05-03 (O. Aumont and A. El Moussaoui) F90 
    59       !!                  05-10 (C. Ethe ) print control initialization  
    60       !!---------------------------------------------------------------------- 
     46      !! ** Method  : - read namelist 
     47      !!              - control the consistancy  
     48      !!              - compute specific initialisations 
     49      !!              - set initial tracer fields (either read restart  
     50      !!                or read data or analytical formulation 
     51      !!--------------------------------------------------------------------- 
     52      INTEGER ::   ji, jj, jk, jn    ! dummy loop indices 
     53      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zbt   ! workspace: masked grid volume 
     54      !!--------------------------------------------------------------------- 
    6155 
    62       !!--------------------------------------------------------------------- 
    63       !!  OPA.9, 03-2005 
    64       !!--------------------------------------------------------------------- 
    65       INTEGER :: ji, jj, jk, jn    !: dummy loop indices 
     56      IF(lwp) WRITE(numout,*) 
     57      IF(lwp) WRITE(numout,*) 'ini_trc : initial set up of the passive tracers' 
     58      IF(lwp) WRITE(numout,*) '~~~~~~~' 
    6659 
    67       !! 0.b PRINT the number of tracer 
    68       !! ------------------------------ 
     60      !                 ! masked grid volume 
     61      DO jk = 1, jpk 
     62         zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 
     63      END DO 
     64#if defined key_off_degrad 
     65      zbt(:,:,:) = zbt(:,:,:) * facvol(ji,jj,jk)      ! degrad option: reduction by facvol 
     66#endif 
    6967 
    70       IF(lwp) WRITE(numout,*) ' ' 
    71       IF(lwp) WRITE(numout,*) ' *** number of passive tracer jptra = ',jptra 
    72       IF(lwp) WRITE(numout,*) ' ' 
     68      !                 ! total volume of the ocean 
     69      areatot = SUM( zbt(:,:,:) ) 
     70      IF( lk_mpp )   CALL mpp_sum( areatot )     ! sum over the global domain   
    7371 
    74       ! 1. READ passive tracers namelists 
    75       ! --------------------------------- 
     72      CALL trc_lec      ! READ passive tracers namelists 
    7673 
    77       CALL trc_lec 
     74      CALL trc_ctl      ! control consistency between parameters, cpp key and namelists 
    7875 
    79       ! 2. control consistency between parameters, cpp key and namelists 
    80       ! ---------------------------------------------------------------- 
     76      CALL trc_ini      ! computes some initializations 
    8177 
    82       CALL trc_ctl 
    83  
    84       ! 3. computes some initializations 
    85       ! -------------------------------- 
    86  
    87       CALL trc_ini 
    88  
    89   
    90       ! 4. total volume of the ocean 
    91       !----------------------------- 
    92  
    93       areatot = 0. 
    94       DO jk = 1, jpk 
    95          DO jj = 1, jpj 
    96             DO ji = 1, jpi 
    97                areatot = areatot + tmask(ji,jj,jk) * tmask_i(ji,jj)  & 
    98 #if defined key_off_degrad 
    99                   &                * facvol(ji,jj,jk)    & 
    100 #endif 
    101                   &                * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)  
    102             END DO 
    103          END DO 
    104       END DO 
    105       IF( lk_mpp ) THEN  
    106          CALL mpp_sum(areatot)     ! sum over the global domain   
    107       END IF 
    108  
    109       IF(lwp) WRITE(numout,*) ' ' 
    110       IF (lwp) WRITE(numout,*) 'Total volume of ocean =',areatot 
    111       IF(lwp) WRITE(numout,*) ' ' 
    112  
    113       ! 5. Initialization of tracers 
    114       ! ----------------------------- 
    115  
    116       IF( lrsttr ) THEN 
    117  
    118          ! 5.1 restart from a file 
    119          !------------------------ 
    120          CALL trc_rst_read 
    121  
    122       ELSE 
    123  
    124          !  5.2 analytical formulation or global data 
    125          !------------------------------------- 
    126          CALL trc_dtr 
    127  
     78      !                 ! set initial tracer values  
     79      IF( lrsttr ) THEN   ;   CALL trc_rst_read      ! restart from a file 
     80      ELSE                ;   CALL trc_dtr           ! analytical formulation or from data 
    12881      ENDIF 
    12982 
     83      !                 ! Computation content of all tracers 
     84      trai = 0.e0 
     85      DO jn = 1, jptra 
     86         trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) ) 
     87      END DO       
     88      IF( lk_mpp )   CALL mpp_sum( trai )     ! sum over the global domain   
    13089 
    131       ! 6. Computation integral of all tracers 
    132       !------------------ 
    13390 
    134       trai = 0. 
    135       DO jn = 1, jptra 
    136          DO jk = 1, jpk 
    137             DO jj = 1, jpj 
    138                DO ji = 1, jpi 
    139                   trai = trai + trn(ji,jj,jk,jn) * tmask(ji,jj,jk) * tmask_i(ji,jj)    & 
    140 #if defined key_off_degrad 
    141                      &              * facvol(ji,jj,jk)   & 
    142 #endif 
     91      !                 ! control print 
     92      IF(lwp) WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra 
     93      IF(lwp) WRITE(numout,*) '          *** Total volume of ocean                = ', areatot 
     94      IF(lwp) WRITE(numout,*) '          *** Total inital content of all tracers  = ', trai 
     95      IF(lwp) WRITE(numout,*) 
    14396 
    144                      &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) 
    145                END DO 
    146             END DO 
    147          END DO 
    148       ENDDO 
    149        
    150       IF( lk_mpp ) THEN  
    151          CALL mpp_sum(trai)         ! sum over the global domain   
    152       END IF 
    153  
    154       IF(lwp) WRITE(numout,*) ' '      
    155       IF(lwp) WRITE(numout,*) 'Integral of all tracers over the full domain at initial time =',trai 
    156       IF(lwp) WRITE(numout,*) ' ' 
    157  
    158       ! 6. Print control 
    159       !------------------ 
    160  
    161       IF( ln_ctl )    CALL prt_ctl_trc_init 
    162  
     97      IF( ln_ctl )   CALL prt_ctl_trc_init      ! control print 
     98      ! 
    16399   END SUBROUTINE ini_trc 
    164100 
    165  
    166101#else 
    167    !!====================================================================== 
    168    !!  Empty module : No passive tracer 
    169    !!====================================================================== 
     102   !!---------------------------------------------------------------------- 
     103   !!  Empty module :                                     No passive tracer 
     104   !!---------------------------------------------------------------------- 
    170105CONTAINS 
    171    SUBROUTINE ini_trc       
     106   SUBROUTINE ini_trc                      ! Dummy routine    
    172107   END SUBROUTINE ini_trc 
    173108#endif 
    174109 
     110   !!====================================================================== 
    175111END MODULE initrc  
Note: See TracChangeset for help on using the changeset viewer.