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 | !!---------------------------------------------------------------------- |
---|
10 | #if defined key_medusa |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! 'key_medusa' MEDUSA |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | USE par_kind, ONLY: wp |
---|
15 | |
---|
16 | IMPLICIT NONE |
---|
17 | PUBLIC |
---|
18 | |
---|
19 | PUBLIC bio_medusa_alloc ! called by trcini.F90 |
---|
20 | |
---|
21 | |
---|
22 | !! AXY (01/03/10): add in mixed layer PP diagnostics |
---|
23 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprn_ml,fprd_ml |
---|
24 | |
---|
25 | !! Variable for iron-ligand system |
---|
26 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: xFree |
---|
27 | |
---|
28 | !! Mortality/Remineralisation |
---|
29 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslownflux, fslowcflux |
---|
30 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregenfast,fregenfastsi |
---|
31 | # if defined key_roam |
---|
32 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregenfastc |
---|
33 | # endif |
---|
34 | |
---|
35 | !! Particle flux |
---|
36 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastn,ffastsi,ffastfe |
---|
37 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastc,ffastca |
---|
38 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsedn,fsedsi,fsedfe,fsedc,fsedca |
---|
39 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fccd |
---|
40 | |
---|
41 | !! water column nutrient and flux integrals |
---|
42 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_n,ftot_si,ftot_fe |
---|
43 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fflx_n,fflx_si,fflx_fe |
---|
44 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_n,fifd_si,fifd_fe |
---|
45 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_n,fofd_si,fofd_fe |
---|
46 | # if defined key_roam |
---|
47 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_c,ftot_a,ftot_o2 |
---|
48 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fflx_c,fflx_a,fflx_o2 |
---|
49 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fifd_c,fifd_a,fifd_o2 |
---|
50 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fofd_c,fofd_a,fofd_o2 |
---|
51 | # endif |
---|
52 | |
---|
53 | !! Zooplankton grazing integrals |
---|
54 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fzmi_i,fzmi_o,fzme_i,fzme_o |
---|
55 | |
---|
56 | !! Limitation term temporary variables |
---|
57 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_pn,ftot_pd |
---|
58 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftot_zmi,ftot_zme,ftot_det,ftot_dtc |
---|
59 | |
---|
60 | !! Nitrogen and silicon production and consumption |
---|
61 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnit_prod,fnit_cons |
---|
62 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsil_prod,fsil_cons |
---|
63 | |
---|
64 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_omcal,f_omarg |
---|
65 | |
---|
66 | !! Carbon, alkalinity production and consumption |
---|
67 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fcomm_resp |
---|
68 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fcar_prod,fcar_cons |
---|
69 | |
---|
70 | !! Oxygen production and consumption (and non-consumption) |
---|
71 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: foxy_prod,foxy_cons,foxy_anox |
---|
72 | |
---|
73 | !! Benthic fluxes |
---|
74 | INTEGER :: ibenthic |
---|
75 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_sbenin_n,f_sbenin_fe,f_sbenin_c |
---|
76 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_fbenin_n,f_fbenin_fe,f_fbenin_si |
---|
77 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_fbenin_c,f_fbenin_ca |
---|
78 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_n,f_benout_fe,f_benout_si |
---|
79 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_c,f_benout_ca |
---|
80 | |
---|
81 | !! Benthic fluxes of CaCO3 that shouldn't happen because of lysocline |
---|
82 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_benout_lyso_ca |
---|
83 | |
---|
84 | !! riverine fluxes |
---|
85 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_runoff,f_riv_n,f_riv_si |
---|
86 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_riv_c,f_riv_alk |
---|
87 | |
---|
88 | !! Jpalm -- 11-10-2015 -- adapt diag to iom_use |
---|
89 | !! 2D var for diagnostics. |
---|
90 | REAL(wp), POINTER, DIMENSION(:,:) :: fprn2d, fdpn2d, fprd2d, fdpd2d |
---|
91 | REAL(wp), POINTER, DIMENSION(:,:) :: fprds2d, fsdiss2d, fgmipn2d |
---|
92 | REAL(wp), POINTER, DIMENSION(:,:) :: fgmid2d, fdzmi2d, fgmepn2d |
---|
93 | REAL(wp), POINTER, DIMENSION(:,:) :: fgmepd2d, fgmezmi2d, fgmed2d |
---|
94 | REAL(wp), POINTER, DIMENSION(:,:) :: fdzme2d, fslown2d, fdd2d |
---|
95 | REAL(wp), POINTER, DIMENSION(:,:) :: ffetop2d, ffebot2d, ffescav2d |
---|
96 | REAL(wp), POINTER, DIMENSION(:,:) :: fjln2d, fnln2d, ffln2d, fjld2d |
---|
97 | REAL(wp), POINTER, DIMENSION(:,:) :: fnld2d, ffld2d, fsld2d2 |
---|
98 | REAL(wp), POINTER, DIMENSION(:,:) :: fsld2d, fregen2d, fregensi2d |
---|
99 | REAL(wp), POINTER, DIMENSION(:,:) :: ftempn2d, ftempsi2d, ftempfe2d |
---|
100 | REAL(wp), POINTER, DIMENSION(:,:) :: ftempc2d, ftempca2d, freminn2d |
---|
101 | REAL(wp), POINTER, DIMENSION(:,:) :: freminsi2d, freminfe2d |
---|
102 | REAL(wp), POINTER, DIMENSION(:,:) :: freminc2d, freminca2d |
---|
103 | REAL(wp), POINTER, DIMENSION(:,:) :: zw2d |
---|
104 | # if defined key_roam |
---|
105 | REAL(wp), POINTER, DIMENSION(:,:) :: ffastca2d, rivn2d, rivsi2d |
---|
106 | REAL(wp), POINTER, DIMENSION(:,:) :: rivc2d, rivalk2d, fslowc2d |
---|
107 | REAL(wp), POINTER, DIMENSION(:,:) :: fdpn22d, fdpd22d, fdzmi22d |
---|
108 | REAL(wp), POINTER, DIMENSION(:,:) :: fdzme22d, zimesn2d, zimesd2d |
---|
109 | REAL(wp), POINTER, DIMENSION(:,:) :: zimesc2d, zimesdc2d, ziexcr2d |
---|
110 | REAL(wp), POINTER, DIMENSION(:,:) :: ziresp2d, zigrow2d, zemesn2d |
---|
111 | REAL(wp), POINTER, DIMENSION(:,:) :: zemesd2d, zemesc2d, zemesdc2d |
---|
112 | REAL(wp), POINTER, DIMENSION(:,:) :: zeexcr2d, zeresp2d, zegrow2d |
---|
113 | REAL(wp), POINTER, DIMENSION(:,:) :: mdetc2d, gmidc2d, gmedc2d |
---|
114 | REAL(wp), POINTER, DIMENSION(:,:) :: f_pco2a2d, f_pco2w2d, f_co2flux2d |
---|
115 | REAL(wp), POINTER, DIMENSION(:,:) :: f_TDIC2d, f_TALK2d, f_kw6602d |
---|
116 | REAL(wp), POINTER, DIMENSION(:,:) :: f_pp02d, f_o2flux2d, f_o2sat2d |
---|
117 | REAL(wp), POINTER, DIMENSION(:,:) :: dms_andr2d, dms_simo2d, dms_aran2d |
---|
118 | REAL(wp), POINTER, DIMENSION(:,:) :: dms_hall2d, dms_surf2d |
---|
119 | REAL(wp), POINTER, DIMENSION(:,:) :: iben_n2d, iben_fe2d, iben_c2d |
---|
120 | REAL(wp), POINTER, DIMENSION(:,:) :: iben_si2d, iben_ca2d, oben_n2d |
---|
121 | REAL(wp), POINTER, DIMENSION(:,:) :: oben_fe2d, oben_c2d, oben_si2d |
---|
122 | REAL(wp), POINTER, DIMENSION(:,:) :: oben_ca2d, sfr_ocal2d |
---|
123 | REAL(wp), POINTER, DIMENSION(:,:) :: sfr_oarg2d, lyso_ca2d |
---|
124 | !! AXY (23/11/16): extra MOCSY diagnostics |
---|
125 | REAL(wp), POINTER, DIMENSION(:,:) :: f_xco2a_2d, f_fco2w_2d, f_fco2a_2d |
---|
126 | REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnrhosw_2d, f_ocnschco2_2d |
---|
127 | REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnkwco2_2d |
---|
128 | REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnk0_2d, f_co2starair_2d |
---|
129 | REAL(wp), POINTER, DIMENSION(:,:) :: f_ocndpco2_2d |
---|
130 | # endif |
---|
131 | !! |
---|
132 | !! 3D var for diagnostics. |
---|
133 | REAL(wp), POINTER, DIMENSION(:,:,:) :: tpp3d, detflux3d, remin3dn |
---|
134 | !! |
---|
135 | # if defined key_roam |
---|
136 | !! AXY (04/11/16) |
---|
137 | !! 2D var for new CMIP6 diagnostics (behind a key_roam ifdef |
---|
138 | !! for simplicity) |
---|
139 | REAL(wp), POINTER, DIMENSION(:,:) :: fgco2,intdissic,intdissin |
---|
140 | REAL(wp), POINTER, DIMENSION(:,:) :: intdissisi,inttalk,o2min,zo2min |
---|
141 | REAL(wp), POINTER, DIMENSION(:,:) :: fbddtalk,fbddtdic,fbddtdife |
---|
142 | REAL(wp), POINTER, DIMENSION(:,:) :: fbddtdin,fbddtdisi |
---|
143 | !! |
---|
144 | !! 3D var for new CMIP6 diagnostics |
---|
145 | REAL(wp), POINTER, DIMENSION(:,:,:) :: tppd3 |
---|
146 | REAL(wp), POINTER, DIMENSION(:,:,:) :: bddtalk3,bddtdic3,bddtdife3 |
---|
147 | REAL(wp), POINTER, DIMENSION(:,:,:) :: bddtdin3, bddtdisi3 |
---|
148 | REAL(wp), POINTER, DIMENSION(:,:,:) :: fd_nit3,fd_sil3,fd_car3,fd_cal3 |
---|
149 | REAL(wp), POINTER, DIMENSION(:,:,:) :: co33,co3satarag3,co3satcalc3,dcalc3 |
---|
150 | REAL(wp), POINTER, DIMENSION(:,:,:) :: expc3,expn3 |
---|
151 | REAL(wp), POINTER, DIMENSION(:,:,:) :: fediss3,fescav3 |
---|
152 | REAL(wp), POINTER, DIMENSION(:,:,:) :: migrazp3,migrazd3,megrazp3 |
---|
153 | REAL(wp), POINTER, DIMENSION(:,:,:) :: megrazd3, megrazz3 |
---|
154 | REAL(wp), POINTER, DIMENSION(:,:,:) :: o2sat3,pbsi3,pcal3,remoc3 |
---|
155 | REAL(wp), POINTER, DIMENSION(:,:,:) :: pnlimj3,pnlimn3,pnlimfe3 |
---|
156 | REAL(wp), POINTER, DIMENSION(:,:,:) :: pdlimj3,pdlimn3,pdlimfe3,pdlimsi3 |
---|
157 | # endif |
---|
158 | !!---------------------------------------------------------------------- |
---|
159 | !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) |
---|
160 | !! $Id$ |
---|
161 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
162 | !!---------------------------------------------------------------------- |
---|
163 | CONTAINS |
---|
164 | |
---|
165 | INTEGER FUNCTION bio_medusa_alloc() |
---|
166 | !!------------------------------------------------------------------- |
---|
167 | !! *** ROUTINE bio_medusa_alloc *** |
---|
168 | !!------------------------------------------------------------------- |
---|
169 | USE lib_mpp, ONLY: ctl_warn |
---|
170 | USE par_oce, ONLY: jpi, jpj |
---|
171 | ! USE par_trc |
---|
172 | !!------------------------------------------------------------------- |
---|
173 | ! |
---|
174 | ALLOCATE(fprn_ml(jpi,jpj),fprd_ml(jpi,jpj), & |
---|
175 | xFree(jpi,jpj), & |
---|
176 | fslownflux(jpi,jpj),fslowcflux(jpi,jpj), & |
---|
177 | fregenfast(jpi,jpj),fregenfastsi(jpi,jpj), & |
---|
178 | # if defined key_roam |
---|
179 | fregenfastc(jpi,jpj), & |
---|
180 | # endif |
---|
181 | ffastn(jpi,jpj),ffastsi(jpi,jpj),ffastfe(jpi,jpj), & |
---|
182 | ffastc(jpi,jpj),ffastca(jpi,jpj), & |
---|
183 | fsedn(jpi,jpj),fsedsi(jpi,jpj),fsedfe(jpi,jpj), & |
---|
184 | fsedc(jpi,jpj),fsedca(jpi,jpj), & |
---|
185 | fccd(jpi,jpj), & |
---|
186 | ftot_n(jpi,jpj),ftot_si(jpi,jpj),ftot_fe(jpi,jpj), & |
---|
187 | fflx_n(jpi,jpj),fflx_si(jpi,jpj),fflx_fe(jpi,jpj), & |
---|
188 | fifd_n(jpi,jpj),fifd_si(jpi,jpj),fifd_fe(jpi,jpj), & |
---|
189 | fofd_n(jpi,jpj),fofd_si(jpi,jpj),fofd_fe(jpi,jpj), & |
---|
190 | # if defined key_roam |
---|
191 | ftot_c(jpi,jpj),ftot_a(jpi,jpj),ftot_o2(jpi,jpj), & |
---|
192 | fflx_c(jpi,jpj),fflx_a(jpi,jpj),fflx_o2(jpi,jpj), & |
---|
193 | fifd_c(jpi,jpj),fifd_a(jpi,jpj),fifd_o2(jpi,jpj), & |
---|
194 | fofd_c(jpi,jpj),fofd_a(jpi,jpj),fofd_o2(jpi,jpj), & |
---|
195 | # endif |
---|
196 | fzmi_i(jpi,jpj),fzmi_o(jpi,jpj),fzme_i(jpi,jpj), & |
---|
197 | fzme_o(jpi,jpj), & |
---|
198 | ftot_pn(jpi,jpj),ftot_pd(jpi,jpj), & |
---|
199 | ftot_zmi(jpi,jpj),ftot_zme(jpi,jpj),ftot_det(jpi,jpj), & |
---|
200 | ftot_dtc(jpi,jpj), & |
---|
201 | fnit_prod(jpi,jpj),fnit_cons(jpi,jpj), & |
---|
202 | fsil_prod(jpi,jpj),fsil_cons(jpi,jpj), & |
---|
203 | f_omcal(jpi,jpj),f_omarg(jpi,jpj), & |
---|
204 | fcomm_resp(jpi,jpj), & |
---|
205 | fcar_prod(jpi,jpj),fcar_cons(jpi,jpj), & |
---|
206 | foxy_prod(jpi,jpj), foxy_cons(jpi,jpj), & |
---|
207 | foxy_anox(jpi,jpj), & |
---|
208 | f_sbenin_n(jpi,jpj),f_sbenin_fe(jpi,jpj), & |
---|
209 | f_sbenin_c(jpi,jpj), & |
---|
210 | f_fbenin_n(jpi,jpj),f_fbenin_fe(jpi,jpj), & |
---|
211 | f_fbenin_si(jpi,jpj), & |
---|
212 | f_fbenin_c(jpi,jpj),f_fbenin_ca(jpi,jpj), & |
---|
213 | f_benout_n(jpi,jpj),f_benout_fe(jpi,jpj), & |
---|
214 | f_benout_si(jpi,jpj), & |
---|
215 | f_benout_c(jpi,jpj),f_benout_ca(jpi,jpj), & |
---|
216 | f_benout_lyso_ca(jpi,jpj), & |
---|
217 | f_runoff(jpi,jpj),f_riv_n(jpi,jpj),f_riv_si(jpi,jpj), & |
---|
218 | f_riv_c(jpi,jpj),f_riv_alk(jpi,jpj), & |
---|
219 | STAT = bio_medusa_alloc) |
---|
220 | |
---|
221 | !! Check that allocation was successful |
---|
222 | IF ( bio_medusa_alloc /= 0 ) THEN |
---|
223 | CALL ctl_warn('bio_medusa_alloc: failed to allocate arrays') |
---|
224 | END IF |
---|
225 | |
---|
226 | END FUNCTION bio_medusa_alloc |
---|
227 | |
---|
228 | #else |
---|
229 | !!---------------------------------------------------------------------- |
---|
230 | !! Empty module : No MEDUSA |
---|
231 | !!---------------------------------------------------------------------- |
---|
232 | #endif |
---|
233 | |
---|
234 | !!====================================================================== |
---|
235 | END MODULE bio_medusa_mod |
---|