1 | MODULE bio_medusa_fin_mod |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE bio_medusa_fin_mod *** |
---|
4 | !! Finalisation for TRC_BIO_MEDUSA |
---|
5 | !!====================================================================== |
---|
6 | !! History : |
---|
7 | !! - ! 2017-04 (M. Stringer) Code taken from trcbio_medusa.F90 |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | #if defined key_medusa |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! MEDUSA bio-model |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | |
---|
14 | IMPLICIT NONE |
---|
15 | PRIVATE |
---|
16 | |
---|
17 | PUBLIC bio_medusa_fin ! Called in trcbio_medusa.F90 |
---|
18 | |
---|
19 | !!---------------------------------------------------------------------- |
---|
20 | !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) |
---|
21 | !! $Id$ |
---|
22 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
23 | !!---------------------------------------------------------------------- |
---|
24 | |
---|
25 | CONTAINS |
---|
26 | |
---|
27 | SUBROUTINE bio_medusa_fin( kt ) |
---|
28 | !!--------------------------------------------------------------------- |
---|
29 | !! *** ROUTINE bio_medusa_fin *** |
---|
30 | !! This called from TRC_BIO_MEDUSA and |
---|
31 | !! - ... |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | USE bio_medusa_mod |
---|
34 | USE dom_oce, ONLY: atfp, atfp1, neuler, rdt, e3t_n, tmask |
---|
35 | USE in_out_manager, ONLY: lwp, numout |
---|
36 | # if defined key_iomput |
---|
37 | USE iom, ONLY: iom_put, lk_iomput |
---|
38 | # endif |
---|
39 | USE lbclnk, ONLY: lbc_lnk |
---|
40 | USE par_medusa, ONLY: jp_medusa_2d, jp_medusa_3d, & |
---|
41 | jp_medusa_trd |
---|
42 | USE par_oce, ONLY: jpi, jpim1, jpj, jpjm1, jpk |
---|
43 | USE phycst, ONLY: rsmall |
---|
44 | USE sms_medusa, ONLY: jinorgben, jorgben, & |
---|
45 | f3_co3, f3_h2co3, f3_hco3, & |
---|
46 | f3_omarg, f3_omcal, f3_pH, & |
---|
47 | za_sed_c, za_sed_ca, za_sed_fe, & |
---|
48 | za_sed_n, za_sed_si, & |
---|
49 | zb_sed_c, zb_sed_ca, zb_sed_fe, & |
---|
50 | zb_sed_n, zb_sed_si, & |
---|
51 | zn_sed_c, zn_sed_ca, zn_sed_fe, & |
---|
52 | zn_sed_n, zn_sed_si |
---|
53 | USE trc, ONLY: med_diag, nittrc000 |
---|
54 | USE trcnam_trp, ONLY: ln_trcadv_cen2, ln_trcadv_tvd |
---|
55 | |
---|
56 | !! time (integer timestep) |
---|
57 | INTEGER, INTENT( in ) :: kt |
---|
58 | |
---|
59 | INTEGER :: ji, jj |
---|
60 | INTEGER :: jn |
---|
61 | |
---|
62 | REAL(wp) :: fq0,fq1,fq2,fq3 |
---|
63 | |
---|
64 | !!---------------------------------------------------------------------- |
---|
65 | !! Process benthic in/out fluxes |
---|
66 | !! These can be handled outside of the 3D calculations since the |
---|
67 | !! benthic pools (and fluxes) are 2D in nature; this code is |
---|
68 | !! (shamelessly) borrowed from corresponding code in the LOBSTER |
---|
69 | !! model |
---|
70 | !!---------------------------------------------------------------------- |
---|
71 | !! |
---|
72 | !! IF(lwp) WRITE(numout,*) 'AXY: rdt = ', rdt |
---|
73 | if (jorgben.eq.1) then |
---|
74 | za_sed_n(:,:) = zn_sed_n(:,:) + & |
---|
75 | ( f_sbenin_n(:,:) + f_fbenin_n(:,:) - & |
---|
76 | f_benout_n(:,:) ) * (rdt / 86400.) |
---|
77 | zn_sed_n(:,:) = za_sed_n(:,:) |
---|
78 | !! |
---|
79 | za_sed_fe(:,:) = zn_sed_fe(:,:) + & |
---|
80 | ( f_sbenin_fe(:,:) + f_fbenin_fe(:,:) - & |
---|
81 | f_benout_fe(:,:) ) * (rdt / 86400.) |
---|
82 | zn_sed_fe(:,:) = za_sed_fe(:,:) |
---|
83 | !! |
---|
84 | za_sed_c(:,:) = zn_sed_c(:,:) + & |
---|
85 | ( f_sbenin_c(:,:) + f_fbenin_c(:,:) - & |
---|
86 | f_benout_c(:,:) ) * (rdt / 86400.) |
---|
87 | zn_sed_c(:,:) = za_sed_c(:,:) |
---|
88 | endif |
---|
89 | if (jinorgben.eq.1) then |
---|
90 | za_sed_si(:,:) = zn_sed_si(:,:) + & |
---|
91 | ( f_fbenin_si(:,:) - f_benout_si(:,:) ) * & |
---|
92 | (rdt / 86400.) |
---|
93 | zn_sed_si(:,:) = za_sed_si(:,:) |
---|
94 | !! |
---|
95 | za_sed_ca(:,:) = zn_sed_ca(:,:) + & |
---|
96 | ( f_fbenin_ca(:,:) - f_benout_ca(:,:) ) * & |
---|
97 | (rdt / 86400.) |
---|
98 | zn_sed_ca(:,:) = za_sed_ca(:,:) |
---|
99 | endif |
---|
100 | !! |
---|
101 | if (ibenthic.eq.2) then |
---|
102 | !! The code below (in this if ... then ... endif loop) is |
---|
103 | !! effectively commented out because it does not work as |
---|
104 | !! anticipated; it can be deleted at a later date |
---|
105 | if (jorgben.eq.1) then |
---|
106 | za_sed_n(:,:) = ( f_sbenin_n(:,:) + f_fbenin_n(:,:) - & |
---|
107 | f_benout_n(:,:) ) * rdt |
---|
108 | za_sed_fe(:,:) = ( f_sbenin_fe(:,:) + f_fbenin_fe(:,:) - & |
---|
109 | f_benout_fe(:,:) ) * rdt |
---|
110 | za_sed_c(:,:) = ( f_sbenin_c(:,:) + f_fbenin_c(:,:) - & |
---|
111 | f_benout_c(:,:) ) * rdt |
---|
112 | endif |
---|
113 | if (jinorgben.eq.1) then |
---|
114 | za_sed_si(:,:) = ( f_fbenin_si(:,:) - f_benout_si(:,:) ) * rdt |
---|
115 | za_sed_ca(:,:) = ( f_fbenin_ca(:,:) - f_benout_ca(:,:) ) * rdt |
---|
116 | endif |
---|
117 | !! |
---|
118 | !! Leap-frog scheme - only in explicit case, otherwise the |
---|
119 | !! time stepping is already being done in trczdf |
---|
120 | !! IF( l_trczdf_exp .AND. (ln_trcadv_cen2 .OR. ln_trcadv_tvd) ) THEN |
---|
121 | !! zfact = 2. * rdttra(jk) * FLOAT( ndttrc ) |
---|
122 | !! IF( neuler == 0 .AND. kt == nittrc000 ) zfact = rdttra(jk) * |
---|
123 | !! FLOAT(ndttrc) |
---|
124 | !! if (jorgben.eq.1) then |
---|
125 | !! za_sed_n(:,:) = zb_sed_n(:,:) + ( zfact * za_sed_n(:,:) ) |
---|
126 | !! za_sed_fe(:,:) = zb_sed_fe(:,:) + ( zfact * za_sed_fe(:,:) ) |
---|
127 | !! za_sed_c(:,:) = zb_sed_c(:,:) + ( zfact * za_sed_c(:,:) ) |
---|
128 | !! endif |
---|
129 | !! if (jinorgben.eq.1) then |
---|
130 | !! za_sed_si(:,:) = zb_sed_si(:,:) + ( zfact * za_sed_si(:,:) ) |
---|
131 | !! za_sed_ca(:,:) = zb_sed_ca(:,:) + ( zfact * za_sed_ca(:,:) ) |
---|
132 | !! endif |
---|
133 | !! ENDIF |
---|
134 | !! |
---|
135 | !! Time filter and swap of arrays |
---|
136 | IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN ! centred or tvd scheme |
---|
137 | IF( neuler == 0 .AND. kt == nittrc000 ) THEN |
---|
138 | if (jorgben.eq.1) then |
---|
139 | zb_sed_n(:,:) = zn_sed_n(:,:) |
---|
140 | zn_sed_n(:,:) = za_sed_n(:,:) |
---|
141 | za_sed_n(:,:) = 0.0 |
---|
142 | !! |
---|
143 | zb_sed_fe(:,:) = zn_sed_fe(:,:) |
---|
144 | zn_sed_fe(:,:) = za_sed_fe(:,:) |
---|
145 | za_sed_fe(:,:) = 0.0 |
---|
146 | !! |
---|
147 | zb_sed_c(:,:) = zn_sed_c(:,:) |
---|
148 | zn_sed_c(:,:) = za_sed_c(:,:) |
---|
149 | za_sed_c(:,:) = 0.0 |
---|
150 | endif |
---|
151 | if (jinorgben.eq.1) then |
---|
152 | zb_sed_si(:,:) = zn_sed_si(:,:) |
---|
153 | zn_sed_si(:,:) = za_sed_si(:,:) |
---|
154 | za_sed_si(:,:) = 0.0 |
---|
155 | !! |
---|
156 | zb_sed_ca(:,:) = zn_sed_ca(:,:) |
---|
157 | zn_sed_ca(:,:) = za_sed_ca(:,:) |
---|
158 | za_sed_ca(:,:) = 0.0 |
---|
159 | endif |
---|
160 | ELSE |
---|
161 | if (jorgben.eq.1) then |
---|
162 | zb_sed_n(:,:) = (atfp * & |
---|
163 | ( zb_sed_n(:,:) + za_sed_n(:,:) )) + & |
---|
164 | (atfp1 * zn_sed_n(:,:) ) |
---|
165 | zn_sed_n(:,:) = za_sed_n(:,:) |
---|
166 | za_sed_n(:,:) = 0.0 |
---|
167 | !! |
---|
168 | zb_sed_fe(:,:) = (atfp * & |
---|
169 | ( zb_sed_fe(:,:) + za_sed_fe(:,:) )) + & |
---|
170 | (atfp1 * zn_sed_fe(:,:)) |
---|
171 | zn_sed_fe(:,:) = za_sed_fe(:,:) |
---|
172 | za_sed_fe(:,:) = 0.0 |
---|
173 | !! |
---|
174 | zb_sed_c(:,:) = (atfp * & |
---|
175 | ( zb_sed_c(:,:) + za_sed_c(:,:) )) + & |
---|
176 | (atfp1 * zn_sed_c(:,:) ) |
---|
177 | zn_sed_c(:,:) = za_sed_c(:,:) |
---|
178 | za_sed_c(:,:) = 0.0 |
---|
179 | endif |
---|
180 | if (jinorgben.eq.1) then |
---|
181 | zb_sed_si(:,:) = (atfp * & |
---|
182 | ( zb_sed_si(:,:) + za_sed_si(:,:) )) + & |
---|
183 | (atfp1 * zn_sed_si(:,:)) |
---|
184 | zn_sed_si(:,:) = za_sed_si(:,:) |
---|
185 | za_sed_si(:,:) = 0.0 |
---|
186 | !! |
---|
187 | zb_sed_ca(:,:) = (atfp * & |
---|
188 | ( zb_sed_ca(:,:) + za_sed_ca(:,:) )) + & |
---|
189 | (atfp1 * zn_sed_ca(:,:)) |
---|
190 | zn_sed_ca(:,:) = za_sed_ca(:,:) |
---|
191 | za_sed_ca(:,:) = 0.0 |
---|
192 | endif |
---|
193 | ENDIF |
---|
194 | ELSE ! case of smolar scheme or muscl |
---|
195 | if (jorgben.eq.1) then |
---|
196 | zb_sed_n(:,:) = za_sed_n(:,:) |
---|
197 | zn_sed_n(:,:) = za_sed_n(:,:) |
---|
198 | za_sed_n(:,:) = 0.0 |
---|
199 | !! |
---|
200 | zb_sed_fe(:,:) = za_sed_fe(:,:) |
---|
201 | zn_sed_fe(:,:) = za_sed_fe(:,:) |
---|
202 | za_sed_fe(:,:) = 0.0 |
---|
203 | !! |
---|
204 | zb_sed_c(:,:) = za_sed_c(:,:) |
---|
205 | zn_sed_c(:,:) = za_sed_c(:,:) |
---|
206 | za_sed_c(:,:) = 0.0 |
---|
207 | endif |
---|
208 | if (jinorgben.eq.1) then |
---|
209 | zb_sed_si(:,:) = za_sed_si(:,:) |
---|
210 | zn_sed_si(:,:) = za_sed_si(:,:) |
---|
211 | za_sed_si(:,:) = 0.0 |
---|
212 | !! |
---|
213 | zb_sed_ca(:,:) = za_sed_ca(:,:) |
---|
214 | zn_sed_ca(:,:) = za_sed_ca(:,:) |
---|
215 | za_sed_ca(:,:) = 0.0 |
---|
216 | endif |
---|
217 | ENDIF |
---|
218 | endif |
---|
219 | |
---|
220 | # if defined key_debug_medusa |
---|
221 | !! AXY (12/07/17) |
---|
222 | !!----------------------------------------------------------------- |
---|
223 | !! Check conservation of MEDUSA's sinks-minus-sources using fflx_X |
---|
224 | !! diagnostics (i.e. biogeochemical processes only) |
---|
225 | !! - fflx_X diagnostics *should* include all transfers between |
---|
226 | !! modelled components |
---|
227 | !! - they should also include gains / losses due to air-sea |
---|
228 | !! fluxes of C and O2, aeolian and seafloor inputs of Fe, and |
---|
229 | !! inputs from seafloor "benthic buckets" (N, Si, Fe, C and |
---|
230 | !! alkalinity) |
---|
231 | !! - however, they do not include the transfer of material to |
---|
232 | !! "benthic buckets" by sedimenting slow- and fast-sinking |
---|
233 | !! detritus since these are separate 2D reservoirs |
---|
234 | !! - consequently, for a given water column, the integrated |
---|
235 | !! fluxes should sum to the "loss" of material to the "benthic |
---|
236 | !! buckets" |
---|
237 | !! - if they do not, this suggests that MEDUSA contains errors |
---|
238 | !! in its accounting (e.g. processes omitted from calculated |
---|
239 | !! fluxes) |
---|
240 | !! - here, the local integrated fluxes and benthic inputs (plus |
---|
241 | !! air-sea fluxes in the case of C) are reported together with |
---|
242 | !! the resulting error |
---|
243 | !! - only N, Si, C and alkalinity inventories considered; Fe and |
---|
244 | !! O2 overlooked because of wholesale loss (and addition, in |
---|
245 | !! the case of O2) of these tracers within the water column |
---|
246 | !!----------------------------------------------------------------- |
---|
247 | !! |
---|
248 | !! nitrogen |
---|
249 | DO jj = 2,jpjm1 |
---|
250 | DO ji = 2,jpim1 |
---|
251 | if (tmask(ji,jj,1) == 1) then |
---|
252 | fq0 = fflx_n(ji,jj) |
---|
253 | fq1 = f_sbenin_n(ji,jj) + f_fbenin_n(ji,jj) |
---|
254 | fq2 = fq0 + fq1 |
---|
255 | IF (lwp) write (numout,'(a,2i3,a,3f15.10)') & |
---|
256 | 'AXY N cons: (i,j)=',ji,jj,', (flx,ben,err)=', & |
---|
257 | fq0,fq1,fq2 |
---|
258 | ENDIF |
---|
259 | ENDDO |
---|
260 | ENDDO |
---|
261 | !! silicon |
---|
262 | DO jj = 2,jpjm1 |
---|
263 | DO ji = 2,jpim1 |
---|
264 | if (tmask(ji,jj,1) == 1) then |
---|
265 | fq0 = fflx_si(ji,jj) |
---|
266 | fq1 = f_fbenin_si(ji,jj) |
---|
267 | fq2 = fq0 + fq1 |
---|
268 | IF (lwp) write (numout,'(a,2i3,a,3f15.10)') & |
---|
269 | 'AXY Si cons: (i,j)=',ji,jj,', (flx,ben,err)=', & |
---|
270 | fq0,fq1,fq2 |
---|
271 | ENDIF |
---|
272 | ENDDO |
---|
273 | ENDDO |
---|
274 | !! carbon |
---|
275 | DO jj = 2,jpjm1 |
---|
276 | DO ji = 2,jpim1 |
---|
277 | if (tmask(ji,jj,1) == 1) then |
---|
278 | fq0 = fflx_c(ji,jj) |
---|
279 | fq1 = f_sbenin_c(ji,jj) + f_fbenin_c(ji,jj) + f_fbenin_ca(ji,jj) |
---|
280 | fq2 = f_co2flux(ji,jj) * e3t_n(ji,jj,1) |
---|
281 | fq3 = fq0 + fq1 |
---|
282 | IF (lwp) write (numout,'(a,2i3,a,4f15.10)') & |
---|
283 | 'AXY C cons: (i,j)=',ji,jj,', (flx,ben,asf,err)=', & |
---|
284 | fq0,fq1,fq2,fq3 |
---|
285 | ENDIF |
---|
286 | ENDDO |
---|
287 | ENDDO |
---|
288 | !! alkalinity |
---|
289 | DO jj = 2,jpjm1 |
---|
290 | DO ji = 2,jpim1 |
---|
291 | if (tmask(ji,jj,1) == 1) then |
---|
292 | fq0 = fflx_a(ji,jj) |
---|
293 | fq1 = 2.0 * f_fbenin_ca(ji,jj) |
---|
294 | fq2 = fq0 + fq1 |
---|
295 | IF (lwp) write (numout,'(a,2i3,a,3f15.10)') & |
---|
296 | 'AXY alk cons: (i,j)=',ji,jj,', (flx,ben,err)=', & |
---|
297 | fq0,fq1,fq2 |
---|
298 | ENDIF |
---|
299 | ENDDO |
---|
300 | ENDDO |
---|
301 | # endif |
---|
302 | |
---|
303 | !!!--------------------------------------------------------------- |
---|
304 | !! Add very last diag calculations |
---|
305 | !!!--------------------------------------------------------------- |
---|
306 | DO jj = 2,jpjm1 |
---|
307 | DO ji = 2,jpim1 |
---|
308 | !! |
---|
309 | IF( med_diag%PN_JLIM%dgsave ) THEN |
---|
310 | fjln2d(ji,jj) = fjln2d(ji,jj) / MAX(ftot_pn(ji,jj), rsmall) |
---|
311 | ENDIF |
---|
312 | IF( med_diag%PN_NLIM%dgsave ) THEN |
---|
313 | fnln2d(ji,jj) = fnln2d(ji,jj) / MAX(ftot_pn(ji,jj), rsmall) |
---|
314 | ENDIF |
---|
315 | IF( med_diag%PN_FELIM%dgsave ) THEN |
---|
316 | ffln2d(ji,jj) = ffln2d(ji,jj) / MAX(ftot_pn(ji,jj), rsmall) |
---|
317 | ENDIF |
---|
318 | IF( med_diag%PD_JLIM%dgsave ) THEN |
---|
319 | fjld2d(ji,jj) = fjld2d(ji,jj) / MAX(ftot_pd(ji,jj), rsmall) |
---|
320 | ENDIF |
---|
321 | IF( med_diag%PD_NLIM%dgsave ) THEN |
---|
322 | fnld2d(ji,jj) = fnld2d(ji,jj) / MAX(ftot_pd(ji,jj), rsmall) |
---|
323 | ENDIF |
---|
324 | IF( med_diag%PD_FELIM%dgsave ) THEN |
---|
325 | ffld2d(ji,jj) = ffld2d(ji,jj) / MAX(ftot_pd(ji,jj), rsmall) |
---|
326 | ENDIF |
---|
327 | IF( med_diag%PD_SILIM%dgsave ) THEN |
---|
328 | fsld2d2(ji,jj) = fsld2d2(ji,jj) / MAX(ftot_pd(ji,jj), rsmall) |
---|
329 | ENDIF |
---|
330 | IF( med_diag%PDSILIM2%dgsave ) THEN |
---|
331 | fsld2d(ji,jj) = fsld2d(ji,jj) / MAX(ftot_pd(ji,jj), rsmall) |
---|
332 | ENDIF |
---|
333 | ENDDO |
---|
334 | ENDDO |
---|
335 | !!---------------------------------------------------------------- |
---|
336 | !! Add in XML diagnostics stuff |
---|
337 | !!---------------------------------------------------------------- |
---|
338 | !! |
---|
339 | !! ** 2D diagnostics |
---|
340 | # if defined key_debug_medusa |
---|
341 | IF (lwp) write (numout,*) 'bio_medusa_fin: export all diag kt = ', kt |
---|
342 | CALL flush(numout) |
---|
343 | # endif |
---|
344 | IF ( med_diag%INVTN%dgsave ) THEN |
---|
345 | CALL iom_put( "INVTN" , ftot_n ) |
---|
346 | ENDIF |
---|
347 | IF ( med_diag%INVTSI%dgsave ) THEN |
---|
348 | CALL iom_put( "INVTSI" , ftot_si ) |
---|
349 | ENDIF |
---|
350 | IF ( med_diag%INVTFE%dgsave ) THEN |
---|
351 | CALL iom_put( "INVTFE" , ftot_fe ) |
---|
352 | ENDIF |
---|
353 | IF ( med_diag%ML_PRN%dgsave ) THEN |
---|
354 | CALL iom_put( "ML_PRN" , fprn_ml ) |
---|
355 | ENDIF |
---|
356 | IF ( med_diag%ML_PRD%dgsave ) THEN |
---|
357 | CALL iom_put( "ML_PRD" , fprd_ml ) |
---|
358 | ENDIF |
---|
359 | IF ( med_diag%OCAL_LVL%dgsave ) THEN |
---|
360 | CALL iom_put( "OCAL_LVL" , fccd ) |
---|
361 | ENDIF |
---|
362 | IF ( med_diag%PN_JLIM%dgsave ) THEN |
---|
363 | CALL iom_put( "PN_JLIM" , fjln2d ) |
---|
364 | DEALLOCATE( fjln2d ) |
---|
365 | ENDIF |
---|
366 | IF ( med_diag%PN_NLIM%dgsave ) THEN |
---|
367 | CALL iom_put( "PN_NLIM" , fnln2d ) |
---|
368 | DEALLOCATE( fnln2d ) |
---|
369 | ENDIF |
---|
370 | IF ( med_diag%PN_FELIM%dgsave ) THEN |
---|
371 | CALL iom_put( "PN_FELIM" , ffln2d ) |
---|
372 | DEALLOCATE( ffln2d ) |
---|
373 | ENDIF |
---|
374 | IF ( med_diag%PD_JLIM%dgsave ) THEN |
---|
375 | CALL iom_put( "PD_JLIM" , fjld2d ) |
---|
376 | DEALLOCATE( fjld2d ) |
---|
377 | ENDIF |
---|
378 | IF ( med_diag%PD_NLIM%dgsave ) THEN |
---|
379 | CALL iom_put( "PD_NLIM" , fnld2d ) |
---|
380 | DEALLOCATE( fnld2d ) |
---|
381 | ENDIF |
---|
382 | IF ( med_diag%PD_FELIM%dgsave ) THEN |
---|
383 | CALL iom_put( "PD_FELIM" , ffld2d ) |
---|
384 | DEALLOCATE( ffld2d ) |
---|
385 | ENDIF |
---|
386 | IF ( med_diag%PD_SILIM%dgsave ) THEN |
---|
387 | CALL iom_put( "PD_SILIM" , fsld2d2 ) |
---|
388 | DEALLOCATE( fsld2d2 ) |
---|
389 | ENDIF |
---|
390 | IF ( med_diag%PDSILIM2%dgsave ) THEN |
---|
391 | CALL iom_put( "PDSILIM2" , fsld2d ) |
---|
392 | DEALLOCATE( fsld2d ) |
---|
393 | ENDIF |
---|
394 | IF ( med_diag%INTFLX_N%dgsave ) THEN |
---|
395 | CALL iom_put( "INTFLX_N" , fflx_n ) |
---|
396 | ENDIF |
---|
397 | IF ( med_diag%INTFLX_SI%dgsave ) THEN |
---|
398 | CALL iom_put( "INTFLX_SI" , fflx_si ) |
---|
399 | ENDIF |
---|
400 | IF ( med_diag%INTFLX_FE%dgsave ) THEN |
---|
401 | CALL iom_put( "INTFLX_FE" , fflx_fe ) |
---|
402 | ENDIF |
---|
403 | IF ( med_diag%INT_PN%dgsave ) THEN |
---|
404 | CALL iom_put( "INT_PN" , ftot_pn ) |
---|
405 | ENDIF |
---|
406 | IF ( med_diag%INT_PD%dgsave ) THEN |
---|
407 | CALL iom_put( "INT_PD" , ftot_pd ) |
---|
408 | ENDIF |
---|
409 | IF ( med_diag%INT_ZMI%dgsave ) THEN |
---|
410 | CALL iom_put( "INT_ZMI" , ftot_zmi ) |
---|
411 | ENDIF |
---|
412 | IF ( med_diag%INT_ZME%dgsave ) THEN |
---|
413 | CALL iom_put( "INT_ZME" , ftot_zme ) |
---|
414 | ENDIF |
---|
415 | IF ( med_diag%INT_DET%dgsave ) THEN |
---|
416 | CALL iom_put( "INT_DET" , ftot_det ) |
---|
417 | ENDIF |
---|
418 | IF ( med_diag%INT_DTC%dgsave ) THEN |
---|
419 | CALL iom_put( "INT_DTC" , ftot_dtc ) |
---|
420 | ENDIF |
---|
421 | IF ( med_diag%BEN_N%dgsave ) THEN |
---|
422 | CALL iom_put( "BEN_N" , za_sed_n ) |
---|
423 | ENDIF |
---|
424 | IF ( med_diag%BEN_FE%dgsave ) THEN |
---|
425 | CALL iom_put( "BEN_FE" , za_sed_fe ) |
---|
426 | ENDIF |
---|
427 | IF ( med_diag%BEN_C%dgsave ) THEN |
---|
428 | CALL iom_put( "BEN_C" , za_sed_c ) |
---|
429 | ENDIF |
---|
430 | IF ( med_diag%BEN_SI%dgsave ) THEN |
---|
431 | CALL iom_put( "BEN_SI" , za_sed_si ) |
---|
432 | ENDIF |
---|
433 | IF ( med_diag%BEN_CA%dgsave ) THEN |
---|
434 | CALL iom_put( "BEN_CA" , za_sed_ca ) |
---|
435 | ENDIF |
---|
436 | IF ( med_diag%RUNOFF%dgsave ) THEN |
---|
437 | CALL iom_put( "RUNOFF" , f_runoff ) |
---|
438 | ENDIF |
---|
439 | # if defined key_roam |
---|
440 | IF ( med_diag%N_PROD%dgsave ) THEN |
---|
441 | CALL iom_put( "N_PROD" , fnit_prod ) |
---|
442 | ENDIF |
---|
443 | IF ( med_diag%N_CONS%dgsave ) THEN |
---|
444 | CALL iom_put( "N_CONS" , fnit_cons ) |
---|
445 | ENDIF |
---|
446 | IF ( med_diag%C_PROD%dgsave ) THEN |
---|
447 | CALL iom_put( "C_PROD" , fcar_prod ) |
---|
448 | ENDIF |
---|
449 | IF ( med_diag%C_CONS%dgsave ) THEN |
---|
450 | CALL iom_put( "C_CONS" , fcar_cons ) |
---|
451 | ENDIF |
---|
452 | IF ( med_diag%O2_PROD%dgsave ) THEN |
---|
453 | CALL iom_put( "O2_PROD" , foxy_prod ) |
---|
454 | ENDIF |
---|
455 | IF ( med_diag%O2_CONS%dgsave ) THEN |
---|
456 | CALL iom_put( "O2_CONS" , foxy_cons ) |
---|
457 | ENDIF |
---|
458 | IF ( med_diag%O2_ANOX%dgsave ) THEN |
---|
459 | CALL iom_put( "O2_ANOX" , foxy_anox ) |
---|
460 | ENDIF |
---|
461 | IF ( med_diag%INVTC%dgsave ) THEN |
---|
462 | CALL iom_put( "INVTC" , ftot_c ) |
---|
463 | ENDIF |
---|
464 | IF ( med_diag%INVTALK%dgsave ) THEN |
---|
465 | CALL iom_put( "INVTALK" , ftot_a ) |
---|
466 | ENDIF |
---|
467 | IF ( med_diag%INVTO2%dgsave ) THEN |
---|
468 | CALL iom_put( "INVTO2" , ftot_o2 ) |
---|
469 | ENDIF |
---|
470 | IF ( med_diag%COM_RESP%dgsave ) THEN |
---|
471 | CALL iom_put( "COM_RESP" , fcomm_resp ) |
---|
472 | ENDIF |
---|
473 | # endif |
---|
474 | !! |
---|
475 | !! diagnostic filled in the i-j-k main loop |
---|
476 | !!-------------------------------------------- |
---|
477 | IF ( med_diag%PRN%dgsave ) THEN |
---|
478 | CALL iom_put( "PRN" , fprn2d ) |
---|
479 | DEALLOCATE( fprn2d ) |
---|
480 | ENDIF |
---|
481 | IF ( med_diag%MPN%dgsave ) THEN |
---|
482 | CALL iom_put( "MPN" ,fdpn2d ) |
---|
483 | DEALLOCATE( fdpn2d ) |
---|
484 | ENDIF |
---|
485 | IF ( med_diag%PRD%dgsave ) THEN |
---|
486 | CALL iom_put( "PRD" ,fprd2d ) |
---|
487 | DEALLOCATE( fprd2d ) |
---|
488 | ENDIF |
---|
489 | IF( med_diag%MPD%dgsave ) THEN |
---|
490 | CALL iom_put( "MPD" , fdpd2d ) |
---|
491 | DEALLOCATE( fdpd2d ) |
---|
492 | ENDIF |
---|
493 | ! IF( med_diag%DSED%dgsave ) THEN |
---|
494 | ! CALL iom_put( "DSED" , ftot_n ) |
---|
495 | ! ENDIF |
---|
496 | IF( med_diag%OPAL%dgsave ) THEN |
---|
497 | CALL iom_put( "OPAL" , fprds2d ) |
---|
498 | DEALLOCATE( fprds2d ) |
---|
499 | ENDIF |
---|
500 | IF( med_diag%OPALDISS%dgsave ) THEN |
---|
501 | CALL iom_put( "OPALDISS" , fsdiss2d ) |
---|
502 | DEALLOCATE( fsdiss2d ) |
---|
503 | ENDIF |
---|
504 | IF( med_diag%GMIPn%dgsave ) THEN |
---|
505 | CALL iom_put( "GMIPn" , fgmipn2d ) |
---|
506 | DEALLOCATE( fgmipn2d ) |
---|
507 | ENDIF |
---|
508 | IF( med_diag%GMID%dgsave ) THEN |
---|
509 | CALL iom_put( "GMID" , fgmid2d ) |
---|
510 | DEALLOCATE( fgmid2d ) |
---|
511 | ENDIF |
---|
512 | IF( med_diag%MZMI%dgsave ) THEN |
---|
513 | CALL iom_put( "MZMI" , fdzmi2d ) |
---|
514 | DEALLOCATE( fdzmi2d ) |
---|
515 | ENDIF |
---|
516 | IF( med_diag%GMEPN%dgsave ) THEN |
---|
517 | CALL iom_put( "GMEPN" , fgmepn2d ) |
---|
518 | DEALLOCATE( fgmepn2d ) |
---|
519 | ENDIF |
---|
520 | IF( med_diag%GMEPD%dgsave ) THEN |
---|
521 | CALL iom_put( "GMEPD" , fgmepd2d ) |
---|
522 | DEALLOCATE( fgmepd2d ) |
---|
523 | ENDIF |
---|
524 | IF( med_diag%GMEZMI%dgsave ) THEN |
---|
525 | CALL iom_put( "GMEZMI" , fgmezmi2d ) |
---|
526 | DEALLOCATE( fgmezmi2d ) |
---|
527 | ENDIF |
---|
528 | IF( med_diag%GMED%dgsave ) THEN |
---|
529 | CALL iom_put( "GMED" , fgmed2d ) |
---|
530 | DEALLOCATE( fgmed2d ) |
---|
531 | ENDIF |
---|
532 | IF( med_diag%MZME%dgsave ) THEN |
---|
533 | CALL iom_put( "MZME" , fdzme2d ) |
---|
534 | DEALLOCATE( fdzme2d ) |
---|
535 | ENDIF |
---|
536 | ! IF( med_diag%DEXP%dgsave ) THEN |
---|
537 | ! CALL iom_put( "DEXP" , ftot_n ) |
---|
538 | ! ENDIF |
---|
539 | IF( med_diag%DETN%dgsave ) THEN |
---|
540 | CALL iom_put( "DETN" , fslown2d ) |
---|
541 | DEALLOCATE( fslown2d ) |
---|
542 | ENDIF |
---|
543 | IF( med_diag%MDET%dgsave ) THEN |
---|
544 | CALL iom_put( "MDET" , fdd2d ) |
---|
545 | DEALLOCATE( fdd2d ) |
---|
546 | ENDIF |
---|
547 | IF( med_diag%AEOLIAN%dgsave ) THEN |
---|
548 | CALL iom_put( "AEOLIAN" , ffetop2d ) |
---|
549 | DEALLOCATE( ffetop2d ) |
---|
550 | ENDIF |
---|
551 | IF( med_diag%BENTHIC%dgsave ) THEN |
---|
552 | CALL iom_put( "BENTHIC" , ffebot2d ) |
---|
553 | DEALLOCATE( ffebot2d ) |
---|
554 | ENDIF |
---|
555 | IF( med_diag%SCAVENGE%dgsave ) THEN |
---|
556 | CALL iom_put( "SCAVENGE" , ffescav2d ) |
---|
557 | DEALLOCATE( ffescav2d ) |
---|
558 | ENDIF |
---|
559 | !! |
---|
560 | IF( med_diag%TOTREG_N%dgsave ) THEN |
---|
561 | CALL iom_put( "TOTREG_N" , fregen2d ) |
---|
562 | DEALLOCATE( fregen2d ) |
---|
563 | ENDIF |
---|
564 | IF( med_diag%TOTRG_SI%dgsave ) THEN |
---|
565 | CALL iom_put( "TOTRG_SI" , fregensi2d ) |
---|
566 | DEALLOCATE( fregensi2d ) |
---|
567 | ENDIF |
---|
568 | !! |
---|
569 | IF( med_diag%FASTN%dgsave ) THEN |
---|
570 | CALL iom_put( "FASTN" , ftempn2d ) |
---|
571 | DEALLOCATE( ftempn2d ) |
---|
572 | ENDIF |
---|
573 | IF( med_diag%FASTSI%dgsave ) THEN |
---|
574 | CALL iom_put( "FASTSI" , ftempsi2d ) |
---|
575 | DEALLOCATE( ftempsi2d ) |
---|
576 | ENDIF |
---|
577 | IF( med_diag%FASTFE%dgsave ) THEN |
---|
578 | CALL iom_put( "FASTFE" , ftempfe2d ) |
---|
579 | DEALLOCATE( ftempfe2d ) |
---|
580 | ENDIF |
---|
581 | IF( med_diag%FASTC%dgsave ) THEN |
---|
582 | CALL iom_put( "FASTC" , ftempc2d ) |
---|
583 | DEALLOCATE( ftempc2d ) |
---|
584 | ENDIF |
---|
585 | IF( med_diag%FASTCA%dgsave ) THEN |
---|
586 | CALL iom_put( "FASTCA" , ftempca2d ) |
---|
587 | DEALLOCATE( ftempca2d ) |
---|
588 | ENDIF |
---|
589 | !! |
---|
590 | IF( med_diag%REMINN%dgsave ) THEN |
---|
591 | CALL iom_put( "REMINN" , freminn2d ) |
---|
592 | DEALLOCATE( freminn2d ) |
---|
593 | ENDIF |
---|
594 | IF( med_diag%REMINSI%dgsave ) THEN |
---|
595 | CALL iom_put( "REMINSI" , freminsi2d ) |
---|
596 | DEALLOCATE( freminsi2d ) |
---|
597 | ENDIF |
---|
598 | IF( med_diag%REMINFE%dgsave ) THEN |
---|
599 | CALL iom_put( "REMINFE" , freminfe2d ) |
---|
600 | DEALLOCATE( freminfe2d ) |
---|
601 | ENDIF |
---|
602 | IF( med_diag%REMINC%dgsave ) THEN |
---|
603 | CALL iom_put( "REMINC" , freminc2d ) |
---|
604 | DEALLOCATE( freminc2d ) |
---|
605 | ENDIF |
---|
606 | IF( med_diag%REMINCA%dgsave ) THEN |
---|
607 | CALL iom_put( "REMINCA" , freminca2d ) |
---|
608 | DEALLOCATE( freminca2d ) |
---|
609 | ENDIF |
---|
610 | IF( med_diag%SEAFLRN%dgsave ) THEN |
---|
611 | CALL iom_put( "SEAFLRN" , fsedn ) |
---|
612 | ENDIF |
---|
613 | IF( med_diag%SEAFLRSI%dgsave ) THEN |
---|
614 | CALL iom_put( "SEAFLRSI" , fsedsi ) |
---|
615 | ENDIF |
---|
616 | IF( med_diag%SEAFLRFE%dgsave ) THEN |
---|
617 | CALL iom_put( "SEAFLRFE" , fsedfe ) |
---|
618 | ENDIF |
---|
619 | IF( med_diag%SEAFLRC%dgsave ) THEN |
---|
620 | CALL iom_put( "SEAFLRC" , fsedc ) |
---|
621 | ENDIF |
---|
622 | IF( med_diag%SEAFLRCA%dgsave ) THEN |
---|
623 | CALL iom_put( "SEAFLRCA" , fsedca ) |
---|
624 | ENDIF |
---|
625 | !! |
---|
626 | # if defined key_roam |
---|
627 | !! |
---|
628 | IF( med_diag%RIV_N%dgsave ) THEN |
---|
629 | CALL iom_put( "RIV_N" , rivn2d ) |
---|
630 | DEALLOCATE( rivn2d ) |
---|
631 | ENDIF |
---|
632 | IF( med_diag%RIV_SI%dgsave ) THEN |
---|
633 | CALL iom_put( "RIV_SI" , rivsi2d ) |
---|
634 | DEALLOCATE( rivsi2d ) |
---|
635 | ENDIF |
---|
636 | IF( med_diag%RIV_C%dgsave ) THEN |
---|
637 | CALL iom_put( "RIV_C" , rivc2d ) |
---|
638 | DEALLOCATE( rivc2d ) |
---|
639 | ENDIF |
---|
640 | IF( med_diag%RIV_ALK%dgsave ) THEN |
---|
641 | CALL iom_put( "RIV_ALK" , rivalk2d ) |
---|
642 | DEALLOCATE( rivalk2d ) |
---|
643 | ENDIF |
---|
644 | IF( med_diag%DETC%dgsave ) THEN |
---|
645 | CALL iom_put( "DETC" , fslowc2d ) |
---|
646 | DEALLOCATE( fslowc2d ) |
---|
647 | ENDIF |
---|
648 | !! |
---|
649 | IF( med_diag%PN_LLOSS%dgsave ) THEN |
---|
650 | CALL iom_put( "PN_LLOSS" , fdpn22d ) |
---|
651 | DEALLOCATE( fdpn22d ) |
---|
652 | ENDIF |
---|
653 | IF( med_diag%PD_LLOSS%dgsave ) THEN |
---|
654 | CALL iom_put( "PD_LLOSS" , fdpd22d ) |
---|
655 | DEALLOCATE( fdpd22d ) |
---|
656 | ENDIF |
---|
657 | IF( med_diag%ZI_LLOSS%dgsave ) THEN |
---|
658 | CALL iom_put( "ZI_LLOSS" , fdzmi22d ) |
---|
659 | DEALLOCATE( fdzmi22d ) |
---|
660 | ENDIF |
---|
661 | IF( med_diag%ZE_LLOSS%dgsave ) THEN |
---|
662 | CALL iom_put( "ZE_LLOSS" , fdzme22d ) |
---|
663 | DEALLOCATE( fdzme22d ) |
---|
664 | ENDIF |
---|
665 | IF( med_diag%ZI_MES_N%dgsave ) THEN |
---|
666 | CALL iom_put( "ZI_MES_N" , zimesn2d ) |
---|
667 | DEALLOCATE( zimesn2d ) |
---|
668 | ENDIF |
---|
669 | IF( med_diag%ZI_MES_D%dgsave ) THEN |
---|
670 | CALL iom_put( "ZI_MES_D" , zimesd2d ) |
---|
671 | DEALLOCATE( zimesd2d ) |
---|
672 | ENDIF |
---|
673 | IF( med_diag%ZI_MES_C%dgsave ) THEN |
---|
674 | CALL iom_put( "ZI_MES_C" , zimesc2d ) |
---|
675 | DEALLOCATE( zimesc2d ) |
---|
676 | ENDIF |
---|
677 | IF( med_diag%ZI_MESDC%dgsave ) THEN |
---|
678 | CALL iom_put( "ZI_MESDC" ,zimesdc2d ) |
---|
679 | DEALLOCATE( zimesdc2d ) |
---|
680 | ENDIF |
---|
681 | IF( med_diag%ZI_EXCR%dgsave ) THEN |
---|
682 | CALL iom_put( "ZI_EXCR" , ziexcr2d ) |
---|
683 | DEALLOCATE( ziexcr2d ) |
---|
684 | ENDIF |
---|
685 | IF( med_diag%ZI_RESP%dgsave ) THEN |
---|
686 | CALL iom_put( "ZI_RESP" , ziresp2d ) |
---|
687 | DEALLOCATE( ziresp2d ) |
---|
688 | ENDIF |
---|
689 | IF( med_diag%ZI_GROW%dgsave ) THEN |
---|
690 | CALL iom_put( "ZI_GROW" , zigrow2d ) |
---|
691 | DEALLOCATE( zigrow2d ) |
---|
692 | ENDIF |
---|
693 | IF( med_diag%ZE_MES_N%dgsave ) THEN |
---|
694 | CALL iom_put( "ZE_MES_N" , zemesn2d ) |
---|
695 | DEALLOCATE( zemesn2d ) |
---|
696 | ENDIF |
---|
697 | IF( med_diag%ZE_MES_D%dgsave ) THEN |
---|
698 | CALL iom_put( "ZE_MES_D" , zemesd2d ) |
---|
699 | DEALLOCATE( zemesd2d ) |
---|
700 | ENDIF |
---|
701 | IF( med_diag%ZE_MES_C%dgsave ) THEN |
---|
702 | CALL iom_put( "ZE_MES_C" , zemesc2d ) |
---|
703 | DEALLOCATE( zemesc2d ) |
---|
704 | ENDIF |
---|
705 | IF( med_diag%ZE_MESDC%dgsave ) THEN |
---|
706 | CALL iom_put( "ZE_MESDC" , zemesdc2d ) |
---|
707 | DEALLOCATE( zemesdc2d ) |
---|
708 | ENDIF |
---|
709 | IF( med_diag%ZE_EXCR%dgsave ) THEN |
---|
710 | CALL iom_put( "ZE_EXCR" , zeexcr2d ) |
---|
711 | DEALLOCATE( zeexcr2d ) |
---|
712 | ENDIF |
---|
713 | IF( med_diag%ZE_RESP%dgsave ) THEN |
---|
714 | CALL iom_put( "ZE_RESP" , zeresp2d ) |
---|
715 | DEALLOCATE( zeresp2d ) |
---|
716 | ENDIF |
---|
717 | IF( med_diag%ZE_GROW%dgsave ) THEN |
---|
718 | CALL iom_put( "ZE_GROW" , zegrow2d ) |
---|
719 | DEALLOCATE( zegrow2d ) |
---|
720 | ENDIF |
---|
721 | IF( med_diag%MDETC%dgsave ) THEN |
---|
722 | CALL iom_put( "MDETC" , mdetc2d ) |
---|
723 | DEALLOCATE( mdetc2d ) |
---|
724 | ENDIF |
---|
725 | IF( med_diag%GMIDC%dgsave ) THEN |
---|
726 | CALL iom_put( "GMIDC" , gmidc2d ) |
---|
727 | DEALLOCATE( gmidc2d ) |
---|
728 | ENDIF |
---|
729 | IF( med_diag%GMEDC%dgsave ) THEN |
---|
730 | CALL iom_put( "GMEDC" , gmedc2d ) |
---|
731 | DEALLOCATE( gmedc2d ) |
---|
732 | ENDIF |
---|
733 | IF( med_diag%IBEN_N%dgsave ) THEN |
---|
734 | CALL iom_put( "IBEN_N" , iben_n2d ) |
---|
735 | DEALLOCATE( iben_n2d ) |
---|
736 | ENDIF |
---|
737 | IF( med_diag%IBEN_FE%dgsave ) THEN |
---|
738 | CALL iom_put( "IBEN_FE" , iben_fe2d ) |
---|
739 | DEALLOCATE( iben_fe2d ) |
---|
740 | ENDIF |
---|
741 | IF( med_diag%IBEN_C%dgsave ) THEN |
---|
742 | CALL iom_put( "IBEN_C" , iben_c2d ) |
---|
743 | DEALLOCATE( iben_c2d ) |
---|
744 | ENDIF |
---|
745 | IF( med_diag%IBEN_SI%dgsave ) THEN |
---|
746 | CALL iom_put( "IBEN_SI" , iben_si2d ) |
---|
747 | DEALLOCATE( iben_si2d ) |
---|
748 | ENDIF |
---|
749 | IF( med_diag%IBEN_CA%dgsave ) THEN |
---|
750 | CALL iom_put( "IBEN_CA" , iben_ca2d ) |
---|
751 | DEALLOCATE( iben_ca2d ) |
---|
752 | ENDIF |
---|
753 | IF( med_diag%OBEN_N%dgsave ) THEN |
---|
754 | CALL iom_put( "OBEN_N" , oben_n2d ) |
---|
755 | DEALLOCATE( oben_n2d ) |
---|
756 | ENDIF |
---|
757 | IF( med_diag%OBEN_FE%dgsave ) THEN |
---|
758 | CALL iom_put( "OBEN_FE" , oben_fe2d ) |
---|
759 | DEALLOCATE( oben_fe2d ) |
---|
760 | ENDIF |
---|
761 | IF( med_diag%OBEN_C%dgsave ) THEN |
---|
762 | CALL iom_put( "OBEN_C" , oben_c2d ) |
---|
763 | DEALLOCATE( oben_c2d ) |
---|
764 | ENDIF |
---|
765 | IF( med_diag%OBEN_SI%dgsave ) THEN |
---|
766 | CALL iom_put( "OBEN_SI" , oben_si2d ) |
---|
767 | DEALLOCATE( oben_si2d ) |
---|
768 | ENDIF |
---|
769 | IF( med_diag%OBEN_CA%dgsave ) THEN |
---|
770 | CALL iom_put( "OBEN_CA" , oben_ca2d ) |
---|
771 | DEALLOCATE( oben_ca2d ) |
---|
772 | ENDIF |
---|
773 | IF( med_diag%SFR_OCAL%dgsave ) THEN |
---|
774 | CALL iom_put( "SFR_OCAL" , sfr_ocal2d ) |
---|
775 | DEALLOCATE( sfr_ocal2d ) |
---|
776 | ENDIF |
---|
777 | IF( med_diag%SFR_OARG%dgsave ) THEN |
---|
778 | CALL iom_put( "SFR_OARG" , sfr_oarg2d ) |
---|
779 | DEALLOCATE( sfr_oarg2d ) |
---|
780 | ENDIF |
---|
781 | IF( med_diag%LYSO_CA%dgsave ) THEN |
---|
782 | CALL iom_put( "LYSO_CA" , lyso_ca2d ) |
---|
783 | DEALLOCATE( lyso_ca2d ) |
---|
784 | ENDIF |
---|
785 | # endif |
---|
786 | !! |
---|
787 | !! ** 3D diagnostics |
---|
788 | IF( med_diag%TPP3%dgsave ) THEN |
---|
789 | CALL iom_put( "TPP3" , tpp3d ) |
---|
790 | DEALLOCATE( tpp3d ) |
---|
791 | ENDIF |
---|
792 | IF( med_diag%DETFLUX3%dgsave ) THEN |
---|
793 | CALL iom_put( "DETFLUX3" , detflux3d ) |
---|
794 | DEALLOCATE( detflux3d ) |
---|
795 | ENDIF |
---|
796 | IF( med_diag%REMIN3N%dgsave ) THEN |
---|
797 | CALL iom_put( "REMIN3N" , remin3dn ) |
---|
798 | DEALLOCATE( remin3dn ) |
---|
799 | ENDIF |
---|
800 | # if defined key_roam |
---|
801 | IF( med_diag%PH3%dgsave ) THEN |
---|
802 | CALL iom_put( "PH3" , f3_pH ) |
---|
803 | ENDIF |
---|
804 | IF( med_diag%OM_CAL3%dgsave ) THEN |
---|
805 | CALL iom_put( "OM_CAL3" , f3_omcal ) |
---|
806 | ENDIF |
---|
807 | !! |
---|
808 | !! AXY (09/11/16): 2D CMIP6 diagnostics |
---|
809 | IF( med_diag%INTDISSIC%dgsave ) THEN |
---|
810 | CALL iom_put( "INTDISSIC" , intdissic ) |
---|
811 | DEALLOCATE( intdissic ) |
---|
812 | ENDIF |
---|
813 | IF( med_diag%INTDISSIN%dgsave ) THEN |
---|
814 | CALL iom_put( "INTDISSIN" , intdissin ) |
---|
815 | DEALLOCATE( intdissin ) |
---|
816 | ENDIF |
---|
817 | IF( med_diag%INTDISSISI%dgsave ) THEN |
---|
818 | CALL iom_put( "INTDISSISI" , intdissisi ) |
---|
819 | DEALLOCATE( intdissisi ) |
---|
820 | ENDIF |
---|
821 | IF( med_diag%INTTALK%dgsave ) THEN |
---|
822 | CALL iom_put( "INTTALK" , inttalk ) |
---|
823 | DEALLOCATE( inttalk ) |
---|
824 | ENDIF |
---|
825 | IF( med_diag%O2min%dgsave ) THEN |
---|
826 | CALL iom_put( "O2min" , o2min ) |
---|
827 | DEALLOCATE( o2min ) |
---|
828 | ENDIF |
---|
829 | IF( med_diag%ZO2min%dgsave ) THEN |
---|
830 | CALL iom_put( "ZO2min" , zo2min ) |
---|
831 | DEALLOCATE( zo2min ) |
---|
832 | ENDIF |
---|
833 | IF( med_diag%FBDDTALK%dgsave ) THEN |
---|
834 | CALL iom_put( "FBDDTALK" , fbddtalk ) |
---|
835 | DEALLOCATE( fbddtalk ) |
---|
836 | ENDIF |
---|
837 | IF( med_diag%FBDDTDIC%dgsave ) THEN |
---|
838 | CALL iom_put( "FBDDTDIC" , fbddtdic ) |
---|
839 | DEALLOCATE( fbddtdic ) |
---|
840 | ENDIF |
---|
841 | IF( med_diag%FBDDTDIFE%dgsave ) THEN |
---|
842 | CALL iom_put( "FBDDTDIFE" , fbddtdife ) |
---|
843 | DEALLOCATE( fbddtdife ) |
---|
844 | ENDIF |
---|
845 | IF( med_diag%FBDDTDIN%dgsave ) THEN |
---|
846 | CALL iom_put( "FBDDTDIN" , fbddtdin ) |
---|
847 | DEALLOCATE( fbddtdin ) |
---|
848 | ENDIF |
---|
849 | IF( med_diag%FBDDTDISI%dgsave ) THEN |
---|
850 | CALL iom_put( "FBDDTDISI" , fbddtdisi ) |
---|
851 | DEALLOCATE( fbddtdisi ) |
---|
852 | ENDIF |
---|
853 | !! |
---|
854 | !! AXY (09/11/16): 3D CMIP6 diagnostics |
---|
855 | IF( med_diag%TPPD3%dgsave ) THEN |
---|
856 | CALL iom_put( "TPPD3" , tppd3 ) |
---|
857 | DEALLOCATE( tppd3 ) |
---|
858 | ENDIF |
---|
859 | IF( med_diag%BDDTALK3%dgsave ) THEN |
---|
860 | CALL iom_put( "BDDTALK3" , bddtalk3 ) |
---|
861 | DEALLOCATE( bddtalk3 ) |
---|
862 | ENDIF |
---|
863 | IF( med_diag%BDDTDIC3%dgsave ) THEN |
---|
864 | CALL iom_put( "BDDTDIC3" , bddtdic3 ) |
---|
865 | DEALLOCATE( bddtdic3 ) |
---|
866 | ENDIF |
---|
867 | IF( med_diag%BDDTDIFE3%dgsave ) THEN |
---|
868 | CALL iom_put( "BDDTDIFE3" , bddtdife3 ) |
---|
869 | DEALLOCATE( bddtdife3 ) |
---|
870 | ENDIF |
---|
871 | IF( med_diag%BDDTDIN3%dgsave ) THEN |
---|
872 | CALL iom_put( "BDDTDIN3" , bddtdin3 ) |
---|
873 | DEALLOCATE( bddtdin3 ) |
---|
874 | ENDIF |
---|
875 | IF( med_diag%BDDTDISI3%dgsave ) THEN |
---|
876 | CALL iom_put( "BDDTDISI3" , bddtdisi3 ) |
---|
877 | DEALLOCATE( bddtdisi3 ) |
---|
878 | ENDIF |
---|
879 | IF( med_diag%FD_NIT3%dgsave ) THEN |
---|
880 | CALL iom_put( "FD_NIT3" , fd_nit3 ) |
---|
881 | DEALLOCATE( fd_nit3 ) |
---|
882 | ENDIF |
---|
883 | IF( med_diag%FD_SIL3%dgsave ) THEN |
---|
884 | CALL iom_put( "FD_SIL3" , fd_sil3 ) |
---|
885 | DEALLOCATE( fd_sil3 ) |
---|
886 | ENDIF |
---|
887 | IF( med_diag%FD_CAL3%dgsave ) THEN |
---|
888 | CALL iom_put( "FD_CAL3" , fd_cal3 ) |
---|
889 | DEALLOCATE( fd_cal3 ) |
---|
890 | ENDIF |
---|
891 | IF( med_diag%FD_CAR3%dgsave ) THEN |
---|
892 | CALL iom_put( "FD_CAR3" , fd_car3 ) |
---|
893 | DEALLOCATE( fd_car3 ) |
---|
894 | ENDIF |
---|
895 | IF( med_diag%CO33%dgsave ) THEN |
---|
896 | CALL iom_put( "CO33" , f3_co3 ) |
---|
897 | ENDIF |
---|
898 | IF( med_diag%CO3SATARAG3%dgsave ) THEN |
---|
899 | CALL iom_put( "CO3SATARAG3" , f3_omarg ) |
---|
900 | ENDIF |
---|
901 | IF( med_diag%CO3SATCALC3%dgsave ) THEN |
---|
902 | CALL iom_put( "CO3SATCALC3" , f3_omcal ) |
---|
903 | ENDIF |
---|
904 | IF( med_diag%EXPC3%dgsave ) THEN |
---|
905 | CALL iom_put( "EXPC3" , expc3 ) |
---|
906 | DEALLOCATE( expc3 ) |
---|
907 | ENDIF |
---|
908 | IF( med_diag%EXPN3%dgsave ) THEN |
---|
909 | CALL iom_put( "EXPN3" , expn3 ) |
---|
910 | DEALLOCATE( expn3 ) |
---|
911 | ENDIF |
---|
912 | IF( med_diag%DCALC3%dgsave ) THEN |
---|
913 | CALL iom_put( "DCALC3" , dcalc3 ) |
---|
914 | DEALLOCATE( dcalc3 ) |
---|
915 | ENDIF |
---|
916 | IF( med_diag%FEDISS3%dgsave ) THEN |
---|
917 | CALL iom_put( "FEDISS3" , fediss3 ) |
---|
918 | DEALLOCATE( fediss3 ) |
---|
919 | ENDIF |
---|
920 | IF( med_diag%FESCAV3%dgsave ) THEN |
---|
921 | CALL iom_put( "FESCAV3" , fescav3 ) |
---|
922 | DEALLOCATE( fescav3 ) |
---|
923 | ENDIF |
---|
924 | IF( med_diag%MIGRAZP3%dgsave ) THEN |
---|
925 | CALL iom_put( "MIGRAZP3" , migrazp3 ) |
---|
926 | DEALLOCATE( migrazp3 ) |
---|
927 | ENDIF |
---|
928 | IF( med_diag%MIGRAZD3%dgsave ) THEN |
---|
929 | CALL iom_put( "MIGRAZD3" , migrazd3 ) |
---|
930 | DEALLOCATE( migrazd3 ) |
---|
931 | ENDIF |
---|
932 | IF( med_diag%MEGRAZP3%dgsave ) THEN |
---|
933 | CALL iom_put( "MEGRAZP3" , megrazp3 ) |
---|
934 | DEALLOCATE( megrazp3 ) |
---|
935 | ENDIF |
---|
936 | IF( med_diag%MEGRAZD3%dgsave ) THEN |
---|
937 | CALL iom_put( "MEGRAZD3" , megrazd3 ) |
---|
938 | DEALLOCATE( megrazd3 ) |
---|
939 | ENDIF |
---|
940 | IF( med_diag%MEGRAZZ3%dgsave ) THEN |
---|
941 | CALL iom_put( "MEGRAZZ3" , megrazz3 ) |
---|
942 | DEALLOCATE( megrazz3 ) |
---|
943 | ENDIF |
---|
944 | IF( med_diag%O2SAT3%dgsave ) THEN |
---|
945 | CALL iom_put( "O2SAT3" , o2sat3 ) |
---|
946 | DEALLOCATE( o2sat3 ) |
---|
947 | ENDIF |
---|
948 | IF( med_diag%PBSI3%dgsave ) THEN |
---|
949 | CALL iom_put( "PBSI3" , pbsi3 ) |
---|
950 | DEALLOCATE( pbsi3 ) |
---|
951 | ENDIF |
---|
952 | IF( med_diag%PCAL3%dgsave ) THEN |
---|
953 | CALL iom_put( "PCAL3" , pcal3 ) |
---|
954 | DEALLOCATE( pcal3 ) |
---|
955 | ENDIF |
---|
956 | IF( med_diag%REMOC3%dgsave ) THEN |
---|
957 | CALL iom_put( "REMOC3" , remoc3 ) |
---|
958 | DEALLOCATE( remoc3 ) |
---|
959 | ENDIF |
---|
960 | IF( med_diag%PNLIMJ3%dgsave ) THEN |
---|
961 | CALL iom_put( "PNLIMJ3" , pnlimj3 ) |
---|
962 | DEALLOCATE( pnlimj3 ) |
---|
963 | ENDIF |
---|
964 | IF( med_diag%PNLIMN3%dgsave ) THEN |
---|
965 | CALL iom_put( "PNLIMN3" , pnlimn3 ) |
---|
966 | DEALLOCATE( pnlimn3 ) |
---|
967 | ENDIF |
---|
968 | IF( med_diag%PNLIMFE3%dgsave ) THEN |
---|
969 | CALL iom_put( "PNLIMFE3" , pnlimfe3 ) |
---|
970 | DEALLOCATE( pnlimfe3 ) |
---|
971 | ENDIF |
---|
972 | IF( med_diag%PDLIMJ3%dgsave ) THEN |
---|
973 | CALL iom_put( "PDLIMJ3" , pdlimj3 ) |
---|
974 | DEALLOCATE( pdlimj3 ) |
---|
975 | ENDIF |
---|
976 | IF( med_diag%PDLIMN3%dgsave ) THEN |
---|
977 | CALL iom_put( "PDLIMN3" , pdlimn3 ) |
---|
978 | DEALLOCATE( pdlimn3 ) |
---|
979 | ENDIF |
---|
980 | IF( med_diag%PDLIMFE3%dgsave ) THEN |
---|
981 | CALL iom_put( "PDLIMFE3" , pdlimfe3 ) |
---|
982 | DEALLOCATE( pdlimfe3 ) |
---|
983 | ENDIF |
---|
984 | IF( med_diag%PDLIMSI3%dgsave ) THEN |
---|
985 | CALL iom_put( "PDLIMSI3" , pdlimsi3 ) |
---|
986 | DEALLOCATE( pdlimsi3 ) |
---|
987 | ENDIF |
---|
988 | |
---|
989 | # endif |
---|
990 | |
---|
991 | DEALLOCATE( zw2d ) |
---|
992 | |
---|
993 | END SUBROUTINE bio_medusa_fin |
---|
994 | |
---|
995 | #else |
---|
996 | !!====================================================================== |
---|
997 | !! Dummy module : No MEDUSA bio-model |
---|
998 | !!====================================================================== |
---|
999 | CONTAINS |
---|
1000 | SUBROUTINE bio_medusa_fin( ) ! Empty routine |
---|
1001 | WRITE(*,*) 'bio_medusa_fin: You should not have seen this print! error?' |
---|
1002 | END SUBROUTINE bio_medusa_fin |
---|
1003 | #endif |
---|
1004 | |
---|
1005 | !!====================================================================== |
---|
1006 | END MODULE bio_medusa_fin_mod |
---|