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 @ 3649

Last change on this file since 3649 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
RevLine 
[1457]1MODULE trcwri
[3294]2   !!======================================================================
[1457]3   !!                       *** MODULE trcwri ***
[1836]4   !!    TOP :   Output of passive tracers
[3294]5   !!======================================================================
[1836]6   !! History :   1.0  !  2009-05 (C. Ethe)  Original code
[1457]7   !!----------------------------------------------------------------------
[3294]8#if defined key_top && defined key_iomput
[1457]9   !!----------------------------------------------------------------------
[3294]10   !!   'key_top'                                           TOP models
[1457]11   !!----------------------------------------------------------------------
[1836]12   !! trc_wri_trc   :  outputs of concentration fields
[1457]13   !!----------------------------------------------------------------------
[3294]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
[3295]19   USE trcwri_pisces
[1457]20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC trc_wri     
25
26   !! * Substitutions
27#  include "top_substitute.h90"
28
29CONTAINS
30
[1836]31   SUBROUTINE trc_wri( kt )
[1457]32      !!---------------------------------------------------------------------
33      !!                     ***  ROUTINE trc_wri  ***
[1836]34      !!
35      !! ** Purpose :   output passive tracers fields and dynamical trends
36      !!---------------------------------------------------------------------
37      INTEGER, INTENT( in ) :: kt
38      !!---------------------------------------------------------------------
39      !
[3294]40      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
41      !
[2528]42      CALL iom_setkt  ( kt + nn_dttrc - 1 )       ! set the passive tracer time step
[1836]43      CALL trc_wri_trc( kt              )       ! outputs for tracer concentration
44      CALL iom_setkt  ( kt              )       ! set the model time step
45      !
[3294]46      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
47      !
[1836]48   END SUBROUTINE trc_wri
49
50   SUBROUTINE trc_wri_trc( kt ) 
51      !!---------------------------------------------------------------------
52      !!                     ***  ROUTINE trc_wri_trc  ***
[1457]53      !!
54      !! ** Purpose :   output passive tracers fields
55      !!---------------------------------------------------------------------
[3294]56      INTEGER, INTENT( in )     :: kt       ! ocean time-step
57      INTEGER                   :: jn
58      CHARACTER (len=20)        :: cltra
59      CHARACTER (len=40)        :: clhstnam
[1656]60      INTEGER ::   inum = 11            ! temporary logical unit
[1457]61      !!---------------------------------------------------------------------
62 
[3294]63      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
[2528]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)
[1656]68      ENDIF
[1457]69      ! write the tracer concentrations in the file
70      ! ---------------------------------------
[3295]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
[1457]79      !
[1836]80   END SUBROUTINE trc_wri_trc
[1457]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
[2528]93   !!----------------------------------------------------------------------
94   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
95   !! $Id$
96   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[1457]97   !!======================================================================
98END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.