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

source: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcwri.F90

Last change on this file 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
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
[8280]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
[8442]23   USE trcwri_age
[3680]24   USE trcwri_my_trc
[8442]25   USE trcwri_idtra
[8280]26   USE trcwri_medusa
[1457]27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC trc_wri     
32
33   !! * Substitutions
34#  include "top_substitute.h90"
35
36CONTAINS
37
[1836]38   SUBROUTINE trc_wri( kt )
[1457]39      !!---------------------------------------------------------------------
40      !!                     ***  ROUTINE trc_wri  ***
[1836]41      !!
42      !! ** Purpose :   output passive tracers fields and dynamical trends
43      !!---------------------------------------------------------------------
[3750]44      INTEGER, INTENT( in )     :: kt
[1836]45      !
[3294]46      INTEGER                   :: jn
47      CHARACTER (len=20)        :: cltra
48      CHARACTER (len=40)        :: clhstnam
[1656]49      INTEGER ::   inum = 11            ! temporary logical unit
[1457]50      !!---------------------------------------------------------------------
[3750]51      !
52      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
53      !
[3294]54      IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
[2528]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)
[1656]59      ENDIF
[1457]60      ! write the tracer concentrations in the file
61      ! ---------------------------------------
[3680]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
[8280]65      IF( lk_age     )   CALL trc_wri_age        ! AGE tracer
[3680]66      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
[8442]67      IF( lk_idtra   )   CALL trc_wri_idtra       ! Idealize tracers
68      IF( lk_medusa  )   CALL trc_wri_medusa     ! MESDUSA
[1457]69      !
[3750]70      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
71      !
72   END SUBROUTINE trc_wri
[1457]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
[2528]85   !!----------------------------------------------------------------------
86   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
[6486]87   !! $Id$
[2528]88   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[1457]89   !!======================================================================
90END MODULE trcwri
Note: See TracBrowser for help on using the repository browser.