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 | CONTAINS |
---|
32 | |
---|
33 | SUBROUTINE trc_wri( kt ) |
---|
34 | !!--------------------------------------------------------------------- |
---|
35 | !! *** ROUTINE trc_wri *** |
---|
36 | !! |
---|
37 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
38 | !!--------------------------------------------------------------------- |
---|
39 | INTEGER, INTENT( in ) :: kt |
---|
40 | !!--------------------------------------------------------------------- |
---|
41 | |
---|
42 | ! |
---|
43 | CALL iom_setkt ( kt + nn_dttrc - 1 ) ! set the passive tracer time step |
---|
44 | CALL trc_wri_trc( kt ) ! outputs for tracer concentration |
---|
45 | CALL iom_setkt ( kt ) ! set the model time step |
---|
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 | #if defined key_offline |
---|
59 | CHARACTER (len=40) :: clhstnam |
---|
60 | INTEGER :: inum = 11 ! temporary logical unit |
---|
61 | #endif |
---|
62 | !!--------------------------------------------------------------------- |
---|
63 | |
---|
64 | #if defined key_offline |
---|
65 | IF( kt == nit000 ) THEN |
---|
66 | ! WRITE root name in date.file for use by postpro |
---|
67 | IF(lwp) THEN |
---|
68 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
69 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
70 | WRITE(inum,*) clhstnam |
---|
71 | CLOSE(inum) |
---|
72 | ENDIF |
---|
73 | ENDIF |
---|
74 | #endif |
---|
75 | ! write the tracer concentrations in the file |
---|
76 | ! --------------------------------------- |
---|
77 | DO jn = 1, jptra |
---|
78 | cltra = ctrcnm(jn) ! short title for tracer |
---|
79 | CALL iom_put( cltra, trn(:,:,:,jn) ) |
---|
80 | END DO |
---|
81 | ! |
---|
82 | END SUBROUTINE trc_wri_trc |
---|
83 | |
---|
84 | #else |
---|
85 | !!---------------------------------------------------------------------- |
---|
86 | !! Dummy module : No passive tracer |
---|
87 | !!---------------------------------------------------------------------- |
---|
88 | PUBLIC trc_wri |
---|
89 | CONTAINS |
---|
90 | SUBROUTINE trc_wri( kt ) ! Empty routine |
---|
91 | INTEGER, INTENT(in) :: kt |
---|
92 | END SUBROUTINE trc_wri |
---|
93 | #endif |
---|
94 | |
---|
95 | !!---------------------------------------------------------------------- |
---|
96 | !! NEMO/TOP 3.3 , LOCEAN-IPSL (2010) |
---|
97 | !! $Id: $ |
---|
98 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
99 | !!====================================================================== |
---|
100 | END MODULE trcwri |
---|