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