1 | MODULE trcnam |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcnam *** |
---|
4 | !! TOP : Read and print options for the passive tracer run (namelist) |
---|
5 | !!====================================================================== |
---|
6 | !! History : - ! 1996-11 (M.A. Foujols, M. Levy) original code |
---|
7 | !! - ! 1998-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal mixing |
---|
8 | !! - ! 1999-10 (M.A. Foujols, M. Levy) separation of sms |
---|
9 | !! - ! 2000-07 (A. Estublier) add TVD and MUSCL : Tests on ndttrc |
---|
10 | !! - ! 2000-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0 |
---|
11 | !! - ! 2001-01 (E Kestenare) suppress ndttrc=1 for CEN2 and TVD schemes |
---|
12 | !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | #if defined key_top |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! 'key_top' TOP models |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | !! trc_nam : Read and print options for the passive tracer run (namelist) |
---|
19 | !!---------------------------------------------------------------------- |
---|
20 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
21 | USE trc ! passive tracers common variables |
---|
22 | USE trcnam_trp ! Transport namelist |
---|
23 | USE trcnam_pisces ! PISCES namelist |
---|
24 | USE trcnam_cfc ! CFC SMS namelist |
---|
25 | USE trcnam_c14b ! C14 SMS namelist |
---|
26 | USE trcnam_my_trc ! MY_TRC SMS namelist |
---|
27 | ! +++>>> FABM |
---|
28 | USE trcnam_fabm ! FABM SMS namelist |
---|
29 | ! FABM <<<+++ |
---|
30 | USE trd_oce |
---|
31 | USE trdtrc_oce |
---|
32 | USE iom ! I/O manager |
---|
33 | |
---|
34 | IMPLICIT NONE |
---|
35 | PRIVATE |
---|
36 | |
---|
37 | PUBLIC trc_nam_run ! called in trcini |
---|
38 | PUBLIC trc_nam ! called in trcini |
---|
39 | PUBLIC trc_nam_dia |
---|
40 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
41 | NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & |
---|
42 | & ln_trdmxl_trc_restart, ln_trdmxl_trc_instant, & |
---|
43 | & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc |
---|
44 | #endif |
---|
45 | |
---|
46 | !! * Substitutions |
---|
47 | # include "top_substitute.h90" |
---|
48 | !!---------------------------------------------------------------------- |
---|
49 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
50 | !! $Id$ |
---|
51 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
52 | !!---------------------------------------------------------------------- |
---|
53 | |
---|
54 | CONTAINS |
---|
55 | |
---|
56 | |
---|
57 | SUBROUTINE trc_nam |
---|
58 | !!--------------------------------------------------------------------- |
---|
59 | !! *** ROUTINE trc_nam *** |
---|
60 | !! |
---|
61 | !! ** Purpose : READ and PRINT options for the passive tracer run (namelist) |
---|
62 | !! |
---|
63 | !! ** Method : - read passive tracer namelist |
---|
64 | !! - read namelist of each defined SMS model |
---|
65 | !! ( (PISCES, CFC, MY_TRC ) |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | INTEGER :: jn ! dummy loop indice |
---|
68 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
69 | INTEGER :: ios |
---|
70 | #endif |
---|
71 | |
---|
72 | ! ! Parameters of the run |
---|
73 | IF( .NOT. lk_offline ) CALL trc_nam_run |
---|
74 | |
---|
75 | ! ! passive tracer informations |
---|
76 | CALL trc_nam_trc |
---|
77 | |
---|
78 | ! ! Parameters of additional diagnostics |
---|
79 | CALL trc_nam_dia |
---|
80 | |
---|
81 | ! ! namelist of transport |
---|
82 | CALL trc_nam_trp |
---|
83 | |
---|
84 | |
---|
85 | IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data |
---|
86 | ! |
---|
87 | IF( ln_trcdmp .OR. ln_trcdmp_clo ) ln_trcdta = .TRUE. ! damping : need to have clim data |
---|
88 | ! |
---|
89 | IF( .NOT.ln_trcdta ) THEN |
---|
90 | ln_trc_ini(:) = .FALSE. |
---|
91 | ENDIF |
---|
92 | |
---|
93 | IF(lwp) THEN ! control print |
---|
94 | WRITE(numout,*) |
---|
95 | WRITE(numout,*) ' Namelist : namtrc' |
---|
96 | WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta |
---|
97 | WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp |
---|
98 | WRITE(numout,*) ' Restoring of tracer on closed seas ln_trcdmp_clo = ', ln_trcdmp_clo |
---|
99 | WRITE(numout,*) ' ' |
---|
100 | DO jn = 1, jptra |
---|
101 | WRITE(numout,*) ' tracer nb : ', jn, ' short name : ', ctrcnm(jn) |
---|
102 | END DO |
---|
103 | WRITE(numout,*) ' ' |
---|
104 | ENDIF |
---|
105 | |
---|
106 | IF(lwp) THEN ! control print |
---|
107 | IF( ln_rsttr ) THEN |
---|
108 | WRITE(numout,*) |
---|
109 | WRITE(numout,*) ' Read a restart file for passive tracer : ', TRIM( cn_trcrst_in ) |
---|
110 | WRITE(numout,*) |
---|
111 | ENDIF |
---|
112 | IF( ln_trcdta .AND. .NOT.ln_rsttr ) THEN |
---|
113 | WRITE(numout,*) |
---|
114 | WRITE(numout,*) ' Some of the passive tracers are initialised from climatologies ' |
---|
115 | WRITE(numout,*) |
---|
116 | ENDIF |
---|
117 | IF( .NOT.ln_trcdta ) THEN |
---|
118 | WRITE(numout,*) |
---|
119 | WRITE(numout,*) ' All the passive tracers are initialised with constant values ' |
---|
120 | WRITE(numout,*) |
---|
121 | ENDIF |
---|
122 | ENDIF |
---|
123 | |
---|
124 | |
---|
125 | rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc ) ! vertical profile of passive tracer time-step |
---|
126 | |
---|
127 | IF(lwp) THEN ! control print |
---|
128 | WRITE(numout,*) |
---|
129 | WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc(1) |
---|
130 | WRITE(numout,*) |
---|
131 | ENDIF |
---|
132 | |
---|
133 | |
---|
134 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
135 | |
---|
136 | REWIND( numnat_ref ) ! Namelist namtrc_trd in reference namelist : Passive tracer trends |
---|
137 | READ ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) |
---|
138 | 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in reference namelist', lwp ) |
---|
139 | |
---|
140 | REWIND( numnat_cfg ) ! Namelist namtrc_trd in configuration namelist : Passive tracer trends |
---|
141 | READ ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) |
---|
142 | 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp ) |
---|
143 | IF(lwm) WRITE ( numont, namtrc_trd ) |
---|
144 | |
---|
145 | IF(lwp) THEN |
---|
146 | WRITE(numout,*) |
---|
147 | WRITE(numout,*) ' trd_mxl_trc_init : read namelist namtrc_trd ' |
---|
148 | WRITE(numout,*) ' ~~~~~~~~~~~~~~~~ ' |
---|
149 | WRITE(numout,*) ' * frequency of trends diagnostics nn_trd_trc = ', nn_trd_trc |
---|
150 | WRITE(numout,*) ' * control surface type nn_ctls_trc = ', nn_ctls_trc |
---|
151 | WRITE(numout,*) ' * restart for ML diagnostics ln_trdmxl_trc_restart = ', ln_trdmxl_trc_restart |
---|
152 | WRITE(numout,*) ' * flag to diagnose trends of ' |
---|
153 | WRITE(numout,*) ' instantantaneous or mean ML T/S ln_trdmxl_trc_instant = ', ln_trdmxl_trc_instant |
---|
154 | WRITE(numout,*) ' * unit conversion factor rn_ucf_trc = ', rn_ucf_trc |
---|
155 | DO jn = 1, jptra |
---|
156 | IF( ln_trdtrc(jn) ) WRITE(numout,*) ' compute ML trends for tracer number :', jn |
---|
157 | END DO |
---|
158 | ENDIF |
---|
159 | #endif |
---|
160 | |
---|
161 | |
---|
162 | ! Call the ice module for tracers |
---|
163 | ! ------------------------------- |
---|
164 | CALL trc_nam_ice |
---|
165 | |
---|
166 | ! namelist of SMS |
---|
167 | ! --------------- |
---|
168 | IF( lk_pisces ) THEN ; CALL trc_nam_pisces ! PISCES bio-model |
---|
169 | ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' |
---|
170 | ENDIF |
---|
171 | |
---|
172 | IF( lk_cfc ) THEN ; CALL trc_nam_cfc ! CFC tracers |
---|
173 | ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' |
---|
174 | ENDIF |
---|
175 | |
---|
176 | IF( lk_c14b ) THEN ; CALL trc_nam_c14b ! C14 bomb tracers |
---|
177 | ELSE ; IF(lwp) WRITE(numout,*) ' C14 not used' |
---|
178 | ENDIF |
---|
179 | |
---|
180 | IF( lk_my_trc ) THEN ; CALL trc_nam_my_trc ! MY_TRC tracers |
---|
181 | ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' |
---|
182 | ENDIF |
---|
183 | |
---|
184 | ! +++>>> FABM |
---|
185 | IF( lk_fabm ) THEN ; CALL trc_nam_fabm ! FABM tracers |
---|
186 | ELSE ; IF(lwp) WRITE(numout,*) ' FABM not used' |
---|
187 | ENDIF |
---|
188 | ! FABM <<<+++ |
---|
189 | ! |
---|
190 | END SUBROUTINE trc_nam |
---|
191 | |
---|
192 | SUBROUTINE trc_nam_run |
---|
193 | !!--------------------------------------------------------------------- |
---|
194 | !! *** ROUTINE trc_nam *** |
---|
195 | !! |
---|
196 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
197 | !! |
---|
198 | !!--------------------------------------------------------------------- |
---|
199 | NAMELIST/namtrc_run/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, ln_top_euler, & |
---|
200 | & cn_trcrst_indir, cn_trcrst_outdir, cn_trcrst_in, cn_trcrst_out |
---|
201 | |
---|
202 | |
---|
203 | INTEGER :: ios ! Local integer output status for namelist read |
---|
204 | |
---|
205 | !!--------------------------------------------------------------------- |
---|
206 | |
---|
207 | |
---|
208 | IF(lwp) WRITE(numout,*) 'trc_nam_run : read the passive tracer namelists' |
---|
209 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
210 | |
---|
211 | CALL ctl_opn( numnat_ref, 'namelist_top_ref' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
212 | CALL ctl_opn( numnat_cfg, 'namelist_top_cfg' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
213 | IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) |
---|
214 | |
---|
215 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
216 | READ ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) |
---|
217 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
218 | |
---|
219 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
220 | READ ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) |
---|
221 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
222 | IF(lwm) WRITE ( numont, namtrc_run ) |
---|
223 | |
---|
224 | ! computes the first time step of tracer model |
---|
225 | nittrc000 = nit000 + nn_dttrc - 1 |
---|
226 | |
---|
227 | IF(lwp) THEN ! control print |
---|
228 | WRITE(numout,*) |
---|
229 | WRITE(numout,*) ' Namelist : namtrc_run' |
---|
230 | WRITE(numout,*) ' time step freq. for passive tracer nn_dttrc = ', nn_dttrc |
---|
231 | WRITE(numout,*) ' restart for passive tracer ln_rsttr = ', ln_rsttr |
---|
232 | WRITE(numout,*) ' control of time step for passive tracer nn_rsttr = ', nn_rsttr |
---|
233 | WRITE(numout,*) ' first time step for pass. trac. nittrc000 = ', nittrc000 |
---|
234 | WRITE(numout,*) ' frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc |
---|
235 | WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler |
---|
236 | WRITE(numout,*) ' ' |
---|
237 | ENDIF |
---|
238 | ! |
---|
239 | END SUBROUTINE trc_nam_run |
---|
240 | |
---|
241 | SUBROUTINE trc_nam_ice |
---|
242 | !!--------------------------------------------------------------------- |
---|
243 | !! *** ROUTINE trc_nam_ice *** |
---|
244 | !! |
---|
245 | !! ** Purpose : Read the namelist for the ice effect on tracers |
---|
246 | !! |
---|
247 | !! ** Method : - |
---|
248 | !! |
---|
249 | !!--------------------------------------------------------------------- |
---|
250 | ! --- Variable declarations --- ! |
---|
251 | INTEGER :: jn ! dummy loop indices |
---|
252 | INTEGER :: ios ! Local integer output status for namelist read |
---|
253 | |
---|
254 | ! --- Namelist declarations --- ! |
---|
255 | ! --->>> FABM |
---|
256 | !TYPE(TRC_I_NML), DIMENSION(jptra) :: sn_tri_tracer |
---|
257 | ! FABM <<<--- |
---|
258 | ! +++>>> FABM |
---|
259 | TYPE(TRC_I_NML), DIMENSION(jpmaxtrc) :: sn_tri_tracer |
---|
260 | ! FABM <<<+++ |
---|
261 | NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer |
---|
262 | |
---|
263 | IF(lwp) THEN |
---|
264 | WRITE(numout,*) |
---|
265 | WRITE(numout,*) 'trc_nam_ice : Read the namelist for trc_ice' |
---|
266 | WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
267 | ENDIF |
---|
268 | |
---|
269 | IF( nn_timing == 1 ) CALL timing_start('trc_nam_ice') |
---|
270 | |
---|
271 | ! |
---|
272 | REWIND( numnat_ref ) ! Namelist namtrc_ice in reference namelist : Passive tracer input data |
---|
273 | READ ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) |
---|
274 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp ) |
---|
275 | |
---|
276 | REWIND( numnat_cfg ) ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients |
---|
277 | READ ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) |
---|
278 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp ) |
---|
279 | |
---|
280 | IF( lwp ) THEN |
---|
281 | WRITE(numout,*) ' ' |
---|
282 | WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr |
---|
283 | WRITE(numout,*) ' ' |
---|
284 | ENDIF |
---|
285 | |
---|
286 | ! Assign namelist stuff |
---|
287 | DO jn = 1, jptra |
---|
288 | trc_ice_ratio(jn) = sn_tri_tracer(jn)%trc_ratio |
---|
289 | trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr |
---|
290 | cn_trc_o (jn) = sn_tri_tracer(jn)%ctrc_o |
---|
291 | END DO |
---|
292 | |
---|
293 | IF( nn_timing == 1 ) CALL timing_stop('trc_nam_ice') |
---|
294 | ! |
---|
295 | END SUBROUTINE trc_nam_ice |
---|
296 | |
---|
297 | SUBROUTINE trc_nam_trc |
---|
298 | !!--------------------------------------------------------------------- |
---|
299 | !! *** ROUTINE trc_nam *** |
---|
300 | !! |
---|
301 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
302 | !! |
---|
303 | !!--------------------------------------------------------------------- |
---|
304 | ! --->>> FABM |
---|
305 | !TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput |
---|
306 | ! FABM <<<--- |
---|
307 | ! +++>>> FABM |
---|
308 | TYPE(PTRACER), DIMENSION(jpmaxtrc) :: sn_tracer ! type of tracer for saving if not key_iomput |
---|
309 | ! FABM <<<+++ |
---|
310 | !! |
---|
311 | NAMELIST/namtrc/ sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo |
---|
312 | |
---|
313 | INTEGER :: ios ! Local integer output status for namelist read |
---|
314 | INTEGER :: jn ! dummy loop indice |
---|
315 | !!--------------------------------------------------------------------- |
---|
316 | IF(lwp) WRITE(numout,*) |
---|
317 | IF(lwp) WRITE(numout,*) 'trc_nam_trc : read the passive tracer namelists' |
---|
318 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
319 | |
---|
320 | ! Initialise logical flags to .FALSE.: |
---|
321 | sn_tracer(:)%llinit = .FALSE. |
---|
322 | sn_tracer(:)%llsave = .FALSE. |
---|
323 | #ifdef key_fabm |
---|
324 | sn_tracer(:)%llsbc = .FALSE. |
---|
325 | sn_tracer(:)%llcbc = .FALSE. |
---|
326 | sn_tracer(:)%llcbc = .FALSE. |
---|
327 | #endif |
---|
328 | |
---|
329 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
330 | READ ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) |
---|
331 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
332 | |
---|
333 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
334 | READ ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) |
---|
335 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
336 | IF(lwm) WRITE ( numont, namtrc ) |
---|
337 | |
---|
338 | DO jn = 1, jptra |
---|
339 | ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) |
---|
340 | ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) |
---|
341 | ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) |
---|
342 | ln_trc_ini(jn) = sn_tracer(jn)%llinit |
---|
343 | ! --->>> FABM |
---|
344 | !!#if defined key_my_trc |
---|
345 | ! FABM <<<--- |
---|
346 | ! +++>>> FABM |
---|
347 | #if defined key_fabm |
---|
348 | ! FABM <<<+++ |
---|
349 | ln_trc_sbc(jn) = sn_tracer(jn)%llsbc |
---|
350 | ln_trc_cbc(jn) = sn_tracer(jn)%llcbc |
---|
351 | ln_trc_obc(jn) = sn_tracer(jn)%llobc |
---|
352 | #endif |
---|
353 | ln_trc_wri(jn) = sn_tracer(jn)%llsave |
---|
354 | END DO |
---|
355 | |
---|
356 | ! +++>>> FABM |
---|
357 | if (lk_fabm) CALL trc_nam_fabm_override |
---|
358 | ! FABM <<<+++ |
---|
359 | END SUBROUTINE trc_nam_trc |
---|
360 | |
---|
361 | |
---|
362 | SUBROUTINE trc_nam_dia |
---|
363 | !!--------------------------------------------------------------------- |
---|
364 | !! *** ROUTINE trc_nam_dia *** |
---|
365 | !! |
---|
366 | !! ** Purpose : read options for the passive tracer diagnostics |
---|
367 | !! |
---|
368 | !! ** Method : - read passive tracer namelist |
---|
369 | !! - read namelist of each defined SMS model |
---|
370 | !! ( (PISCES, CFC, MY_TRC ) |
---|
371 | !!--------------------------------------------------------------------- |
---|
372 | INTEGER :: ierr |
---|
373 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
374 | ! NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & |
---|
375 | ! & ln_trdmxl_trc_restart, ln_trdmxl_trc_instant, & |
---|
376 | ! & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc |
---|
377 | #endif |
---|
378 | NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio |
---|
379 | |
---|
380 | INTEGER :: ios ! Local integer output status for namelist read |
---|
381 | !!--------------------------------------------------------------------- |
---|
382 | |
---|
383 | IF(lwp) WRITE(numout,*) |
---|
384 | IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' |
---|
385 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
386 | |
---|
387 | IF(lwp) WRITE(numout,*) |
---|
388 | IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' |
---|
389 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
390 | |
---|
391 | REWIND( numnat_ref ) ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics |
---|
392 | READ ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) |
---|
393 | 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) |
---|
394 | |
---|
395 | REWIND( numnat_cfg ) ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics |
---|
396 | READ ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) |
---|
397 | 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) |
---|
398 | IF(lwm) WRITE ( numont, namtrc_dia ) |
---|
399 | |
---|
400 | IF(lwp) THEN |
---|
401 | WRITE(numout,*) |
---|
402 | WRITE(numout,*) |
---|
403 | WRITE(numout,*) ' Namelist : namtrc_dia' |
---|
404 | WRITE(numout,*) ' save additionnal diagnostics arrays ln_diatrc = ', ln_diatrc |
---|
405 | WRITE(numout,*) ' save additionnal biology diagnostics arrays ln_diabio = ', ln_diabio |
---|
406 | WRITE(numout,*) ' frequency of outputs for additional arrays nn_writedia = ', nn_writedia |
---|
407 | WRITE(numout,*) ' frequency of outputs for biological trends nn_writebio = ', nn_writebio |
---|
408 | WRITE(numout,*) ' ' |
---|
409 | ENDIF |
---|
410 | |
---|
411 | IF( ln_diatrc .AND. .NOT. lk_iomput ) THEN |
---|
412 | ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d), & |
---|
413 | & ctrc2d(jpdia2d), ctrc2l(jpdia2d), ctrc2u(jpdia2d) , & |
---|
414 | & ctrc3d(jpdia3d), ctrc3l(jpdia3d), ctrc3u(jpdia3d) , STAT = ierr ) |
---|
415 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate add. diag. array' ) |
---|
416 | ! |
---|
417 | trc2d(:,:,: ) = 0._wp ; ctrc2d(:) = ' ' ; ctrc2l(:) = ' ' ; ctrc2u(:) = ' ' |
---|
418 | trc3d(:,:,:,:) = 0._wp ; ctrc3d(:) = ' ' ; ctrc3l(:) = ' ' ; ctrc3u(:) = ' ' |
---|
419 | ! |
---|
420 | ENDIF |
---|
421 | |
---|
422 | IF( ( ln_diabio .AND. .NOT. lk_iomput ) .OR. l_trdtrc ) THEN |
---|
423 | ALLOCATE( trbio (jpi,jpj,jpk,jpdiabio) , & |
---|
424 | & ctrbio(jpdiabio), ctrbil(jpdiabio), ctrbiu(jpdiabio), STAT = ierr ) |
---|
425 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate bio. diag. array' ) |
---|
426 | ! |
---|
427 | trbio(:,:,:,:) = 0._wp ; ctrbio(:) = ' ' ; ctrbil(:) = ' ' ; ctrbiu(:) = ' ' |
---|
428 | ! |
---|
429 | ENDIF |
---|
430 | ! |
---|
431 | END SUBROUTINE trc_nam_dia |
---|
432 | |
---|
433 | #else |
---|
434 | !!---------------------------------------------------------------------- |
---|
435 | !! Dummy module : No passive tracer |
---|
436 | !!---------------------------------------------------------------------- |
---|
437 | CONTAINS |
---|
438 | SUBROUTINE trc_nam ! Empty routine |
---|
439 | END SUBROUTINE trc_nam |
---|
440 | SUBROUTINE trc_nam_run ! Empty routine |
---|
441 | END SUBROUTINE trc_nam_run |
---|
442 | #endif |
---|
443 | |
---|
444 | !!---------------------------------------------------------------------- |
---|
445 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
446 | !! $Id$ |
---|
447 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
448 | !!====================================================================== |
---|
449 | END MODULE trcnam |
---|