Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
MODULE trcwri
!!======================================================================
!! *** MODULE trcwri ***
!! TOP : Output of passive tracers
!!======================================================================
!! History : 1.0 ! 2009-05 (C. Ethe) Original code
!!----------------------------------------------------------------------
#if defined key_top && defined key_xios
!!----------------------------------------------------------------------
!! 'key_top' TOP models
!!----------------------------------------------------------------------
!! trc_wri_trc : outputs of concentration fields
!!----------------------------------------------------------------------
USE dom_oce ! ocean space and time domain variables
USE oce_trc ! shared variables between ocean and passive tracers
USE trc ! passive tracers common variables
USE iom ! I/O manager
USE dianam ! Output file name
USE trcwri_pisces
USE trcwri_cfc
USE trcwri_c14
USE trcwri_age
USE trcwri_my_trc
IMPLICIT NONE
PRIVATE
PUBLIC trc_wri
!! * Substitutions
# include "do_loop_substitute.h90"
# include "domzgr_substitute.h90"
CONTAINS
SUBROUTINE trc_wri( kt, Kmm )
!!---------------------------------------------------------------------
!! *** ROUTINE trc_wri ***
!!
!! ** Purpose : output passive tracers fields and dynamical trends
!!---------------------------------------------------------------------
INTEGER, INTENT( in ) :: kt
INTEGER, INTENT( in ) :: Kmm ! time level indices
!
CHARACTER (len=20) :: cltra
CHARACTER (len=40) :: clhstnam
INTEGER :: inum = 11 ! temporary logical unit
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z3d ! 3D workspace
!!----------------------------------------------------------------------
!
IF( ln_timing ) CALL timing_start('trc_wri')
!
IF( l_offline ) THEN ! WRITE root name in date.file for use by postpro
IF( kt == nittrc000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro
CALL dia_nam( clhstnam, nn_writetrc,' ' )
CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
WRITE(inum,*) clhstnam
CLOSE(inum)
ENDIF
ALLOCATE( z3d(jpi,jpj,jpk) ) ; z3d(:,:,:) = 0._wp
! Output of initial vertical scale factor
CALL iom_put( "e3t_0", e3t_0(:,:,:) )
CALL iom_put( "e3u_0", e3u_0(:,:,:) )
CALL iom_put( "e3v_0", e3v_0(:,:,:) )
!
IF( .NOT.ln_linssh ) CALL iom_put( "ssh" , ssh(:,:,Kmm) ) ! sea surface height
!
! --- vertical scale factors --- !
IF( iom_use("e3t") ) THEN ! time-varying e3t
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = e3t(ji,jj,jk,Kmm)
END_3D
CALL iom_put( "e3t", z3d )
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = e3u(ji,jj,jk,Kmm)
END_3D
CALL iom_put( "e3u" , z3d )
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = e3v(ji,jj,jk,Kmm)
END_3D
CALL iom_put( "e3v" , z3d )
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
ENDIF
!
! write the tracer concentrations in the file
! ---------------------------------------
IF( ln_pisces ) CALL trc_wri_pisces( Kmm ) ! PISCES
IF( ll_cfc ) CALL trc_wri_cfc ( Kmm ) ! surface fluxes of CFC
IF( ln_c14 ) CALL trc_wri_c14 ( Kmm ) ! surface fluxes of C14
IF( ln_age ) CALL trc_wri_age ( Kmm ) ! AGE tracer
IF( ln_my_trc ) CALL trc_wri_my_trc( Kmm ) ! MY_TRC tracers
!
IF( ln_timing ) CALL timing_stop('trc_wri')
!
END SUBROUTINE trc_wri
#else
!!----------------------------------------------------------------------
!! Dummy module : No passive tracer
!!----------------------------------------------------------------------
PUBLIC trc_wri
CONTAINS
SUBROUTINE trc_wri( kt, Kmm ) ! Empty routine
INTEGER, INTENT(in) :: kt
INTEGER, INTENT(in) :: Kmm ! time level indices
END SUBROUTINE trc_wri
#endif
!!----------------------------------------------------------------------
!! NEMO/TOP 4.0 , NEMO Consortium (2018)
!! $Id: trcwri.F90 14255 2021-01-04 11:35:00Z cetlod $
!! Software governed by the CeCILL license (see ./LICENSE)
!!======================================================================
END MODULE trcwri