1 | MODULE p4zsed |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE p4sed *** |
---|
4 | !! TOP : PISCES Compute loss of organic matter in the sediments |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2004-03 (O. Aumont) Original code |
---|
7 | !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 |
---|
8 | !! 3.4 ! 2011-06 (C. Ethe) USE of fldread |
---|
9 | !! 3.5 ! 2012-07 (O. Aumont) improvment of river input of nutrients |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! p4z_sed : Compute loss of organic matter in the sediments |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
14 | USE trc ! passive tracers common variables |
---|
15 | USE sms_pisces ! PISCES Source Minus Sink variables |
---|
16 | USE p4zlim ! Co-limitations of differents nutrients |
---|
17 | USE p4zsbc ! External source of nutrients |
---|
18 | USE p4zint ! interpolation and computation of various fields |
---|
19 | USE sed ! Sediment module |
---|
20 | USE iom ! I/O manager |
---|
21 | USE prtctl_trc ! print control for debugging |
---|
22 | |
---|
23 | IMPLICIT NONE |
---|
24 | PRIVATE |
---|
25 | |
---|
26 | PUBLIC p4z_sed |
---|
27 | PUBLIC p4z_sed_alloc |
---|
28 | |
---|
29 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrpot !: Nitrogen fixation |
---|
30 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,: ) :: sdenit !: Nitrate reduction in the sediments |
---|
31 | REAL(wp) :: r1_rday !: inverse of rday |
---|
32 | LOGICAL, SAVE :: lk_sed |
---|
33 | |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
36 | !! $Id$ |
---|
37 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
38 | !!---------------------------------------------------------------------- |
---|
39 | CONTAINS |
---|
40 | |
---|
41 | SUBROUTINE p4z_sed( kt, knt ) |
---|
42 | !!--------------------------------------------------------------------- |
---|
43 | !! *** ROUTINE p4z_sed *** |
---|
44 | !! |
---|
45 | !! ** Purpose : Compute loss of organic matter in the sediments. This |
---|
46 | !! is by no way a sediment model. The loss is simply |
---|
47 | !! computed to balance the inout from rivers and dust |
---|
48 | !! |
---|
49 | !! ** Method : - ??? |
---|
50 | !!--------------------------------------------------------------------- |
---|
51 | ! |
---|
52 | INTEGER, INTENT(in) :: kt, knt ! ocean time step |
---|
53 | INTEGER :: ji, jj, jk, ikt |
---|
54 | REAL(wp) :: zrivalk, zrivsil, zrivno3 |
---|
55 | REAL(wp) :: zwflux, zfminus, zfplus |
---|
56 | REAL(wp) :: zlim, zfact, zfactcal |
---|
57 | REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, zolimit |
---|
58 | REAL(wp) :: zsiloss, zcaloss, zws3, zws4, zwsc, zdep |
---|
59 | REAL(wp) :: zwstpoc, zwstpon, zwstpop |
---|
60 | REAL(wp) :: ztrfer, ztrpo4s, ztrdp, zwdust, zmudia, ztemp |
---|
61 | REAL(wp) :: xdiano3, xdianh4 |
---|
62 | ! |
---|
63 | CHARACTER (len=25) :: charout |
---|
64 | REAL(wp), DIMENSION(jpi,jpj ) :: zdenit2d, zbureff, zwork |
---|
65 | REAL(wp), DIMENSION(jpi,jpj ) :: zwsbio3, zwsbio4 |
---|
66 | REAL(wp), DIMENSION(jpi,jpj ) :: zsedcal, zsedsi, zsedc |
---|
67 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsoufer, zlight |
---|
68 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zpdep |
---|
69 | REAL(wp), ALLOCATABLE, DIMENSION(:,: ) :: zsidep, zironice |
---|
70 | !!--------------------------------------------------------------------- |
---|
71 | ! |
---|
72 | IF( ln_timing ) CALL timing_start('p4z_sed') |
---|
73 | ! |
---|
74 | IF( kt == nittrc000 .AND. knt == 1 ) THEN |
---|
75 | r1_rday = 1. / rday |
---|
76 | IF (ln_sediment .AND. ln_sed_2way) THEN |
---|
77 | lk_sed = .TRUE. |
---|
78 | ELSE |
---|
79 | lk_sed = .FALSE. |
---|
80 | ENDIF |
---|
81 | ENDIF |
---|
82 | ! |
---|
83 | IF( kt == nittrc000 .AND. knt == 1 ) r1_rday = 1. / rday |
---|
84 | ! |
---|
85 | ! Allocate temporary workspace |
---|
86 | ALLOCATE( ztrpo4(jpi,jpj,jpk) ) |
---|
87 | IF( ln_p5z ) ALLOCATE( ztrdop(jpi,jpj,jpk) ) |
---|
88 | |
---|
89 | zdenit2d(:,:) = 0.e0 |
---|
90 | zbureff (:,:) = 0.e0 |
---|
91 | zwork (:,:) = 0.e0 |
---|
92 | zsedsi (:,:) = 0.e0 |
---|
93 | zsedcal (:,:) = 0.e0 |
---|
94 | zsedc (:,:) = 0.e0 |
---|
95 | |
---|
96 | ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al. |
---|
97 | ! ---------------------------------------------------- |
---|
98 | IF( ln_ironice ) THEN |
---|
99 | ! |
---|
100 | ALLOCATE( zironice(jpi,jpj) ) |
---|
101 | ! |
---|
102 | DO jj = 1, jpj |
---|
103 | DO ji = 1, jpi |
---|
104 | zdep = rfact2 / e3t_n(ji,jj,1) |
---|
105 | zwflux = fmmflx(ji,jj) / 1000._wp |
---|
106 | zfminus = MIN( 0._wp, -zwflux ) * trb(ji,jj,1,jpfer) * zdep |
---|
107 | zfplus = MAX( 0._wp, -zwflux ) * icefeinput * zdep |
---|
108 | zironice(ji,jj) = zfplus + zfminus |
---|
109 | END DO |
---|
110 | END DO |
---|
111 | ! |
---|
112 | tra(:,:,1,jpfer) = tra(:,:,1,jpfer) + zironice(:,:) |
---|
113 | ! |
---|
114 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironice" ) ) & |
---|
115 | & CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice |
---|
116 | ! |
---|
117 | DEALLOCATE( zironice ) |
---|
118 | ! |
---|
119 | ENDIF |
---|
120 | |
---|
121 | ! Add the external input of nutrients from dust deposition |
---|
122 | ! ---------------------------------------------------------- |
---|
123 | IF( ln_dust ) THEN |
---|
124 | ! |
---|
125 | ALLOCATE( zsidep(jpi,jpj), zpdep(jpi,jpj,jpk), zirondep(jpi,jpj,jpk) ) |
---|
126 | ! ! Iron and Si deposition at the surface |
---|
127 | IF( ln_solub ) THEN |
---|
128 | zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss |
---|
129 | ELSE |
---|
130 | zirondep(:,:,1) = dustsolub * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss |
---|
131 | ENDIF |
---|
132 | zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1 |
---|
133 | zpdep (:,:,1) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 31. / po4r |
---|
134 | ! ! Iron solubilization of particles in the water column |
---|
135 | ! ! dust in kg/m2/s ---> 1/55.85 to put in mol/Fe ; wdust in m/j |
---|
136 | zwdust = 0.03 * rday / ( wdust * 55.85 ) / ( 270. * rday ) |
---|
137 | DO jk = 2, jpkm1 |
---|
138 | zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( -gdept_n(:,:,jk) / 540. ) |
---|
139 | zpdep (:,:,jk) = zirondep(:,:,jk) * 0.023 |
---|
140 | END DO |
---|
141 | ! ! Iron solubilization of particles in the water column |
---|
142 | tra(:,:,1,jpsil) = tra(:,:,1,jpsil) + zsidep (:,:) |
---|
143 | DO jk = 1, jpkm1 |
---|
144 | tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zpdep (:,:,jk) |
---|
145 | tra(:,:,jk,jpfer) = tra(:,:,jk,jpfer) + zirondep(:,:,jk) |
---|
146 | ENDDO |
---|
147 | ! |
---|
148 | IF( lk_iomput ) THEN |
---|
149 | IF( knt == nrdttrc ) THEN |
---|
150 | IF( iom_use( "Irondep" ) ) & |
---|
151 | & CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron |
---|
152 | IF( iom_use( "pdust" ) ) & |
---|
153 | & CALL iom_put( "pdust" , dust(:,:) / ( wdust * rday ) * tmask(:,:,1) ) ! dust concentration at surface |
---|
154 | ENDIF |
---|
155 | ENDIF |
---|
156 | DEALLOCATE( zsidep, zpdep, zirondep ) |
---|
157 | ! |
---|
158 | ENDIF |
---|
159 | |
---|
160 | ! Add the external input of nutrients from river |
---|
161 | ! ---------------------------------------------------------- |
---|
162 | IF( ln_river ) THEN |
---|
163 | DO jj = 1, jpj |
---|
164 | DO ji = 1, jpi |
---|
165 | DO jk = 1, nk_rnf(ji,jj) |
---|
166 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + rivdip(ji,jj) * rfact2 |
---|
167 | tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + rivdin(ji,jj) * rfact2 |
---|
168 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + rivdic(ji,jj) * 5.e-5 * rfact2 |
---|
169 | tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + rivdsi(ji,jj) * rfact2 |
---|
170 | tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + rivdic(ji,jj) * rfact2 |
---|
171 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + ( rivalk(ji,jj) - rno3 * rivdin(ji,jj) ) * rfact2 |
---|
172 | tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + rivdoc(ji,jj) * rfact2 |
---|
173 | ENDDO |
---|
174 | ENDDO |
---|
175 | ENDDO |
---|
176 | IF (ln_ligand) THEN |
---|
177 | DO jj = 1, jpj |
---|
178 | DO ji = 1, jpi |
---|
179 | DO jk = 1, nk_rnf(ji,jj) |
---|
180 | tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) + rivdic(ji,jj) * 5.e-5 * rfact2 |
---|
181 | ENDDO |
---|
182 | ENDDO |
---|
183 | ENDDO |
---|
184 | ENDIF |
---|
185 | IF( ln_p5z ) THEN |
---|
186 | DO jj = 1, jpj |
---|
187 | DO ji = 1, jpi |
---|
188 | DO jk = 1, nk_rnf(ji,jj) |
---|
189 | tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + rivdop(ji,jj) * rfact2 |
---|
190 | tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + rivdon(ji,jj) * rfact2 |
---|
191 | ENDDO |
---|
192 | ENDDO |
---|
193 | ENDDO |
---|
194 | ENDIF |
---|
195 | ENDIF |
---|
196 | |
---|
197 | ! Add the external input of nutrients from nitrogen deposition |
---|
198 | ! ---------------------------------------------------------- |
---|
199 | IF( ln_ndepo ) THEN |
---|
200 | tra(:,:,1,jpno3) = tra(:,:,1,jpno3) + nitdep(:,:) * rfact2 |
---|
201 | tra(:,:,1,jptal) = tra(:,:,1,jptal) - rno3 * nitdep(:,:) * rfact2 |
---|
202 | ENDIF |
---|
203 | |
---|
204 | ! Add the external input of iron from hydrothermal vents |
---|
205 | ! ------------------------------------------------------ |
---|
206 | IF( ln_hydrofe ) THEN |
---|
207 | tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 |
---|
208 | IF( ln_ligand ) THEN |
---|
209 | tra(:,:,:,jplgw) = tra(:,:,:,jplgw) + ( hydrofe(:,:,:) * lgw_rath ) * rfact2 |
---|
210 | ENDIF |
---|
211 | ! |
---|
212 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "HYDR" ) ) & |
---|
213 | & CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input |
---|
214 | ENDIF |
---|
215 | |
---|
216 | ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments |
---|
217 | ! -------------------------------------------------------------------- |
---|
218 | DO jj = 1, jpj |
---|
219 | DO ji = 1, jpi |
---|
220 | ikt = mbkt(ji,jj) |
---|
221 | zdep = e3t_n(ji,jj,ikt) / xstep |
---|
222 | zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) |
---|
223 | zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) |
---|
224 | END DO |
---|
225 | END DO |
---|
226 | ! |
---|
227 | IF( .NOT.lk_sed ) THEN |
---|
228 | ! |
---|
229 | ! Add the external input of iron from sediment mobilization |
---|
230 | ! ------------------------------------------------------ |
---|
231 | IF( ln_ironsed ) THEN |
---|
232 | tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 |
---|
233 | ! |
---|
234 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironsed" ) ) & |
---|
235 | & CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments |
---|
236 | ENDIF |
---|
237 | |
---|
238 | ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used |
---|
239 | ! Computation of the fraction of organic matter that is permanently buried from Dunne's model |
---|
240 | ! ------------------------------------------------------- |
---|
241 | DO jj = 1, jpj |
---|
242 | DO ji = 1, jpi |
---|
243 | IF( tmask(ji,jj,1) == 1 ) THEN |
---|
244 | ikt = mbkt(ji,jj) |
---|
245 | zflx = ( trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) & |
---|
246 | & + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E3 * 1E6 / 1E4 |
---|
247 | zflx = LOG10( MAX( 1E-3, zflx ) ) |
---|
248 | zo2 = LOG10( MAX( 10. , trb(ji,jj,ikt,jpoxy) * 1E6 ) ) |
---|
249 | zno3 = LOG10( MAX( 1. , trb(ji,jj,ikt,jpno3) * 1E6 * rno3 ) ) |
---|
250 | zdep = LOG10( gdepw_n(ji,jj,ikt+1) ) |
---|
251 | zdenit2d(ji,jj) = -2.2567 - 1.185 * zflx - 0.221 * zflx**2 - 0.3995 * zno3 * zo2 + 1.25 * zno3 & |
---|
252 | & + 0.4721 * zo2 - 0.0996 * zdep + 0.4256 * zflx * zo2 |
---|
253 | zdenit2d(ji,jj) = 10.0**( zdenit2d(ji,jj) ) |
---|
254 | ! |
---|
255 | zflx = ( trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) & |
---|
256 | & + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E6 |
---|
257 | zbureff(ji,jj) = 0.013 + 0.53 * zflx**2 / ( 7.0 + zflx )**2 |
---|
258 | ENDIF |
---|
259 | END DO |
---|
260 | END DO |
---|
261 | ! |
---|
262 | ENDIF |
---|
263 | |
---|
264 | ! This loss is scaled at each bottom grid cell for equilibrating the total budget of silica in the ocean. |
---|
265 | ! Thus, the amount of silica lost in the sediments equal the supply at the surface (dust+rivers) |
---|
266 | ! ------------------------------------------------------ |
---|
267 | IF( .NOT.lk_sed ) zrivsil = 1._wp - sedsilfrac |
---|
268 | |
---|
269 | DO jj = 1, jpj |
---|
270 | DO ji = 1, jpi |
---|
271 | ikt = mbkt(ji,jj) |
---|
272 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
273 | zwsc = zwsbio4(ji,jj) * zdep |
---|
274 | zsiloss = trb(ji,jj,ikt,jpgsi) * zwsc |
---|
275 | zcaloss = trb(ji,jj,ikt,jpcal) * zwsc |
---|
276 | ! |
---|
277 | tra(ji,jj,ikt,jpgsi) = tra(ji,jj,ikt,jpgsi) - zsiloss |
---|
278 | tra(ji,jj,ikt,jpcal) = tra(ji,jj,ikt,jpcal) - zcaloss |
---|
279 | END DO |
---|
280 | END DO |
---|
281 | ! |
---|
282 | IF( .NOT.lk_sed ) THEN |
---|
283 | DO jj = 1, jpj |
---|
284 | DO ji = 1, jpi |
---|
285 | ikt = mbkt(ji,jj) |
---|
286 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
287 | zwsc = zwsbio4(ji,jj) * zdep |
---|
288 | zsiloss = trb(ji,jj,ikt,jpgsi) * zwsc |
---|
289 | zcaloss = trb(ji,jj,ikt,jpcal) * zwsc |
---|
290 | tra(ji,jj,ikt,jpsil) = tra(ji,jj,ikt,jpsil) + zsiloss * zrivsil |
---|
291 | ! |
---|
292 | zfactcal = MIN( excess(ji,jj,ikt), 0.2 ) |
---|
293 | zfactcal = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) ) |
---|
294 | zrivalk = sedcalfrac * zfactcal |
---|
295 | tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + zcaloss * zrivalk * 2.0 |
---|
296 | tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zcaloss * zrivalk |
---|
297 | zsedcal(ji,jj) = (1.0 - zrivalk) * zcaloss * e3t_n(ji,jj,ikt) |
---|
298 | zsedsi (ji,jj) = (1.0 - zrivsil) * zsiloss * e3t_n(ji,jj,ikt) |
---|
299 | END DO |
---|
300 | END DO |
---|
301 | ENDIF |
---|
302 | ! |
---|
303 | DO jj = 1, jpj |
---|
304 | DO ji = 1, jpi |
---|
305 | ikt = mbkt(ji,jj) |
---|
306 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
307 | zws4 = zwsbio4(ji,jj) * zdep |
---|
308 | zws3 = zwsbio3(ji,jj) * zdep |
---|
309 | tra(ji,jj,ikt,jpgoc) = tra(ji,jj,ikt,jpgoc) - trb(ji,jj,ikt,jpgoc) * zws4 |
---|
310 | tra(ji,jj,ikt,jppoc) = tra(ji,jj,ikt,jppoc) - trb(ji,jj,ikt,jppoc) * zws3 |
---|
311 | tra(ji,jj,ikt,jpbfe) = tra(ji,jj,ikt,jpbfe) - trb(ji,jj,ikt,jpbfe) * zws4 |
---|
312 | tra(ji,jj,ikt,jpsfe) = tra(ji,jj,ikt,jpsfe) - trb(ji,jj,ikt,jpsfe) * zws3 |
---|
313 | END DO |
---|
314 | END DO |
---|
315 | ! |
---|
316 | IF( ln_p5z ) THEN |
---|
317 | DO jj = 1, jpj |
---|
318 | DO ji = 1, jpi |
---|
319 | ikt = mbkt(ji,jj) |
---|
320 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
321 | zws4 = zwsbio4(ji,jj) * zdep |
---|
322 | zws3 = zwsbio3(ji,jj) * zdep |
---|
323 | tra(ji,jj,ikt,jpgon) = tra(ji,jj,ikt,jpgon) - trb(ji,jj,ikt,jpgon) * zws4 |
---|
324 | tra(ji,jj,ikt,jppon) = tra(ji,jj,ikt,jppon) - trb(ji,jj,ikt,jppon) * zws3 |
---|
325 | tra(ji,jj,ikt,jpgop) = tra(ji,jj,ikt,jpgop) - trb(ji,jj,ikt,jpgop) * zws4 |
---|
326 | tra(ji,jj,ikt,jppop) = tra(ji,jj,ikt,jppop) - trb(ji,jj,ikt,jppop) * zws3 |
---|
327 | END DO |
---|
328 | END DO |
---|
329 | ENDIF |
---|
330 | |
---|
331 | IF( .NOT.lk_sed ) THEN |
---|
332 | ! The 0.5 factor in zpdenit is to avoid negative NO3 concentration after |
---|
333 | ! denitrification in the sediments. Not very clever, but simpliest option. |
---|
334 | DO jj = 1, jpj |
---|
335 | DO ji = 1, jpi |
---|
336 | ikt = mbkt(ji,jj) |
---|
337 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
338 | zws4 = zwsbio4(ji,jj) * zdep |
---|
339 | zws3 = zwsbio3(ji,jj) * zdep |
---|
340 | zrivno3 = 1. - zbureff(ji,jj) |
---|
341 | zwstpoc = trb(ji,jj,ikt,jpgoc) * zws4 + trb(ji,jj,ikt,jppoc) * zws3 |
---|
342 | zpdenit = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 ) |
---|
343 | z1pdenit = zwstpoc * zrivno3 - zpdenit |
---|
344 | zolimit = MIN( ( trb(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) ) |
---|
345 | tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit |
---|
346 | tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit |
---|
347 | tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit |
---|
348 | tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * zpdenit |
---|
349 | tra(ji,jj,ikt,jpoxy) = tra(ji,jj,ikt,jpoxy) - zolimit * o2ut |
---|
350 | tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * zpdenit ) |
---|
351 | tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit |
---|
352 | sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt) |
---|
353 | zsedc(ji,jj) = (1. - zrivno3) * zwstpoc * e3t_n(ji,jj,ikt) |
---|
354 | IF( ln_p5z ) THEN |
---|
355 | zwstpop = trb(ji,jj,ikt,jpgop) * zws4 + trb(ji,jj,ikt,jppop) * zws3 |
---|
356 | zwstpon = trb(ji,jj,ikt,jpgon) * zws4 + trb(ji,jj,ikt,jppon) * zws3 |
---|
357 | tra(ji,jj,ikt,jpdon) = tra(ji,jj,ikt,jpdon) + ( z1pdenit - zolimit ) * zwstpon / (zwstpoc + rtrn) |
---|
358 | tra(ji,jj,ikt,jpdop) = tra(ji,jj,ikt,jpdop) + ( z1pdenit - zolimit ) * zwstpop / (zwstpoc + rtrn) |
---|
359 | ENDIF |
---|
360 | END DO |
---|
361 | END DO |
---|
362 | ENDIF |
---|
363 | |
---|
364 | |
---|
365 | ! Nitrogen fixation process |
---|
366 | ! Small source iron from particulate inorganic iron |
---|
367 | !----------------------------------- |
---|
368 | DO jk = 1, jpkm1 |
---|
369 | zlight (:,:,jk) = ( 1.- EXP( -etot_ndcy(:,:,jk) / diazolight ) ) * ( 1. - fr_i(:,:) ) |
---|
370 | zsoufer(:,:,jk) = zlight(:,:,jk) * 2E-11 / ( 2E-11 + biron(:,:,jk) ) |
---|
371 | ENDDO |
---|
372 | IF( ln_p4z ) THEN |
---|
373 | DO jk = 1, jpkm1 |
---|
374 | DO jj = 1, jpj |
---|
375 | DO ji = 1, jpi |
---|
376 | ! ! Potential nitrogen fixation dependant on temperature and iron |
---|
377 | ztemp = tsn(ji,jj,jk,jp_tem) |
---|
378 | zmudia = MAX( 0.,-0.001096*ztemp**2 + 0.057*ztemp -0.637 ) * 7.625 |
---|
379 | ! Potential nitrogen fixation dependant on temperature and iron |
---|
380 | xdianh4 = trb(ji,jj,jk,jpnh4) / ( concnnh4 + trb(ji,jj,jk,jpnh4) ) |
---|
381 | xdiano3 = trb(ji,jj,jk,jpno3) / ( concnno3 + trb(ji,jj,jk,jpno3) ) * (1. - xdianh4) |
---|
382 | zlim = ( 1.- xdiano3 - xdianh4 ) |
---|
383 | IF( zlim <= 0.1 ) zlim = 0.01 |
---|
384 | zfact = zlim * rfact2 |
---|
385 | ztrfer = biron(ji,jj,jk) / ( concfediaz + biron(ji,jj,jk) ) |
---|
386 | ztrpo4(ji,jj,jk) = trb(ji,jj,jk,jppo4) / ( 1E-6 + trb(ji,jj,jk,jppo4) ) |
---|
387 | ztrdp = ztrpo4(ji,jj,jk) |
---|
388 | nitrpot(ji,jj,jk) = zmudia * r1_rday * zfact * MIN( ztrfer, ztrdp ) * zlight(ji,jj,jk) |
---|
389 | END DO |
---|
390 | END DO |
---|
391 | END DO |
---|
392 | ELSE ! p5z |
---|
393 | DO jk = 1, jpkm1 |
---|
394 | DO jj = 1, jpj |
---|
395 | DO ji = 1, jpi |
---|
396 | ! ! Potential nitrogen fixation dependant on temperature and iron |
---|
397 | ztemp = tsn(ji,jj,jk,jp_tem) |
---|
398 | zmudia = MAX( 0.,-0.001096*ztemp**2 + 0.057*ztemp -0.637 ) * 7.625 |
---|
399 | ! Potential nitrogen fixation dependant on temperature and iron |
---|
400 | xdianh4 = trb(ji,jj,jk,jpnh4) / ( concnnh4 + trb(ji,jj,jk,jpnh4) ) |
---|
401 | xdiano3 = trb(ji,jj,jk,jpno3) / ( concnno3 + trb(ji,jj,jk,jpno3) ) * (1. - xdianh4) |
---|
402 | zlim = ( 1.- xdiano3 - xdianh4 ) |
---|
403 | IF( zlim <= 0.1 ) zlim = 0.01 |
---|
404 | zfact = zlim * rfact2 |
---|
405 | ztrfer = biron(ji,jj,jk) / ( concfediaz + biron(ji,jj,jk) ) |
---|
406 | ztrpo4(ji,jj,jk) = trb(ji,jj,jk,jppo4) / ( 1E-6 + trb(ji,jj,jk,jppo4) ) |
---|
407 | ztrdop(ji,jj,jk) = trb(ji,jj,jk,jpdop) / ( 1E-6 + trb(ji,jj,jk,jpdop) ) * (1. - ztrpo4(ji,jj,jk)) |
---|
408 | ztrdp = ztrpo4(ji,jj,jk) + ztrdop(ji,jj,jk) |
---|
409 | nitrpot(ji,jj,jk) = zmudia * r1_rday * zfact * MIN( ztrfer, ztrdp ) * zlight(ji,jj,jk) |
---|
410 | END DO |
---|
411 | END DO |
---|
412 | END DO |
---|
413 | ENDIF |
---|
414 | |
---|
415 | ! Nitrogen change due to nitrogen fixation |
---|
416 | ! ---------------------------------------- |
---|
417 | IF( ln_p4z ) THEN |
---|
418 | DO jk = 1, jpkm1 |
---|
419 | DO jj = 1, jpj |
---|
420 | DO ji = 1, jpi |
---|
421 | zfact = nitrpot(ji,jj,jk) * nitrfix |
---|
422 | tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zfact / 3.0 |
---|
423 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * zfact / 3.0 |
---|
424 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) - zfact * 2.0 / 3.0 |
---|
425 | tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zfact * 1.0 / 3.0 |
---|
426 | tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zfact * 1.0 / 3.0 * 2.0 / 3.0 |
---|
427 | tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zfact * 1.0 / 3.0 * 1.0 / 3.0 |
---|
428 | tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) + ( o2ut + o2nit ) * zfact * 2.0 / 3.0 + o2nit * zfact / 3.0 |
---|
429 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - 30E-6 * zfact * 1.0 / 3.0 |
---|
430 | tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + 30E-6 * zfact * 1.0 / 3.0 * 2.0 / 3.0 |
---|
431 | tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + 30E-6 * zfact * 1.0 / 3.0 * 1.0 / 3.0 |
---|
432 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + 0.002 * 4E-10 * zsoufer(ji,jj,jk) * rfact2 / rday |
---|
433 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + concdnh4 / ( concdnh4 + trb(ji,jj,jk,jppo4) ) & |
---|
434 | & * 0.001 * trb(ji,jj,jk,jpdoc) * xstep |
---|
435 | END DO |
---|
436 | END DO |
---|
437 | END DO |
---|
438 | ELSE ! p5z |
---|
439 | DO jk = 1, jpkm1 |
---|
440 | DO jj = 1, jpj |
---|
441 | DO ji = 1, jpi |
---|
442 | zfact = nitrpot(ji,jj,jk) * nitrfix |
---|
443 | tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zfact / 3.0 |
---|
444 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * zfact / 3.0 |
---|
445 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) - 16.0 / 46.0 * zfact * ( 1.0 - 1.0 / 3.0 ) & |
---|
446 | & * ztrpo4(ji,jj,jk) / (ztrpo4(ji,jj,jk) + ztrdop(ji,jj,jk) + rtrn) |
---|
447 | tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + zfact * 1.0 / 3.0 |
---|
448 | tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zfact * 1.0 / 3.0 |
---|
449 | tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + 16.0 / 46.0 * zfact / 3.0 & |
---|
450 | & - 16.0 / 46.0 * zfact * ztrdop(ji,jj,jk) & |
---|
451 | & / (ztrpo4(ji,jj,jk) + ztrdop(ji,jj,jk) + rtrn) |
---|
452 | tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zfact * 1.0 / 3.0 * 2.0 / 3.0 |
---|
453 | tra(ji,jj,jk,jppon) = tra(ji,jj,jk,jppon) + zfact * 1.0 / 3.0 * 2.0 /3.0 |
---|
454 | tra(ji,jj,jk,jppop) = tra(ji,jj,jk,jppop) + 16.0 / 46.0 * zfact * 1.0 / 3.0 * 2.0 /3.0 |
---|
455 | tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zfact * 1.0 / 3.0 * 1.0 / 3.0 |
---|
456 | tra(ji,jj,jk,jpgon) = tra(ji,jj,jk,jpgon) + zfact * 1.0 / 3.0 * 1.0 /3.0 |
---|
457 | tra(ji,jj,jk,jpgop) = tra(ji,jj,jk,jpgop) + 16.0 / 46.0 * zfact * 1.0 / 3.0 * 1.0 /3.0 |
---|
458 | tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) + ( o2ut + o2nit ) * zfact * 2.0 / 3.0 + o2nit * zfact / 3.0 |
---|
459 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - 30E-6 * zfact * 1.0 / 3.0 |
---|
460 | tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + 30E-6 * zfact * 1.0 / 3.0 * 2.0 / 3.0 |
---|
461 | tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + 30E-6 * zfact * 1.0 / 3.0 * 1.0 / 3.0 |
---|
462 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + 0.002 * 4E-10 * zsoufer(ji,jj,jk) * rfact2 / rday |
---|
463 | END DO |
---|
464 | END DO |
---|
465 | END DO |
---|
466 | ! |
---|
467 | ENDIF |
---|
468 | |
---|
469 | IF( lk_iomput ) THEN |
---|
470 | IF( knt == nrdttrc ) THEN |
---|
471 | zfact = 1.e+3 * rfact2r ! conversion from molC/l/kt to molN/m3/s |
---|
472 | IF( iom_use("Nfix" ) ) CALL iom_put( "Nfix", nitrpot(:,:,:) * nitrfix * rno3 * zfact * tmask(:,:,:) ) ! nitrogen fixation |
---|
473 | IF( iom_use("INTNFIX") ) THEN ! nitrogen fixation rate in ocean ( vertically integrated ) |
---|
474 | zwork(:,:) = 0. |
---|
475 | DO jk = 1, jpkm1 |
---|
476 | zwork(:,:) = zwork(:,:) + nitrpot(:,:,jk) * nitrfix * rno3 * zfact * e3t_n(:,:,jk) * tmask(:,:,jk) |
---|
477 | ENDDO |
---|
478 | CALL iom_put( "INTNFIX" , zwork ) |
---|
479 | ENDIF |
---|
480 | IF( iom_use("SedCal" ) ) CALL iom_put( "SedCal", zsedcal(:,:) * zfact ) |
---|
481 | IF( iom_use("SedSi" ) ) CALL iom_put( "SedSi", zsedsi (:,:) * zfact ) |
---|
482 | IF( iom_use("SedC" ) ) CALL iom_put( "SedC", zsedc (:,:) * zfact ) |
---|
483 | IF( iom_use("Sdenit" ) ) CALL iom_put( "Sdenit", sdenit (:,:) * zfact * rno3 ) |
---|
484 | ENDIF |
---|
485 | ENDIF |
---|
486 | ! |
---|
487 | IF(ln_ctl) THEN ! print mean trends (USEd for debugging) |
---|
488 | WRITE(charout, fmt="('sed ')") |
---|
489 | CALL prt_ctl_trc_info(charout) |
---|
490 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
491 | ENDIF |
---|
492 | ! |
---|
493 | IF( ln_p5z ) DEALLOCATE( ztrpo4, ztrdop ) |
---|
494 | ! |
---|
495 | IF( ln_timing ) CALL timing_stop('p4z_sed') |
---|
496 | ! |
---|
497 | END SUBROUTINE p4z_sed |
---|
498 | |
---|
499 | |
---|
500 | INTEGER FUNCTION p4z_sed_alloc() |
---|
501 | !!---------------------------------------------------------------------- |
---|
502 | !! *** ROUTINE p4z_sed_alloc *** |
---|
503 | !!---------------------------------------------------------------------- |
---|
504 | ALLOCATE( nitrpot(jpi,jpj,jpk), sdenit(jpi,jpj), STAT=p4z_sed_alloc ) |
---|
505 | ! |
---|
506 | IF( p4z_sed_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_sed_alloc: failed to allocate arrays' ) |
---|
507 | ! |
---|
508 | END FUNCTION p4z_sed_alloc |
---|
509 | |
---|
510 | !!====================================================================== |
---|
511 | END MODULE p4zsed |
---|