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

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

JPALM -- 14-12-2015 -- idtra debugg

File size: 4.5 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
[5841]7   !!              -   !  2014-06 (A. Yool, J. Palmieri) adding MEDUSA-2
[1457]8   !!----------------------------------------------------------------------
[3294]9#if defined key_top && defined key_iomput
[1457]10   !!----------------------------------------------------------------------
[3294]11   !!   'key_top'                                           TOP models
[1457]12   !!----------------------------------------------------------------------
[1836]13   !! trc_wri_trc   :  outputs of concentration fields
[1457]14   !!----------------------------------------------------------------------
[3294]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
[3295]20   USE trcwri_pisces
[3680]21   USE trcwri_cfc
22   USE trcwri_c14b
23   USE trcwri_my_trc
[5726]24   USE trcwri_medusa
[6047]25   USE trcwri_idtra
[1457]26
27   IMPLICIT NONE
28   PRIVATE
29
30   PUBLIC trc_wri     
31
32   !! * Substitutions
33#  include "top_substitute.h90"
34
35CONTAINS
36
[1836]37   SUBROUTINE trc_wri( kt )
[1457]38      !!---------------------------------------------------------------------
39      !!                     ***  ROUTINE trc_wri  ***
[1836]40      !!
41      !! ** Purpose :   output passive tracers fields and dynamical trends
42      !!---------------------------------------------------------------------
[3750]43      INTEGER, INTENT( in )     :: kt
[1836]44      !
[3294]45      INTEGER                   :: jn
46      CHARACTER (len=20)        :: cltra
47      CHARACTER (len=40)        :: clhstnam
[1656]48      INTEGER ::   inum = 11            ! temporary logical unit
[1457]49      !!---------------------------------------------------------------------
[3750]50      !
51      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
52      !
[3294]53      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
[2528]54         CALL dia_nam( clhstnam, nn_writetrc,' ' )
55         CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
56         WRITE(inum,*) clhstnam
57         CLOSE(inum)
[1656]58      ENDIF
[1457]59      ! write the tracer concentrations in the file
60      ! ---------------------------------------
[3680]61      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES
[5841]62      IF( lk_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
63      IF( lk_c14b    )   CALL trc_wri_c14b       ! surface fluxes of C14
64      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
[5726]65      !
66# if defined key_debug_medusa
67      CALL flush(numout)
68      IF (lwp) write (numout,*) '------------------------------'
69      IF (lwp) write (numout,*) 'Jpalm - debug'
70      IF (lwp) write (numout,*) 'Just before call trc_wri_medusa'
71      IF (lwp) write (numout,*) ' '
72      CALL flush(numout)
73# endif
74      !
75      IF( lk_medusa  )   CALL trc_wri_medusa     ! MESDUSA
76      !
77# if defined key_debug_medusa
78      CALL flush(numout)
79      IF (lwp) write (numout,*) '------------------------------'
80      IF (lwp) write (numout,*) 'Jpalm - debug'
81      IF (lwp) write (numout,*) 'CALL trc_wri_medusa -- OK'
82      IF (lwp) write (numout,*) ' '
83      CALL flush(numout)
84# endif
85      !
[6046]86      IF( lk_idtra   )   CALL trc_wri_idtra       ! Idealize tracers
[1457]87      !
[6046]88# if defined key_debug_medusa
89      CALL flush(numout)
90      IF (lwp) write (numout,*) '------------------------------'
91      IF (lwp) write (numout,*) 'Jpalm - debug'
92      IF (lwp) write (numout,*) 'CALL trc_wri_idtra -- OK'
93      IF (lwp) write (numout,*) ' '
94      CALL flush(numout)
95# endif
96      !
[3750]97      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
98      !
99   END SUBROUTINE trc_wri
[1457]100
101#else
102   !!----------------------------------------------------------------------
103   !!  Dummy module :                                     No passive tracer
104   !!----------------------------------------------------------------------
105   PUBLIC trc_wri
106CONTAINS
107   SUBROUTINE trc_wri( kt )                     ! Empty routine   
108   INTEGER, INTENT(in) :: kt
109   END SUBROUTINE trc_wri
110#endif
111
[2528]112   !!----------------------------------------------------------------------
113   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
[5726]114   !! $Id$
[2528]115   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[1457]116   !!======================================================================
117END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.