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

source: branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 4361

Last change on this file since 4361 was 2996, checked in by mlelod, 13 years ago

fix isopycnal diffusion issue and dynspg_ts bug. see ticket/863?

  • Property svn:keywords set to Id
File size: 3.8 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         IF( lk_vvl ) THEN
70            CALL iom_put( cltra, trn(:,:,:,jn) * fse3t_n(:,:,:) )
71         ELSE
72            CALL iom_put( cltra, trn(:,:,:,jn) )
73         END IF
74      END DO
75      !
76   END SUBROUTINE trc_wri_trc
77
78#else
79   !!----------------------------------------------------------------------
80   !!  Dummy module :                                     No passive tracer
81   !!----------------------------------------------------------------------
82   PUBLIC trc_wri
83CONTAINS
84   SUBROUTINE trc_wri( kt )                     ! Empty routine   
85   INTEGER, INTENT(in) :: kt
86   END SUBROUTINE trc_wri
87#endif
88
89   !!----------------------------------------------------------------------
90   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
91   !! $Id$
92   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
93   !!======================================================================
94END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.