1 | MODULE bio_medusa_mod |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE bio_medusa_mod *** |
---|
4 | !! MEDUSA variables : module for MEDUSA variables which are shared |
---|
5 | !! across subroutines |
---|
6 | !!====================================================================== |
---|
7 | !! History : |
---|
8 | !! - ! 2017-04 (M. Stringer) Code taken from trcbio_medusa.F90 |
---|
9 | !! - ! 2017-08 (A. Yool) Slow detritus, ML-avg chl variables |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | #if defined key_medusa |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! 'key_medusa' MEDUSA |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | !! Variable conventions |
---|
16 | !!---------------------------------------------------------------------- |
---|
17 | !! |
---|
18 | !! names: z*** - state variable |
---|
19 | !! f*** - function (or temporary variable used in part of a function) |
---|
20 | !! b*** - right-hand part (sources and sinks) |
---|
21 | !! i*** - integer variable (usually used in yes/no flags) |
---|
22 | !!---------------------------------------------------------------------- |
---|
23 | USE par_kind, ONLY: wp |
---|
24 | |
---|
25 | IMPLICIT NONE |
---|
26 | PUBLIC |
---|
27 | |
---|
28 | PUBLIC bio_medusa_alloc ! called by trcini.F90 |
---|
29 | |
---|
30 | !! model state variables |
---|
31 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zchn,zchd,zphn,zphd,zpds,zzmi |
---|
32 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zzme,zdet,zdtc,zdin,zsil,zfer |
---|
33 | # if defined key_roam |
---|
34 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdic, zalk, zoxy |
---|
35 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ztmp, zsal |
---|
36 | # endif |
---|
37 | # if defined key_mocsy |
---|
38 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zpho |
---|
39 | # endif |
---|
40 | |
---|
41 | !! integrated source and sink terms |
---|
42 | REAL(wp) :: b0 |
---|
43 | |
---|
44 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fthetan,fprn,frn |
---|
45 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fthetad,fprd,frd |
---|
46 | |
---|
47 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fjlim_pn,fjlim_pd |
---|
48 | !! AXY (16/07/09): add in Eppley curve functionality |
---|
49 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fun_T,xvpnT,xvpdT |
---|
50 | |
---|
51 | !! AXY (16/05/11): per Katya's prompting, add in new T-dependence |
---|
52 | !! for phytoplankton growth only (i.e. no change |
---|
53 | !! for remineralisation) |
---|
54 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fun_Q10 |
---|
55 | !! AXY (01/03/10): add in mixed layer PP diagnostics |
---|
56 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprn_ml,fprd_ml |
---|
57 | !! AXY (16/08/17): add in mixed layer chlorophyll diagnostic |
---|
58 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fchl_ml |
---|
59 | !! |
---|
60 | !! nutrient limiting factors |
---|
61 | !! N and Fe (renaming ffln to ffln2 to avoid conflict with |
---|
62 | !! ffln in module sms_medusa - marc 25/4/17) |
---|
63 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnln,ffln2 |
---|
64 | !! N, Fe and Si |
---|
65 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnld,ffld,fsld,fsld2 |
---|
66 | !! |
---|
67 | !! silicon cycle |
---|
68 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsin,fprds,fsdiss |
---|
69 | |
---|
70 | !! iron cycle; includes parameters for Parekh et al. (2005) iron scheme |
---|
71 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffetop,ffebot,ffescav |
---|
72 | !! Variable for iron-ligand system |
---|
73 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: xFree |
---|
74 | |
---|
75 | !! Microzooplankton grazing |
---|
76 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmipn,fgmid,fgmidc |
---|
77 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: finmi,ficmi |
---|
78 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fmigrow,fmiexcr,fmiresp |
---|
79 | !! |
---|
80 | !! Mesozooplankton grazing |
---|
81 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmepn,fgmepd |
---|
82 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmepds,fgmezmi,fgmed,fgmedc |
---|
83 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: finme,ficme |
---|
84 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fmegrow,fmeexcr,fmeresp |
---|
85 | !! |
---|
86 | !! mortality/Remineralisation |
---|
87 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdpn,fdpd,fdpds,fdzmi,fdzme,fdd |
---|
88 | # if defined key_roam |
---|
89 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fddc |
---|
90 | # endif |
---|
91 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdpn2,fdpd2,fdpds2,fdzmi2,fdzme2 |
---|
92 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslown, fslowc |
---|
93 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslownflux, fslowcflux |
---|
94 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregen,fregensi |
---|
95 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregenfast,fregenfastsi |
---|
96 | # if defined key_roam |
---|
97 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregenfastc |
---|
98 | # endif |
---|
99 | !! |
---|
100 | !! AXY (08/08/17): sinking of detritus moved here |
---|
101 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslowsink, fslowgain, fslowloss |
---|
102 | # if defined key_roam |
---|
103 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslowsinkc, fslowgainc, fslowlossc |
---|
104 | # endif |
---|
105 | !! |
---|
106 | !! Particle flux |
---|
107 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdep1 |
---|
108 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempn,ftempsi,ftempfe |
---|
109 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempc,ftempca |
---|
110 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminn,freminsi,freminfe |
---|
111 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminc,freminca |
---|
112 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastn,ffastsi,ffastfe |
---|
113 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastc,ffastca |
---|
114 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsedn,fsedsi,fsedfe,fsedc,fsedca |
---|
115 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fccd |
---|
116 | |
---|
117 | !! AXY (08/07/11): fate of fast detritus reaching the seafloor |
---|
118 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffast2slown,ffast2slowc |
---|
119 | |
---|
120 | !! water column nutrient and flux integrals |
---|
121 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_n,ftot_si,ftot_fe |
---|
122 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fflx_n,fflx_si,fflx_fe |
---|
123 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_n,fifd_si,fifd_fe |
---|
124 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_n,fofd_si,fofd_fe |
---|
125 | # if defined key_roam |
---|
126 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_c,ftot_a,ftot_o2 |
---|
127 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fflx_c,fflx_a,fflx_o2 |
---|
128 | ! I don't think fifd_a, fifd_o2, fofd_a or fofd_o2 are used - marc 11/5/17 |
---|
129 | ! REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c,fifd_a,fifd_o2 |
---|
130 | ! REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c,fofd_a,fofd_o2 |
---|
131 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c |
---|
132 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c |
---|
133 | # endif |
---|
134 | |
---|
135 | !! Zooplankton grazing integrals |
---|
136 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fzmi_i,fzmi_o,fzme_i,fzme_o |
---|
137 | |
---|
138 | !! Limitation term temporary variables |
---|
139 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_pn,ftot_pd |
---|
140 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_zmi,ftot_zme,ftot_det,ftot_dtc |
---|
141 | |
---|
142 | !! use biological fluxes (1) or not (0) |
---|
143 | INTEGER :: ibio_switch |
---|
144 | !! |
---|
145 | !! diagnose fluxes (should only be used in 1D runs) |
---|
146 | INTEGER :: idf, idfval |
---|
147 | |
---|
148 | !! Nitrogen and silicon production and consumption |
---|
149 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnit_prod,fnit_cons |
---|
150 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsil_prod,fsil_cons |
---|
151 | |
---|
152 | # if defined key_roam |
---|
153 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_xco2a |
---|
154 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ph,f_pco2w,f_h2co3 |
---|
155 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_hco3,f_co3,f_co2flux |
---|
156 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_TDIC,f_TALK,f_dcf,f_henry |
---|
157 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pp0 |
---|
158 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_kw660,f_o2flux,f_o2sat |
---|
159 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_omcal,f_omarg |
---|
160 | |
---|
161 | !! AXY (23/06/15): additional diagnostics for MOCSY and oxygen |
---|
162 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pco2atm |
---|
163 | |
---|
164 | !! Carbon, alkalinity production and consumption |
---|
165 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fcomm_resp |
---|
166 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fcar_prod,fcar_cons |
---|
167 | |
---|
168 | !! Oxygen production and consumption (and non-consumption) |
---|
169 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: foxy_prod,foxy_cons,foxy_anox |
---|
170 | |
---|
171 | !! Add DMS in MEDUSA for UKESM1 model |
---|
172 | REAL(wp) :: dms_surf,dms_andm |
---|
173 | !! AXY (13/03/15): add in other DMS calculations |
---|
174 | REAL(wp) :: dms_andr,dms_simo,dms_aran,dms_hall |
---|
175 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_nlim, dms_wtkn |
---|
176 | # endif |
---|
177 | |
---|
178 | !! Benthic fluxes |
---|
179 | INTEGER :: ibenthic |
---|
180 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_sbenin_n,f_sbenin_fe,f_sbenin_c |
---|
181 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_fbenin_n,f_fbenin_fe,f_fbenin_si |
---|
182 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_fbenin_c,f_fbenin_ca |
---|
183 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_n,f_benout_fe,f_benout_si |
---|
184 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_c,f_benout_ca |
---|
185 | |
---|
186 | !! Benthic fluxes of CaCO3 that shouldn't happen because of lysocline |
---|
187 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_lyso_ca |
---|
188 | |
---|
189 | !! riverine fluxes |
---|
190 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_runoff,f_riv_n,f_riv_si |
---|
191 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_riv_c,f_riv_alk |
---|
192 | !! AXY (19/07/12): variables for local riverine fluxes to handle |
---|
193 | !! inputs below surface |
---|
194 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_riv_loc_n,f_riv_loc_si |
---|
195 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_riv_loc_c, f_riv_loc_alk |
---|
196 | |
---|
197 | !! Jpalm -- 11-10-2015 -- adapt diag to iom_use |
---|
198 | !! 2D var for diagnostics. |
---|
199 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprn2d, fdpn2d, fprd2d, fdpd2d |
---|
200 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprds2d, fsdiss2d, fgmipn2d |
---|
201 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmid2d, fdzmi2d, fgmepn2d |
---|
202 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmepd2d, fgmezmi2d, fgmed2d |
---|
203 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdzme2d, fslown2d, fdd2d |
---|
204 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffetop2d, ffebot2d, ffescav2d |
---|
205 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fjln2d, fnln2d, ffln2d, fjld2d |
---|
206 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnld2d, ffld2d, fsld2d2 |
---|
207 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsld2d, fregen2d, fregensi2d |
---|
208 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempn2d, ftempsi2d, ftempfe2d |
---|
209 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempc2d, ftempca2d, freminn2d |
---|
210 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminsi2d, freminfe2d |
---|
211 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminc2d, freminca2d |
---|
212 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zw2d |
---|
213 | # if defined key_roam |
---|
214 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastca2d, rivn2d, rivsi2d |
---|
215 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: rivc2d, rivalk2d, fslowc2d |
---|
216 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdpn22d, fdpd22d, fdzmi22d |
---|
217 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdzme22d, zimesn2d, zimesd2d |
---|
218 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zimesc2d, zimesdc2d, ziexcr2d |
---|
219 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ziresp2d, zigrow2d, zemesn2d |
---|
220 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zemesd2d, zemesc2d, zemesdc2d |
---|
221 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zeexcr2d, zeresp2d, zegrow2d |
---|
222 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: mdetc2d, gmidc2d, gmedc2d |
---|
223 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pco2a2d, f_pco2w2d, f_co2flux2d |
---|
224 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_TDIC2d, f_TALK2d, f_kw6602d |
---|
225 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pp02d, f_o2flux2d, f_o2sat2d |
---|
226 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_andr2d, dms_simo2d, dms_aran2d |
---|
227 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_hall2d, dms_andm2d, dms_surf2d |
---|
228 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: iben_n2d, iben_fe2d, iben_c2d |
---|
229 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: iben_si2d, iben_ca2d, oben_n2d |
---|
230 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: oben_fe2d, oben_c2d, oben_si2d |
---|
231 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: oben_ca2d, sfr_ocal2d |
---|
232 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: sfr_oarg2d, lyso_ca2d |
---|
233 | !! AXY (23/11/16): extra MOCSY diagnostics |
---|
234 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_xco2a_2d, f_fco2w_2d, f_fco2a_2d |
---|
235 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnrhosw_2d, f_ocnschco2_2d |
---|
236 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnkwco2_2d |
---|
237 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnk0_2d, f_co2starair_2d |
---|
238 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocndpco2_2d |
---|
239 | # endif |
---|
240 | !! |
---|
241 | !! 3D var for diagnostics. |
---|
242 | REAL(wp), POINTER, DIMENSION(:,:,:) :: tpp3d, detflux3d, remin3dn |
---|
243 | !! |
---|
244 | # if defined key_roam |
---|
245 | !! AXY (04/11/16) |
---|
246 | !! 2D var for new CMIP6 diagnostics (behind a key_roam ifdef |
---|
247 | !! for simplicity) |
---|
248 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgco2,intdissic,intdissin |
---|
249 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: intdissisi,inttalk,o2min,zo2min |
---|
250 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fbddtalk,fbddtdic,fbddtdife |
---|
251 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fbddtdin,fbddtdisi |
---|
252 | !! |
---|
253 | !! 3D var for new CMIP6 diagnostics |
---|
254 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: tppd3 |
---|
255 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: bddtalk3,bddtdic3,bddtdife3 |
---|
256 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: bddtdin3, bddtdisi3 |
---|
257 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: fd_nit3,fd_sil3,fd_car3,fd_cal3 |
---|
258 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: co33,co3satarag3 |
---|
259 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: co3satcalc3,dcalc3 |
---|
260 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: expc3,expn3 |
---|
261 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: fediss3,fescav3 |
---|
262 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: migrazp3,migrazd3,megrazp3 |
---|
263 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: megrazd3, megrazz3 |
---|
264 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: o2sat3,pbsi3,pcal3,remoc3 |
---|
265 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: pnlimj3,pnlimn3,pnlimfe3 |
---|
266 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: pdlimj3,pdlimn3,pdlimfe3,pdlimsi3 |
---|
267 | # endif |
---|
268 | !!---------------------------------------------------------------------- |
---|
269 | !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) |
---|
270 | !! $Id$ |
---|
271 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
272 | !!---------------------------------------------------------------------- |
---|
273 | CONTAINS |
---|
274 | |
---|
275 | INTEGER FUNCTION bio_medusa_alloc() |
---|
276 | !!------------------------------------------------------------------- |
---|
277 | !! *** ROUTINE bio_medusa_alloc *** |
---|
278 | !!------------------------------------------------------------------- |
---|
279 | USE lib_mpp, ONLY: ctl_warn |
---|
280 | USE par_oce, ONLY: jpi, jpj |
---|
281 | !!------------------------------------------------------------------- |
---|
282 | ! |
---|
283 | ALLOCATE(zchn(jpi,jpj),zchd(jpi,jpj),zphn(jpi,jpj), & |
---|
284 | zphd(jpi,jpj),zpds(jpi,jpj),zzmi(jpi,jpj), & |
---|
285 | zzme(jpi,jpj),zdet(jpi,jpj),zdtc(jpi,jpj), & |
---|
286 | zdin(jpi,jpj),zsil(jpi,jpj),zfer(jpi,jpj), & |
---|
287 | # if defined key_roam |
---|
288 | zdic(jpi,jpj),zalk(jpi,jpj),zoxy(jpi,jpj), & |
---|
289 | ztmp(jpi,jpj),zsal(jpi,jpj), & |
---|
290 | # endif |
---|
291 | # if defined key_mocsy |
---|
292 | zpho(jpi,jpj), & |
---|
293 | # endif |
---|
294 | fthetan(jpi,jpj),fprn(jpi,jpj),frn(jpi,jpj), & |
---|
295 | fthetad(jpi,jpj),fprd(jpi,jpj),frd(jpi,jpj), & |
---|
296 | fjlim_pn(jpi,jpj),fjlim_pd(jpi,jpj), & |
---|
297 | fun_T(jpi,jpj),fun_Q10(jpi,jpj), & |
---|
298 | fprn_ml(jpi,jpj),fprd_ml(jpi,jpj),fchl_ml(jpi,jpj), & |
---|
299 | fnln(jpi,jpj),ffln2(jpi,jpj), & |
---|
300 | fnld(jpi,jpj),ffld(jpi,jpj),fsld(jpi,jpj), & |
---|
301 | fsld2(jpi,jpj), & |
---|
302 | fsin(jpi,jpj),fprds(jpi,jpj),fsdiss(jpi,jpj), & |
---|
303 | ffetop(jpi,jpj),ffebot(jpi,jpj),ffescav(jpi,jpj), & |
---|
304 | xFree(jpi,jpj), & |
---|
305 | fgmipn(jpi,jpj),fgmid(jpi,jpj),fgmidc(jpi,jpj), & |
---|
306 | finmi(jpi,jpj),ficmi(jpi,jpj), & |
---|
307 | fmigrow(jpi,jpj),fmiexcr(jpi,jpj),fmiresp(jpi,jpj), & |
---|
308 | fgmepn(jpi,jpj),fgmepd(jpi,jpj), & |
---|
309 | fgmepds(jpi,jpj),fgmezmi(jpi,jpj),fgmed(jpi,jpj), & |
---|
310 | fgmedc(jpi,jpj), & |
---|
311 | finme(jpi,jpj),ficme(jpi,jpj), & |
---|
312 | fmegrow(jpi,jpj),fmeexcr(jpi,jpj),fmeresp(jpi,jpj), & |
---|
313 | fdpn(jpi,jpj),fdpd(jpi,jpj),fdpds(jpi,jpj), & |
---|
314 | fdzmi(jpi,jpj),fdzme(jpi,jpj),fdd(jpi,jpj), & |
---|
315 | # if defined key_roam |
---|
316 | fddc(jpi,jpj), & |
---|
317 | # endif |
---|
318 | fdpn2(jpi,jpj),fdpd2(jpi,jpj),fdpds2(jpi,jpj), & |
---|
319 | fdzmi2(jpi,jpj),fdzme2(jpi,jpj), & |
---|
320 | fslown(jpi,jpj),fslowc(jpi,jpj), & |
---|
321 | fslownflux(jpi,jpj),fslowcflux(jpi,jpj), & |
---|
322 | fregen(jpi,jpj),fregensi(jpi,jpj), & |
---|
323 | fregenfast(jpi,jpj),fregenfastsi(jpi,jpj), & |
---|
324 | # if defined key_roam |
---|
325 | fregenfastc(jpi,jpj), & |
---|
326 | # endif |
---|
327 | fslowsink(jpi,jpj),fslowgain(jpi,jpj), & |
---|
328 | fslowloss(jpi,jpj), & |
---|
329 | # if defined key_roam |
---|
330 | fslowsinkc(jpi,jpj),fslowgainc(jpi,jpj), & |
---|
331 | fslowlossc(jpi,jpj), & |
---|
332 | # endif |
---|
333 | fdep1(jpi,jpj), & |
---|
334 | ftempn(jpi,jpj),ftempsi(jpi,jpj),ftempfe(jpi,jpj), & |
---|
335 | ftempc(jpi,jpj),ftempca(jpi,jpj), & |
---|
336 | freminn(jpi,jpj),freminsi(jpi,jpj),freminfe(jpi,jpj), & |
---|
337 | freminc(jpi,jpj),freminca(jpi,jpj), & |
---|
338 | ffastn(jpi,jpj),ffastsi(jpi,jpj),ffastfe(jpi,jpj), & |
---|
339 | ffastc(jpi,jpj),ffastca(jpi,jpj), & |
---|
340 | fsedn(jpi,jpj),fsedsi(jpi,jpj),fsedfe(jpi,jpj), & |
---|
341 | fsedc(jpi,jpj),fsedca(jpi,jpj), & |
---|
342 | fccd(jpi,jpj), & |
---|
343 | ffast2slown(jpi,jpj),ffast2slowc(jpi,jpj), & |
---|
344 | ftot_n(jpi,jpj),ftot_si(jpi,jpj),ftot_fe(jpi,jpj), & |
---|
345 | fflx_n(jpi,jpj),fflx_si(jpi,jpj),fflx_fe(jpi,jpj), & |
---|
346 | fifd_n(jpi,jpj),fifd_si(jpi,jpj),fifd_fe(jpi,jpj), & |
---|
347 | fofd_n(jpi,jpj),fofd_si(jpi,jpj),fofd_fe(jpi,jpj), & |
---|
348 | # if defined key_roam |
---|
349 | ftot_c(jpi,jpj),ftot_a(jpi,jpj),ftot_o2(jpi,jpj), & |
---|
350 | fflx_c(jpi,jpj),fflx_a(jpi,jpj),fflx_o2(jpi,jpj), & |
---|
351 | ! I don't think fifd_a, fifd_o2, fofd_a or fofd_o2 are used - marc 11/5/17 |
---|
352 | ! fifd_c(jpi,jpj),fifd_a(jpi,jpj),fifd_o2(jpi,jpj), & |
---|
353 | ! fofd_c(jpi,jpj),fofd_a(jpi,jpj),fofd_o2(jpi,jpj), & |
---|
354 | fifd_c(jpi,jpj), fofd_c(jpi,jpj), & |
---|
355 | # endif |
---|
356 | fzmi_i(jpi,jpj),fzmi_o(jpi,jpj),fzme_i(jpi,jpj), & |
---|
357 | fzme_o(jpi,jpj), & |
---|
358 | ftot_pn(jpi,jpj),ftot_pd(jpi,jpj), & |
---|
359 | ftot_zmi(jpi,jpj),ftot_zme(jpi,jpj),ftot_det(jpi,jpj), & |
---|
360 | ftot_dtc(jpi,jpj), & |
---|
361 | fnit_prod(jpi,jpj),fnit_cons(jpi,jpj), & |
---|
362 | fsil_prod(jpi,jpj),fsil_cons(jpi,jpj), & |
---|
363 | # if defined key_roam |
---|
364 | f_xco2a(jpi,jpj), & |
---|
365 | f_ph(jpi,jpj),f_pco2w(jpi,jpj),f_h2co3(jpi,jpj), & |
---|
366 | f_hco3(jpi,jpj),f_co3(jpi,jpj),f_co2flux(jpi,jpj), & |
---|
367 | f_TDIC(jpi,jpj),f_TALK(jpi,jpj),f_dcf(jpi,jpj), & |
---|
368 | f_henry(jpi,jpj), & |
---|
369 | f_pp0(jpi,jpj), & |
---|
370 | f_kw660(jpi,jpj),f_o2flux(jpi,jpj),f_o2sat(jpi,jpj), & |
---|
371 | f_omcal(jpi,jpj),f_omarg(jpi,jpj), & |
---|
372 | f_pco2atm(jpi,jpj), & |
---|
373 | fcomm_resp(jpi,jpj), & |
---|
374 | fcar_prod(jpi,jpj),fcar_cons(jpi,jpj), & |
---|
375 | foxy_prod(jpi,jpj), foxy_cons(jpi,jpj), & |
---|
376 | foxy_anox(jpi,jpj), & |
---|
377 | dms_nlim(jpi,jpj),dms_wtkn(jpi,jpj), & |
---|
378 | # endif |
---|
379 | f_sbenin_n(jpi,jpj),f_sbenin_fe(jpi,jpj), & |
---|
380 | f_sbenin_c(jpi,jpj), & |
---|
381 | f_fbenin_n(jpi,jpj),f_fbenin_fe(jpi,jpj), & |
---|
382 | f_fbenin_si(jpi,jpj), & |
---|
383 | f_fbenin_c(jpi,jpj),f_fbenin_ca(jpi,jpj), & |
---|
384 | f_benout_n(jpi,jpj),f_benout_fe(jpi,jpj), & |
---|
385 | f_benout_si(jpi,jpj), & |
---|
386 | f_benout_c(jpi,jpj),f_benout_ca(jpi,jpj), & |
---|
387 | f_benout_lyso_ca(jpi,jpj), & |
---|
388 | f_runoff(jpi,jpj),f_riv_n(jpi,jpj),f_riv_si(jpi,jpj), & |
---|
389 | f_riv_c(jpi,jpj),f_riv_alk(jpi,jpj), & |
---|
390 | f_riv_loc_n(jpi,jpj),f_riv_loc_si(jpi,jpj), & |
---|
391 | f_riv_loc_c(jpi,jpj),f_riv_loc_alk(jpi,jpj), & |
---|
392 | STAT = bio_medusa_alloc) |
---|
393 | |
---|
394 | !! Check that allocation was successful |
---|
395 | IF ( bio_medusa_alloc /= 0 ) THEN |
---|
396 | CALL ctl_warn('bio_medusa_alloc: failed to allocate arrays') |
---|
397 | END IF |
---|
398 | |
---|
399 | END FUNCTION bio_medusa_alloc |
---|
400 | |
---|
401 | #else |
---|
402 | !!---------------------------------------------------------------------- |
---|
403 | !! Empty module : No MEDUSA |
---|
404 | !!---------------------------------------------------------------------- |
---|
405 | #endif |
---|
406 | |
---|
407 | !!====================================================================== |
---|
408 | END MODULE bio_medusa_mod |
---|