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

source: trunk/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 2567

Last change on this file since 2567 was 2567, checked in by cetlod, 13 years ago

rename nwritedia to nn_writedia, see ticket #791

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