MODULE initrc !!====================================================================== !! *** MODULE initrc *** !! TOP : Initialisation of passive tracers !!====================================================================== !! History : - ! 1991-03 () original code !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 !! - ! 2005-10 (C. Ethe) print control !! 2.0 ! 2005-10 (C. Ethe, G. Madec) revised architecture !!---------------------------------------------------------------------- #if defined key_top !!---------------------------------------------------------------------- !! 'key_top' TOP models !!---------------------------------------------------------------------- !! ini_trc : initialisation of passive tracers !!---------------------------------------------------------------------- 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) IMPLICIT NONE PRIVATE PUBLIC ini_trc ! called by ??? !! * Substitutions # include "domzgr_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) !! $Id$ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE ini_trc !!--------------------------------------------------------------------- !! *** ROUTINE ini_trc *** !! !! ** Purpose : Initialization of the passive tracer fields !! !! ** Method : - read namelist !! - control the consistancy !! - compute specific initialisations !! - set initial tracer fields (either read restart !! or read data or analytical formulation !!--------------------------------------------------------------------- INTEGER :: jk, jn ! dummy loop indices REAL(wp), DIMENSION(jpi,jpj,jpk) :: zbt ! workspace: masked grid volume CHARACTER (len=25) :: charout !!--------------------------------------------------------------------- IF(lwp) WRITE(numout,*) IF(lwp) WRITE(numout,*) 'ini_trc : initial set up of the passive tracers' IF(lwp) WRITE(numout,*) '~~~~~~~' ! ! masked grid volume DO jk = 1, jpk zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) END DO #if defined key_off_degrad DO jk = 1, jpk zbt(:,:,:) = zbt(:,:,:) * facvol(:,:,jk) ! degrad option: reduction by facvol ENDDO #endif ! ! total volume of the ocean areatot = SUM( zbt(:,:,:) ) IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain CALL trc_lec ! READ passive tracers namelists CALL trc_ctl ! control consistency between parameters, cpp key and namelists CALL trc_ini ! computes some initializations ! ! set initial tracer values IF( lrsttr ) THEN ; CALL trc_rst_read ! restart from a file ELSE ; CALL trc_dtr ! analytical formulation or from data ENDIF ! ! Computation content of all tracers trai = 0.e0 DO jn = 1, jptra trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) ) END DO IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain ! ! control print IF(lwp) WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra IF(lwp) WRITE(numout,*) ' *** Total volume of ocean = ', areatot IF(lwp) WRITE(numout,*) ' *** Total inital content of all tracers = ', trai IF(lwp) WRITE(numout,*) IF( ln_ctl ) CALL prt_ctl_trc_init ! control print ! IF(ln_ctl) THEN ! print mean trends (used for debugging) WRITE(charout, FMT="('ini ')") CALL prt_ctl_trc_info( charout ) CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) ENDIF END SUBROUTINE ini_trc #else !!---------------------------------------------------------------------- !! Empty module : No passive tracer !!---------------------------------------------------------------------- CONTAINS SUBROUTINE ini_trc ! Dummy routine END SUBROUTINE ini_trc #endif !!====================================================================== END MODULE initrc