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

source: branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 3677

Last change on this file since 3677 was 3295, checked in by cetlod, 12 years ago

trunk:A few additional diagnostics added in PISCES

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