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