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 2457 for branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2010-12-07T10:51:47+01:00 (14 years ago)
Author:
cetlod
Message:

Improve TOP & OFF components in v3.3beta, see ticket #774

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r2431 r2457  
    3333   USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine) 
    3434   USE lib_mpp         ! distributed memory computing library 
     35   USE lib_fortran     !  
    3536    
    3637   IMPLICIT NONE 
     
    6768      !                 ! masked grid volume 
    6869      DO jk = 1, jpk 
    69          cvol(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 
     70         cvol(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk)  
    7071      END DO 
    7172 
    7273      ! total volume of the ocean 
    7374#if ! defined key_degrad 
    74       areatot = SUM( cvol(:,:,:) ) 
     75      areatot = glob_sum( cvol(:,:,:) ) 
    7576#else 
    76       areatot = SUM( cvol(:,:,:) * facvol(:,:,:) )  ! degrad option: reduction by facvol 
     77      areatot = glob_sum( cvol(:,:,:) * facvol(:,:,:) )  ! degrad option: reduction by facvol 
    7778#endif 
    78       IF( lk_mpp )   CALL mpp_sum( areatot )        ! sum over the global domain   
    7979 
    8080                                  CALL trc_nam      ! read passive tracers namelists 
     
    146146      DO jn = 1, jptra 
    147147#if ! defined key_degrad 
    148          trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) ) 
     148         trai = trai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) ) 
    149149#else 
    150          trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol 
     150         trai = trai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol 
    151151#endif 
    152152      END DO       
    153       IF( lk_mpp )   CALL mpp_sum( trai )     ! sum over the global domain   
    154  
    155153 
    156154      !                 ! control print 
Note: See TracChangeset for help on using the changeset viewer.