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' && 'key_iomput' 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 |
---|
16 | USE trc |
---|
17 | USE iom |
---|
18 | #if defined key_offline |
---|
19 | USE oce_trc |
---|
20 | USE dianam |
---|
21 | #endif |
---|
22 | |
---|
23 | IMPLICIT NONE |
---|
24 | PRIVATE |
---|
25 | |
---|
26 | PUBLIC trc_wri |
---|
27 | |
---|
28 | !! * Substitutions |
---|
29 | # include "top_substitute.h90" |
---|
30 | !!---------------------------------------------------------------------- |
---|
31 | !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) |
---|
32 | !! $Id: trcdia.F90 1450 2009-05-15 14:12:12Z cetlod $ |
---|
33 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | |
---|
36 | CONTAINS |
---|
37 | |
---|
38 | SUBROUTINE trc_wri( kt ) |
---|
39 | !!--------------------------------------------------------------------- |
---|
40 | !! *** ROUTINE trc_wri *** |
---|
41 | !! |
---|
42 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
43 | !!--------------------------------------------------------------------- |
---|
44 | INTEGER, INTENT( in ) :: kt |
---|
45 | !!--------------------------------------------------------------------- |
---|
46 | |
---|
47 | ! |
---|
48 | CALL iom_setkt ( kt + nn_dttrc - 1 ) ! set the passive tracer time step |
---|
49 | CALL trc_wri_trc( kt ) ! outputs for tracer concentration |
---|
50 | CALL iom_setkt ( kt ) ! set the model time step |
---|
51 | ! |
---|
52 | END SUBROUTINE trc_wri |
---|
53 | |
---|
54 | SUBROUTINE trc_wri_trc( kt ) |
---|
55 | !!--------------------------------------------------------------------- |
---|
56 | !! *** ROUTINE trc_wri_trc *** |
---|
57 | !! |
---|
58 | !! ** Purpose : output passive tracers fields |
---|
59 | !!--------------------------------------------------------------------- |
---|
60 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
61 | INTEGER :: jn |
---|
62 | CHARACTER (len=20) :: cltra |
---|
63 | #if defined key_offline |
---|
64 | CHARACTER (len=40) :: clhstnam |
---|
65 | INTEGER :: inum = 11 ! temporary logical unit |
---|
66 | #endif |
---|
67 | !!--------------------------------------------------------------------- |
---|
68 | |
---|
69 | #if defined key_offline |
---|
70 | IF( kt == nittrc000 ) THEN |
---|
71 | ! WRITE root name in date.file for use by postpro |
---|
72 | IF(lwp) THEN |
---|
73 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
74 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
75 | WRITE(inum,*) clhstnam |
---|
76 | CLOSE(inum) |
---|
77 | ENDIF |
---|
78 | ENDIF |
---|
79 | #endif |
---|
80 | ! write the tracer concentrations in the file |
---|
81 | ! --------------------------------------- |
---|
82 | DO jn = 1, jptra |
---|
83 | cltra = ctrcnm(jn) ! short title for tracer |
---|
84 | CALL iom_put( cltra, trn(:,:,:,jn) ) |
---|
85 | END DO |
---|
86 | ! |
---|
87 | END SUBROUTINE trc_wri_trc |
---|
88 | |
---|
89 | #else |
---|
90 | !!---------------------------------------------------------------------- |
---|
91 | !! Dummy module : No passive tracer |
---|
92 | !!---------------------------------------------------------------------- |
---|
93 | PUBLIC trc_wri |
---|
94 | CONTAINS |
---|
95 | SUBROUTINE trc_wri( kt ) ! Empty routine |
---|
96 | INTEGER, INTENT(in) :: kt |
---|
97 | END SUBROUTINE trc_wri |
---|
98 | #endif |
---|
99 | |
---|
100 | !!====================================================================== |
---|
101 | END MODULE trcwri |
---|