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 617 for trunk/NEMO/TOP_SRC/initrc.F90 – NEMO

Ignore:
Timestamp:
2007-02-21T14:03:10+01:00 (17 years ago)
Author:
opalod
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/initrc.F90

    r345 r617  
    3232   !! * Accessibility 
    3333   PUBLIC ini_trc 
    34     
     34 
     35    !! * Substitutions 
     36#  include "domzgr_substitute.h90" 
     37   
    3538CONTAINS 
    3639    
     
    6063      !!  OPA.9, 03-2005 
    6164      !!--------------------------------------------------------------------- 
     65      INTEGER :: ji, jj, jk, jn    !: dummy loop indices 
    6266 
    6367      !! 0.b PRINT the number of tracer 
     
    8387      CALL trc_ini 
    8488 
    85       ! 4. restart from a FILE (nutrst) 
    86       ! ---------------------- 
     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      ! ----------------------------- 
    87115 
    88116      IF( lrsttr ) THEN 
    89117 
    90  
    91          CALL trc_rst 
     118         ! 5.1 restart from a file 
     119         !------------------------ 
     120         CALL trc_rst_read 
    92121 
    93122      ELSE 
    94123 
    95          ! start from anything ELSE 
    96  
     124         !  5.2 analytical formulation or global data 
     125         !------------------------------------- 
    97126         CALL trc_dtr 
    98127 
    99128      ENDIF 
    100129 
    101       ! 5. Print control 
     130 
     131      ! 6. Computation integral of all tracers 
     132      !------------------ 
     133 
     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 
     143 
     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 
    102159      !------------------ 
    103160 
     
    106163   END SUBROUTINE ini_trc 
    107164 
     165 
    108166#else 
    109167   !!====================================================================== 
     
    111169   !!====================================================================== 
    112170CONTAINS 
    113    SUBROUTINE ini_trc 
    114        
     171   SUBROUTINE ini_trc       
    115172   END SUBROUTINE ini_trc 
    116173#endif 
Note: See TracChangeset for help on using the changeset viewer.