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/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/TOP_SRC – NEMO

source: branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 3653

Last change on this file since 3653 was 3653, checked in by cetlod, 11 years ago

commit the changes from LOCEAN & UKMO merge, see ticket #1021

  • Property svn:keywords set to Id
File size: 4.1 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_my_trc
23
24   IMPLICIT NONE
25   PRIVATE
26
27   PUBLIC trc_wri     
28
29   !! * Substitutions
30#  include "top_substitute.h90"
31
32CONTAINS
33
34   SUBROUTINE trc_wri( kt )
35      !!---------------------------------------------------------------------
36      !!                     ***  ROUTINE trc_wri  ***
37      !!
38      !! ** Purpose :   output passive tracers fields and dynamical trends
39      !!---------------------------------------------------------------------
40      INTEGER, INTENT( in ) :: kt
41      !!---------------------------------------------------------------------
42      !
43      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
44      !
45      CALL iom_setkt  ( kt + nn_dttrc - 1 )       ! set the passive tracer time step
46      CALL trc_wri_trc( kt              )       ! outputs for tracer concentration
47      CALL iom_setkt  ( kt              )       ! set the model time step
48      !
49      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
50      !
51   END SUBROUTINE trc_wri
52
53   SUBROUTINE trc_wri_trc( kt ) 
54      !!---------------------------------------------------------------------
55      !!                     ***  ROUTINE trc_wri_trc  ***
56      !!
57      !! ** Purpose :   output passive tracers fields
58      !!---------------------------------------------------------------------
59      INTEGER, INTENT( in )     :: kt       ! ocean time-step
60      INTEGER                   :: jn
61      CHARACTER (len=20)        :: cltra
62      CHARACTER (len=40)        :: clhstnam
63      INTEGER ::   inum = 11            ! temporary logical unit
64      !!---------------------------------------------------------------------
65 
66      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
67         CALL dia_nam( clhstnam, nn_writetrc,' ' )
68         CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
69         WRITE(inum,*) clhstnam
70         CLOSE(inum)
71      ENDIF
72      ! write the tracer concentrations in the file
73      ! ---------------------------------------
74      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES
75      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
76      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14
77      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
78      !
79   END SUBROUTINE trc_wri_trc
80
81#else
82   !!----------------------------------------------------------------------
83   !!  Dummy module :                                     No passive tracer
84   !!----------------------------------------------------------------------
85   PUBLIC trc_wri
86CONTAINS
87   SUBROUTINE trc_wri( kt )                     ! Empty routine   
88   INTEGER, INTENT(in) :: kt
89   END SUBROUTINE trc_wri
90#endif
91
92   !!----------------------------------------------------------------------
93   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
94   !! $Id$
95   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
96   !!======================================================================
97END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.