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 branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC – NEMO

source: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 7806

Last change on this file since 7806 was 7806, checked in by cbricaud, 7 years ago

phaze dev_r5003_MERCATOR6_CRS branch with rev7805 of 3.6_stable branch

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1MODULE trcwri
2   !!======================================================================
3   !!                       *** MODULE trcwri ***
4   !!    TOP :   Output of passive tracers
5   !!======================================================================
6   !! History :   1.0  !  2009-05 (C. Ethe)  Original code
7   !!----------------------------------------------------------------------
8#if defined key_top && defined key_iomput
9   !!----------------------------------------------------------------------
10   !!   'key_top'                                           TOP models
11   !!----------------------------------------------------------------------
12   !! trc_wri_trc   :  outputs of concentration fields
13   !!----------------------------------------------------------------------
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
19   USE trcwri_pisces
20   USE trcwri_cfc
21   USE trcwri_c14b
22   USE trcwri_age
23   USE trcwri_my_trc
24
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC trc_wri     
29
30   !! * Substitutions
31#  include "top_substitute.h90"
32
33CONTAINS
34
35   SUBROUTINE trc_wri( kt )
36      !!---------------------------------------------------------------------
37      !!                     ***  ROUTINE trc_wri  ***
38      !!
39      !! ** Purpose :   output passive tracers fields and dynamical trends
40      !!---------------------------------------------------------------------
41      INTEGER, INTENT( in )     :: kt
42      !
43      INTEGER                   :: jn
44      CHARACTER (len=20)        :: cltra
45      CHARACTER (len=40)        :: clhstnam
46      INTEGER ::   inum = 11            ! temporary logical unit
47      !!---------------------------------------------------------------------
48      !
49      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
50      !
51      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
52         CALL dia_nam( clhstnam, nn_writetrc,' ' )
53         CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
54         WRITE(inum,*) clhstnam
55         CLOSE(inum)
56      ENDIF
57      ! write the tracer concentrations in the file
58      ! ---------------------------------------
59      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES
60      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
61      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14
62      IF( lk_age     )   CALL trc_wri_age        ! AGE tracer
63      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
64      !
65      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
66      !
67   END SUBROUTINE trc_wri
68
69#else
70   !!----------------------------------------------------------------------
71   !!  Dummy module :                                     No passive tracer
72   !!----------------------------------------------------------------------
73   PUBLIC trc_wri
74CONTAINS
75   SUBROUTINE trc_wri( kt )                     ! Empty routine   
76   INTEGER, INTENT(in) :: kt
77   END SUBROUTINE trc_wri
78#endif
79
80   !!----------------------------------------------------------------------
81   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
82   !! $Id$
83   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
84   !!======================================================================
85END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.