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

Last change on this file since 5726 was 5726, checked in by jpalmier, 9 years ago

JPALM -- 10-09-2015 -- add MEDUSA in the branch ; adapted TOP_SRC to MEDUSA ; remove some svn keywords in the branch

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