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

source: branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcwri.F90 @ 5841

Last change on this file since 5841 was 5841, checked in by jpalmier, 8 years ago

JPALM --30-10-2015-- Add MOCSY and DMS to MEDUSA-NEMO3.6

File size: 4.2 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_my_trc
24   USE trcwri_medusa
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC trc_wri     
30
31   !! * Substitutions
32#  include "top_substitute.h90"
33
34CONTAINS
35
36   SUBROUTINE trc_wri( kt )
37      !!---------------------------------------------------------------------
38      !!                     ***  ROUTINE trc_wri  ***
39      !!
40      !! ** Purpose :   output passive tracers fields and dynamical trends
41      !!---------------------------------------------------------------------
42      INTEGER, INTENT( in )     :: kt
43      !
44      INTEGER                   :: jn
45      CHARACTER (len=20)        :: cltra
46      CHARACTER (len=40)        :: clhstnam
47      INTEGER ::   inum = 11            ! temporary logical unit
48      !!---------------------------------------------------------------------
49      !
50      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
51      !
52      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
53         CALL dia_nam( clhstnam, nn_writetrc,' ' )
54         CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
55         WRITE(inum,*) clhstnam
56         CLOSE(inum)
57      ENDIF
58      ! write the tracer concentrations in the file
59      ! ---------------------------------------
60      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES
61      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
62      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14
63      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
64      !
65# if defined key_debug_medusa
66      CALL flush(numout)
67      IF (lwp) write (numout,*) '------------------------------'
68      IF (lwp) write (numout,*) 'Jpalm - debug'
69      IF (lwp) write (numout,*) 'Just before call trc_wri_medusa'
70      IF (lwp) write (numout,*) ' '
71      CALL flush(numout)
72# endif
73      !
74      IF( lk_medusa  )   CALL trc_wri_medusa     ! MESDUSA
75      !
76# if defined key_debug_medusa
77      CALL flush(numout)
78      IF (lwp) write (numout,*) '------------------------------'
79      IF (lwp) write (numout,*) 'Jpalm - debug'
80      IF (lwp) write (numout,*) 'CALL trc_wri_medusa -- OK'
81      IF (lwp) write (numout,*) ' '
82      CALL flush(numout)
83# endif
84      !
85      !!! JPALM
86      !!! don't forget to add idtra
87      !
88      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
89      !
90   END SUBROUTINE trc_wri
91
92#else
93   !!----------------------------------------------------------------------
94   !!  Dummy module :                                     No passive tracer
95   !!----------------------------------------------------------------------
96   PUBLIC trc_wri
97CONTAINS
98   SUBROUTINE trc_wri( kt )                     ! Empty routine   
99   INTEGER, INTENT(in) :: kt
100   END SUBROUTINE trc_wri
101#endif
102
103   !!----------------------------------------------------------------------
104   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
105   !! $Id$
106   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
107   !!======================================================================
108END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.