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

source: branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 9377

Last change on this file since 9377 was 8442, checked in by frrh, 7 years ago

Commit changes relating to Met Office GMED ticket 340 for the
tidying of MEDUSA related code and debugging statements in the TOP code.

Only code introduced at revision 8434 of branch
http://fcm3/projects/NEMO.xm/log/branches/NERC/dev_r5518_GO6_split_trcbiomedusa
is included here, all previous revisions of that branch having been dealt with
under GMED ticket 339.

File size: 3.7 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   !!              -   !  2014-06 (A. Yool, J. Palmieri) adding MEDUSA-2
8   !!----------------------------------------------------------------------
9#if defined key_top && defined key_iomput
10   !!----------------------------------------------------------------------
11   !!   'key_top'                                           TOP models
12   !!----------------------------------------------------------------------
13   !! trc_wri_trc   :  outputs of concentration fields
14   !!----------------------------------------------------------------------
15   USE dom_oce     ! ocean space and time domain variables
16   USE oce_trc     ! shared variables between ocean and passive tracers
17   USE trc         ! passive tracers common variables
18   USE iom         ! I/O manager
19   USE dianam      ! Output file name
20   USE trcwri_pisces
21   USE trcwri_cfc
22   USE trcwri_c14b
23   USE trcwri_age
24   USE trcwri_my_trc
25   USE trcwri_idtra
26   USE trcwri_medusa
27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC trc_wri     
32
33   !! * Substitutions
34#  include "top_substitute.h90"
35
36CONTAINS
37
38   SUBROUTINE trc_wri( kt )
39      !!---------------------------------------------------------------------
40      !!                     ***  ROUTINE trc_wri  ***
41      !!
42      !! ** Purpose :   output passive tracers fields and dynamical trends
43      !!---------------------------------------------------------------------
44      INTEGER, INTENT( in )     :: kt
45      !
46      INTEGER                   :: jn
47      CHARACTER (len=20)        :: cltra
48      CHARACTER (len=40)        :: clhstnam
49      INTEGER ::   inum = 11            ! temporary logical unit
50      !!---------------------------------------------------------------------
51      !
52      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
53      !
54      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
55         CALL dia_nam( clhstnam, nn_writetrc,' ' )
56         CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
57         WRITE(inum,*) clhstnam
58         CLOSE(inum)
59      ENDIF
60      ! write the tracer concentrations in the file
61      ! ---------------------------------------
62      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES
63      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
64      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14
65      IF( lk_age     )   CALL trc_wri_age        ! AGE tracer
66      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
67      IF( lk_idtra   )   CALL trc_wri_idtra       ! Idealize tracers
68      IF( lk_medusa  )   CALL trc_wri_medusa     ! MESDUSA
69      !
70      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
71      !
72   END SUBROUTINE trc_wri
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.