MODULE initrc !!================================================ !! !! *** MODULE initrc *** !! Initialisation the tracer model !!================================================ #if defined key_passivetrc !!------------------------------------------------------- !! TOP 1.0, LOCEAN-IPSL (2005) !! $Header$ !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt !!------------------------------------------------------- !!-------------------------------------------------------------- !! * Modules used !! ============== USE oce_trc USE trc USE trcrst USE trcctl USE trclec USE trcdtr USE trcini USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) USE lib_mpp ! distributed memory computing IMPLICIT NONE PRIVATE !! * Accessibility PUBLIC ini_trc !! * Substitutions # include "domzgr_substitute.h90" CONTAINS SUBROUTINE ini_trc !!--------------------------------------------------------------------- !! !! ROUTINE ini_trc !! ****************** !! !! PURPOSE : !! --------- !! initialize the tracer model !! !! METHOD : !! ------- !! !! !! History: !! ------- !! original : 91-03 () !! additions : 92-01 (C. Levy) !! 05-03 (O. Aumont and A. El Moussaoui) F90 !! 05-10 (C. Ethe ) print control initialization !!---------------------------------------------------------------------- !!--------------------------------------------------------------------- !! OPA.9, 03-2005 !!--------------------------------------------------------------------- INTEGER :: ji, jj, jk, jn !: dummy loop indices !! 0.b PRINT the number of tracer !! ------------------------------ IF(lwp) WRITE(numout,*) ' ' IF(lwp) WRITE(numout,*) ' *** number of passive tracer jptra = ',jptra IF(lwp) WRITE(numout,*) ' ' ! 1. READ passive tracers namelists ! --------------------------------- CALL trc_lec ! 2. control consistency between parameters, cpp key and namelists ! ---------------------------------------------------------------- CALL trc_ctl ! 3. computes some initializations ! -------------------------------- CALL trc_ini ! 4. total volume of the ocean !----------------------------- areatot = 0. DO jk = 1, jpk DO jj = 1, jpj DO ji = 1, jpi areatot = areatot + tmask(ji,jj,jk) * tmask_i(ji,jj) & #if defined key_off_degrad & * facvol(ji,jj,jk) & #endif & * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) END DO END DO END DO IF( lk_mpp ) THEN CALL mpp_sum(areatot) ! sum over the global domain END IF IF(lwp) WRITE(numout,*) ' ' IF (lwp) WRITE(numout,*) 'Total volume of ocean =',areatot IF(lwp) WRITE(numout,*) ' ' ! 5. Initialization of tracers ! ----------------------------- IF( lrsttr ) THEN ! 5.1 restart from a file !------------------------ CALL trc_rst_read ELSE ! 5.2 analytical formulation or global data !------------------------------------- CALL trc_dtr ENDIF ! 6. Computation integral of all tracers !------------------ trai = 0. DO jn = 1, jptra DO jk = 1, jpk DO jj = 1, jpj DO ji = 1, jpi trai = trai + trn(ji,jj,jk,jn) * tmask(ji,jj,jk) * tmask_i(ji,jj) & #if defined key_off_degrad & * facvol(ji,jj,jk) & #endif & * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) END DO END DO END DO ENDDO IF( lk_mpp ) THEN CALL mpp_sum(trai) ! sum over the global domain END IF IF(lwp) WRITE(numout,*) ' ' IF(lwp) WRITE(numout,*) 'Integral of all tracers over the full domain at initial time =',trai IF(lwp) WRITE(numout,*) ' ' ! 6. Print control !------------------ IF( ln_ctl ) CALL prt_ctl_trc_init END SUBROUTINE ini_trc #else !!====================================================================== !! Empty module : No passive tracer !!====================================================================== CONTAINS SUBROUTINE ini_trc END SUBROUTINE ini_trc #endif END MODULE initrc