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.
trcwri.F90 in NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/TOP – NEMO

source: NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/TOP/trcwri.F90 @ 13151

Last change on this file since 13151 was 13151, checked in by gm, 4 years ago

result from merge with qco r12983

  • Property svn:keywords set to Id
File size: 4.0 KB
RevLine 
[1457]1MODULE trcwri
[3294]2   !!======================================================================
[1457]3   !!                       *** MODULE trcwri ***
[1836]4   !!    TOP :   Output of passive tracers
[3294]5   !!======================================================================
[1836]6   !! History :   1.0  !  2009-05 (C. Ethe)  Original code
[1457]7   !!----------------------------------------------------------------------
[3294]8#if defined key_top && defined key_iomput
[1457]9   !!----------------------------------------------------------------------
[3294]10   !!   'key_top'                                           TOP models
[1457]11   !!----------------------------------------------------------------------
[1836]12   !! trc_wri_trc   :  outputs of concentration fields
[1457]13   !!----------------------------------------------------------------------
[3294]14   USE dom_oce     ! ocean space and time domain variables
15   USE oce_trc     ! shared variables between ocean and passive tracers
16   USE trc         ! passive tracers common variables
17   USE iom         ! I/O manager
18   USE dianam      ! Output file name
[3295]19   USE trcwri_pisces
[3680]20   USE trcwri_cfc
[7646]21   USE trcwri_c14
22   USE trcwri_age
[3680]23   USE trcwri_my_trc
[1457]24
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC trc_wri     
29
30CONTAINS
31
[12377]32   SUBROUTINE trc_wri( kt, Kmm )
[1457]33      !!---------------------------------------------------------------------
34      !!                     ***  ROUTINE trc_wri  ***
[1836]35      !!
36      !! ** Purpose :   output passive tracers fields and dynamical trends
37      !!---------------------------------------------------------------------
[3750]38      INTEGER, INTENT( in )     :: kt
[12377]39      INTEGER, INTENT( in )     :: Kmm  ! time level indices
[1836]40      !
[3294]41      INTEGER                   :: jn
42      CHARACTER (len=20)        :: cltra
43      CHARACTER (len=40)        :: clhstnam
[1656]44      INTEGER ::   inum = 11            ! temporary logical unit
[1457]45      !!---------------------------------------------------------------------
[3750]46      !
[9124]47      IF( ln_timing )   CALL timing_start('trc_wri')
[3750]48      !
[12280]49      IF( l_offline ) THEN    ! WRITE root name in date.file for use by postpro
50         IF(  kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
51           CALL dia_nam( clhstnam, nn_writetrc,' ' )
52           CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
53           WRITE(inum,*) clhstnam
54           CLOSE(inum)
55        ENDIF
[12377]56
57       ! Output of initial vertical scale factor
58       CALL iom_put( "e3t_0", e3t_0(:,:,:) )
59       CALL iom_put( "e3u_0", e3u_0(:,:,:) )
60       CALL iom_put( "e3v_0", e3v_0(:,:,:) )
61       !
[13151]62#if ! defined key_qco
[12377]63       CALL iom_put( "e3t" , e3t(:,:,:,Kmm) )
64       CALL iom_put( "e3u" , e3u(:,:,:,Kmm) )
65       CALL iom_put( "e3v" , e3v(:,:,:,Kmm) )
[13151]66#endif 
[12377]67       !
[1656]68      ENDIF
[1457]69      ! write the tracer concentrations in the file
70      ! ---------------------------------------
[12377]71      IF( ln_pisces  )   CALL trc_wri_pisces( Kmm )     ! PISCES
72      IF( ll_cfc     )   CALL trc_wri_cfc   ( Kmm )     ! surface fluxes of CFC
73      IF( ln_c14     )   CALL trc_wri_c14   ( Kmm )     ! surface fluxes of C14
74      IF( ln_age     )   CALL trc_wri_age   ( Kmm )     ! AGE tracer
75      IF( ln_my_trc  )   CALL trc_wri_my_trc( Kmm )     ! MY_TRC  tracers
[1457]76      !
[9124]77      IF( ln_timing )   CALL timing_stop('trc_wri')
[3750]78      !
79   END SUBROUTINE trc_wri
[1457]80
81#else
82   !!----------------------------------------------------------------------
83   !!  Dummy module :                                     No passive tracer
84   !!----------------------------------------------------------------------
85   PUBLIC trc_wri
86CONTAINS
[12377]87   SUBROUTINE trc_wri( kt, Kmm )                     ! Empty routine   
[1457]88   INTEGER, INTENT(in) :: kt
[12377]89   INTEGER, INTENT(in) :: Kmm  ! time level indices
[1457]90   END SUBROUTINE trc_wri
91#endif
92
[2528]93   !!----------------------------------------------------------------------
[10067]94   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
[2528]95   !! $Id$
[10068]96   !! Software governed by the CeCILL license (see ./LICENSE)
[1457]97   !!======================================================================
98END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.