MODULE trcwri !!====================================================================== !! *** MODULE trcwri *** !! TOP : Output of passive tracers !!====================================================================== !! 1.0 ! !! ! 2009-05 (C. Ethe ) !!---------------------------------------------------------------------- #if defined key_top && defined key_iomput !!---------------------------------------------------------------------- !! 'key_top' && 'key_iomput' TOP models !!---------------------------------------------------------------------- !! trc_wri : outputs of concentration fields !!---------------------------------------------------------------------- USE trc USE iom #if defined key_off_tra USE oce_trc USE dianam #endif IMPLICIT NONE PRIVATE PUBLIC trc_wri !! * Substitutions # include "top_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) !! $Id: trcdia.F90 1450 2009-05-15 14:12:12Z cetlod $ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE trc_wri( kt ) !!--------------------------------------------------------------------- !! *** ROUTINE trc_wri *** !! !! ** Purpose : output passive tracers fields !!--------------------------------------------------------------------- INTEGER, INTENT( in ) :: kt ! ocean time-step INTEGER :: jn CHARACTER (len=20) :: cltra #if defined key_off_tra CHARACTER (len=40) :: clhstnam INTEGER :: inum = 11 ! temporary logical unit #endif !!--------------------------------------------------------------------- ! Initialisation ! -------------- CALL iom_setkt( kt + ndttrc - 1 ) ! set the passive tracer time step #if defined key_off_tra IF( kt == nittrc000 ) THEN ! WRITE root name in date.file for use by postpro IF(lwp) THEN CALL dia_nam( clhstnam, nwritetrc,' ' ) CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) WRITE(inum,*) clhstnam CLOSE(inum) ENDIF ENDIF #endif ! write the tracer concentrations in the file ! --------------------------------------- DO jn = 1, jptra cltra = ctrcnm(jn) ! short title for tracer CALL iom_put( cltra, trn(:,:,:,jn) ) END DO ! CALL iom_setkt( kt ) ! set the model time step ! END SUBROUTINE trc_wri #else !!---------------------------------------------------------------------- !! Dummy module : No passive tracer !!---------------------------------------------------------------------- PUBLIC trc_wri CONTAINS SUBROUTINE trc_wri( kt ) ! Empty routine INTEGER, INTENT(in) :: kt END SUBROUTINE trc_wri #endif !!====================================================================== END MODULE trcwri