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 NEMO/trunk/src/TOP – NEMO

source: NEMO/trunk/src/TOP/trcwri.F90 @ 12280

Last change on this file since 12280 was 12280, checked in by cetlod, 4 years ago

bugfix in trunk : initialise local array in PISCES, see ticket #2357

  • 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'                                           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_c14
22   USE trcwri_age
23   USE trcwri_my_trc
24
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC trc_wri     
29
30CONTAINS
31
32   SUBROUTINE trc_wri( kt )
33      !!---------------------------------------------------------------------
34      !!                     ***  ROUTINE trc_wri  ***
35      !!
36      !! ** Purpose :   output passive tracers fields and dynamical trends
37      !!---------------------------------------------------------------------
38      INTEGER, INTENT( in )     :: kt
39      !
40      INTEGER                   :: jn
41      CHARACTER (len=20)        :: cltra
42      CHARACTER (len=40)        :: clhstnam
43      INTEGER ::   inum = 11            ! temporary logical unit
44      !!---------------------------------------------------------------------
45      !
46      IF( ln_timing )   CALL timing_start('trc_wri')
47      !
48      IF( l_offline ) THEN    ! WRITE root name in date.file for use by postpro
49         IF(  kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
50           CALL dia_nam( clhstnam, nn_writetrc,' ' )
51           CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
52           WRITE(inum,*) clhstnam
53           CLOSE(inum)
54        ENDIF
55        ! Output of initial vertical scale factor
56        CALL iom_put("e3t_0", e3t_0(:,:,:) )
57        CALL iom_put("e3u_0", e3u_0(:,:,:) )
58        CALL iom_put("e3v_0", e3v_0(:,:,:) )
59        !
60        CALL iom_put( "e3t" , e3t_n(:,:,:) )
61        CALL iom_put( "e3u" , e3u_n(:,:,:) )
62        CALL iom_put( "e3v" , e3v_n(:,:,:) )
63        !
64      ENDIF
65      ! write the tracer concentrations in the file
66      ! ---------------------------------------
67      IF( ln_pisces  )   CALL trc_wri_pisces     ! PISCES
68      IF( ll_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
69      IF( ln_c14     )   CALL trc_wri_c14        ! surface fluxes of C14
70      IF( ln_age     )   CALL trc_wri_age        ! AGE tracer
71      IF( ln_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
72      !
73      IF( ln_timing )   CALL timing_stop('trc_wri')
74      !
75   END SUBROUTINE trc_wri
76
77#else
78   !!----------------------------------------------------------------------
79   !!  Dummy module :                                     No passive tracer
80   !!----------------------------------------------------------------------
81   PUBLIC trc_wri
82CONTAINS
83   SUBROUTINE trc_wri( kt )                     ! Empty routine   
84   INTEGER, INTENT(in) :: kt
85   END SUBROUTINE trc_wri
86#endif
87
88   !!----------------------------------------------------------------------
89   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
90   !! $Id$
91   !! Software governed by the CeCILL license (see ./LICENSE)
92   !!======================================================================
93END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.