1 | MODULE trcwri |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcwri *** |
---|
4 | !! TOP : Output of passive tracers |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2009-05 (C. Ethe) Original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | #if defined key_top && defined key_iomput |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! 'key_top' TOP models |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! trc_wri_trc : outputs of concentration fields |
---|
13 | !!---------------------------------------------------------------------- |
---|
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 |
---|
19 | |
---|
20 | IMPLICIT NONE |
---|
21 | PRIVATE |
---|
22 | |
---|
23 | PUBLIC trc_wri |
---|
24 | |
---|
25 | !! * Substitutions |
---|
26 | # include "top_substitute.h90" |
---|
27 | |
---|
28 | CONTAINS |
---|
29 | |
---|
30 | SUBROUTINE trc_wri( kt ) |
---|
31 | !!--------------------------------------------------------------------- |
---|
32 | !! *** ROUTINE trc_wri *** |
---|
33 | !! |
---|
34 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
35 | !!--------------------------------------------------------------------- |
---|
36 | INTEGER, INTENT( in ) :: kt |
---|
37 | !!--------------------------------------------------------------------- |
---|
38 | ! |
---|
39 | IF( nn_timing == 1 ) CALL timing_start('trc_wri') |
---|
40 | ! |
---|
41 | CALL iom_setkt ( kt + nn_dttrc - 1 ) ! set the passive tracer time step |
---|
42 | CALL trc_wri_trc( kt ) ! outputs for tracer concentration |
---|
43 | CALL iom_setkt ( kt ) ! set the model time step |
---|
44 | ! |
---|
45 | IF( nn_timing == 1 ) CALL timing_stop('trc_wri') |
---|
46 | ! |
---|
47 | END SUBROUTINE trc_wri |
---|
48 | |
---|
49 | SUBROUTINE trc_wri_trc( kt ) |
---|
50 | !!--------------------------------------------------------------------- |
---|
51 | !! *** ROUTINE trc_wri_trc *** |
---|
52 | !! |
---|
53 | !! ** Purpose : output passive tracers fields |
---|
54 | !!--------------------------------------------------------------------- |
---|
55 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
56 | INTEGER :: jn |
---|
57 | CHARACTER (len=20) :: cltra |
---|
58 | CHARACTER (len=40) :: clhstnam |
---|
59 | INTEGER :: inum = 11 ! temporary logical unit |
---|
60 | !!--------------------------------------------------------------------- |
---|
61 | |
---|
62 | IF( lk_offline .AND. kt == nittrc000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro |
---|
63 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
64 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
65 | WRITE(inum,*) clhstnam |
---|
66 | CLOSE(inum) |
---|
67 | ENDIF |
---|
68 | ! write the tracer concentrations in the file |
---|
69 | ! --------------------------------------- |
---|
70 | DO jn = 1, jptra |
---|
71 | cltra = TRIM( ctrcnm(jn) ) ! short title for tracer |
---|
72 | CALL iom_put( cltra, trn(:,:,:,jn) ) |
---|
73 | END DO |
---|
74 | ! |
---|
75 | END SUBROUTINE trc_wri_trc |
---|
76 | |
---|
77 | #else |
---|
78 | !!---------------------------------------------------------------------- |
---|
79 | !! Dummy module : No passive tracer |
---|
80 | !!---------------------------------------------------------------------- |
---|
81 | PUBLIC trc_wri |
---|
82 | CONTAINS |
---|
83 | SUBROUTINE trc_wri( kt ) ! Empty routine |
---|
84 | INTEGER, INTENT(in) :: kt |
---|
85 | END SUBROUTINE trc_wri |
---|
86 | #endif |
---|
87 | |
---|
88 | !!---------------------------------------------------------------------- |
---|
89 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
90 | !! $Id$ |
---|
91 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
92 | !!====================================================================== |
---|
93 | END MODULE trcwri |
---|