1 | MODULE trcini |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcini *** |
---|
4 | !! TOP : Manage the passive tracer initialization |
---|
5 | !!====================================================================== |
---|
6 | !! History : - ! 1991-03 () original code |
---|
7 | !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 |
---|
8 | !! - ! 2005-10 (C. Ethe) print control |
---|
9 | !! 2.0 ! 2005-10 (C. Ethe, G. Madec) revised architecture |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | #if defined key_top |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! 'key_top' TOP models |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! trc_ini : Initialization for passive tracer |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | USE oce_trc |
---|
19 | USE trc |
---|
20 | USE trcrst |
---|
21 | USE trcctl |
---|
22 | USE trclec |
---|
23 | USE trcini_cfc ! CFC initialisation |
---|
24 | USE trcini_lobster ! LOBSTER initialisation |
---|
25 | USE trcini_pisces ! PISCES initialisation |
---|
26 | USE trcini_c14b ! C14 bomb initialisation |
---|
27 | USE trcini_my_trc ! MY_TRC initialisation |
---|
28 | USE trcdta ! |
---|
29 | USE trdmld_trc_oce |
---|
30 | USE trdmld_trc |
---|
31 | |
---|
32 | USE in_out_manager ! I/O manager |
---|
33 | USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) |
---|
34 | USE lib_mpp ! distributed memory computing library |
---|
35 | |
---|
36 | IMPLICIT NONE |
---|
37 | PRIVATE |
---|
38 | |
---|
39 | PUBLIC trc_ini ! called by opa |
---|
40 | |
---|
41 | !! * Substitutions |
---|
42 | # include "domzgr_substitute.h90" |
---|
43 | !!---------------------------------------------------------------------- |
---|
44 | !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) |
---|
45 | !! $Id$ |
---|
46 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
47 | !!---------------------------------------------------------------------- |
---|
48 | |
---|
49 | CONTAINS |
---|
50 | |
---|
51 | SUBROUTINE trc_ini |
---|
52 | !!--------------------------------------------------------------------- |
---|
53 | !! *** ROUTINE trc_ini *** |
---|
54 | !! |
---|
55 | !! ** Purpose : Initialization of the passive tracer fields |
---|
56 | !! |
---|
57 | !! ** Method : - read namelist |
---|
58 | !! - control the consistancy |
---|
59 | !! - compute specific initialisations |
---|
60 | !! - set initial tracer fields (either read restart |
---|
61 | !! or read data or analytical formulation |
---|
62 | !!--------------------------------------------------------------------- |
---|
63 | INTEGER :: jk, jn ! dummy loop indices |
---|
64 | CHARACTER (len=25) :: charout |
---|
65 | |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | |
---|
68 | IF(lwp) WRITE(numout,*) |
---|
69 | IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the passive tracers' |
---|
70 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
71 | |
---|
72 | ! ! masked grid volume |
---|
73 | DO jk = 1, jpk |
---|
74 | cvol(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) |
---|
75 | END DO |
---|
76 | |
---|
77 | ! total volume of the ocean |
---|
78 | #if ! defined key_off_degrad |
---|
79 | areatot = SUM( cvol(:,:,:) ) |
---|
80 | #else |
---|
81 | areatot = SUM( cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol |
---|
82 | #endif |
---|
83 | IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain |
---|
84 | |
---|
85 | CALL trc_lec ! READ passive tracers namelists |
---|
86 | |
---|
87 | CALL trc_ctl ! control consistency between parameters, cpp key |
---|
88 | |
---|
89 | IF( lk_lobster ) THEN ; CALL trc_ini_lobster ! LOBSTER bio-model |
---|
90 | ELSE ; IF(lwp) WRITE(numout,*) ' LOBSTER not used' |
---|
91 | ENDIF |
---|
92 | |
---|
93 | IF( lk_pisces ) THEN ; CALL trc_ini_pisces ! PISCES bio-model |
---|
94 | ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' |
---|
95 | ENDIF |
---|
96 | |
---|
97 | IF( lk_cfc ) THEN ; CALL trc_ini_cfc ! CFC tracers |
---|
98 | ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' |
---|
99 | ENDIF |
---|
100 | |
---|
101 | IF( lk_c14b ) THEN ; CALL trc_ini_c14b ! C14 bomb tracer |
---|
102 | ELSE ; IF(lwp) WRITE(numout,*) ' C14 not used' |
---|
103 | ENDIF |
---|
104 | |
---|
105 | IF( lk_my_trc ) THEN ; CALL trc_ini_my_trc ! MY_TRC tracers |
---|
106 | ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' |
---|
107 | ENDIF |
---|
108 | |
---|
109 | IF( .NOT. lrsttr ) THEN |
---|
110 | |
---|
111 | # if defined key_dtatrc |
---|
112 | ! Initialization of tracer from a file that may also be used for damping |
---|
113 | CALL trc_dta( nittrc000 ) |
---|
114 | DO jn = 1, jptra |
---|
115 | IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required |
---|
116 | END DO |
---|
117 | # endif |
---|
118 | trb(:,:,:,:) = trn(:,:,:,:) |
---|
119 | |
---|
120 | ELSE |
---|
121 | |
---|
122 | CALL trc_rst_read ! restart from a file |
---|
123 | |
---|
124 | ENDIF |
---|
125 | |
---|
126 | IF( lk_trdmld_trc ) CALL trd_mld_trc_init ! trends: Mixed-layer |
---|
127 | |
---|
128 | ! ! Computation content of all tracers |
---|
129 | trai = 0.e0 |
---|
130 | DO jn = 1, jptra |
---|
131 | #if ! defined key_off_degrad |
---|
132 | trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) ) |
---|
133 | #else |
---|
134 | trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol |
---|
135 | #endif |
---|
136 | END DO |
---|
137 | IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain |
---|
138 | |
---|
139 | |
---|
140 | ! ! control print |
---|
141 | IF(lwp) WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra |
---|
142 | IF(lwp) WRITE(numout,*) ' *** Total volume of ocean = ', areatot |
---|
143 | IF(lwp) WRITE(numout,*) ' *** Total inital content of all tracers = ', trai |
---|
144 | IF(lwp) WRITE(numout,*) |
---|
145 | |
---|
146 | IF( ln_ctl ) CALL prt_ctl_trc_init ! control print |
---|
147 | ! |
---|
148 | |
---|
149 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
150 | WRITE(charout, FMT="('ini ')") |
---|
151 | CALL prt_ctl_trc_info( charout ) |
---|
152 | CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) |
---|
153 | ENDIF |
---|
154 | |
---|
155 | END SUBROUTINE trc_ini |
---|
156 | |
---|
157 | #else |
---|
158 | !!---------------------------------------------------------------------- |
---|
159 | !! Empty module : No passive tracer |
---|
160 | !!---------------------------------------------------------------------- |
---|
161 | CONTAINS |
---|
162 | SUBROUTINE trc_ini ! Dummy routine |
---|
163 | END SUBROUTINE trc_ini |
---|
164 | #endif |
---|
165 | |
---|
166 | !!====================================================================== |
---|
167 | END MODULE trcini |
---|