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 p4zsink ! vertical flux of particulate matter due to sinking |
---|
17 | USE p4zopt ! optical model |
---|
18 | USE p4zlim ! Co-limitations of differents nutrients |
---|
19 | USE p4zsbc ! External source of nutrients |
---|
20 | USE p4zint ! interpolation and computation of various fields |
---|
21 | USE iom ! I/O manager |
---|
22 | USE prtctl_trc ! print control for debugging |
---|
23 | |
---|
24 | IMPLICIT NONE |
---|
25 | PRIVATE |
---|
26 | |
---|
27 | PUBLIC p4z_sed |
---|
28 | PUBLIC p4z_sed_alloc |
---|
29 | |
---|
30 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrpot !: Nitrogen fixation |
---|
31 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,: ) :: sdenit !: Nitrate reduction in the sediments |
---|
32 | REAL(wp) :: r1_rday !: inverse of rday |
---|
33 | |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
36 | !! $Id$ |
---|
37 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
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) :: zsumsedsi, zsumsedpo4, zsumsedcal |
---|
55 | REAL(wp) :: zrivalk, zrivsil, zrivno3 |
---|
56 | REAL(wp) :: zwflux, zfminus, zfplus |
---|
57 | REAL(wp) :: zlim, zfact, zfactcal |
---|
58 | REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, zdenitt, zolimit |
---|
59 | REAL(wp) :: zsiloss, zcaloss, zws3, zws4, zwsc, zdep, zwstpoc |
---|
60 | REAL(wp) :: ztrfer, ztrpo4, zwdust, zlight |
---|
61 | ! |
---|
62 | CHARACTER (len=25) :: charout |
---|
63 | REAL(wp), POINTER, DIMENSION(:,: ) :: zpdep, zsidep, zwork1, zwork2, zwork3 |
---|
64 | REAL(wp), POINTER, DIMENSION(:,: ) :: zdenit2d, zironice, zbureff |
---|
65 | REAL(wp), POINTER, DIMENSION(:,: ) :: zwsbio3, zwsbio4, zwscal |
---|
66 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zirondep, zsoufer |
---|
67 | !!--------------------------------------------------------------------- |
---|
68 | ! |
---|
69 | IF( nn_timing == 1 ) CALL timing_start('p4z_sed') |
---|
70 | ! |
---|
71 | IF( kt == nittrc000 .AND. knt == 1 ) r1_rday = 1. / rday |
---|
72 | ! |
---|
73 | ! Allocate temporary workspace |
---|
74 | CALL wrk_alloc( jpi, jpj, zdenit2d, zwork1, zwork2, zwork3, zbureff ) |
---|
75 | CALL wrk_alloc( jpi, jpj, zwsbio3, zwsbio4, zwscal ) |
---|
76 | CALL wrk_alloc( jpi, jpj, jpk, zsoufer ) |
---|
77 | |
---|
78 | zdenit2d(:,:) = 0.e0 |
---|
79 | zbureff (:,:) = 0.e0 |
---|
80 | zwork1 (:,:) = 0.e0 |
---|
81 | zwork2 (:,:) = 0.e0 |
---|
82 | zwork3 (:,:) = 0.e0 |
---|
83 | |
---|
84 | ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al. |
---|
85 | ! ---------------------------------------------------- |
---|
86 | IF( ln_ironice ) THEN |
---|
87 | ! |
---|
88 | CALL wrk_alloc( jpi, jpj, zironice ) |
---|
89 | ! |
---|
90 | DO jj = 1, jpj |
---|
91 | DO ji = 1, jpi |
---|
92 | zdep = rfact2 / e3t_n(ji,jj,1) |
---|
93 | zwflux = fmmflx(ji,jj) / 1000._wp |
---|
94 | zfminus = MIN( 0._wp, -zwflux ) * trb(ji,jj,1,jpfer) * zdep |
---|
95 | zfplus = MAX( 0._wp, -zwflux ) * icefeinput * zdep |
---|
96 | zironice(ji,jj) = zfplus + zfminus |
---|
97 | END DO |
---|
98 | END DO |
---|
99 | ! |
---|
100 | tra(:,:,1,jpfer) = tra(:,:,1,jpfer) + zironice(:,:) |
---|
101 | ! |
---|
102 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironice" ) ) & |
---|
103 | & CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice |
---|
104 | ! |
---|
105 | CALL wrk_dealloc( jpi, jpj, zironice ) |
---|
106 | ! |
---|
107 | ENDIF |
---|
108 | |
---|
109 | ! Add the external input of nutrients from dust deposition |
---|
110 | ! ---------------------------------------------------------- |
---|
111 | IF( ln_dust ) THEN |
---|
112 | ! |
---|
113 | CALL wrk_alloc( jpi, jpj, zpdep, zsidep ) |
---|
114 | CALL wrk_alloc( jpi, jpj, jpk, zirondep ) |
---|
115 | ! ! Iron and Si deposition at the surface |
---|
116 | IF( ln_solub ) THEN |
---|
117 | zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss |
---|
118 | ELSE |
---|
119 | zirondep(:,:,1) = dustsolub * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss |
---|
120 | ENDIF |
---|
121 | zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1 |
---|
122 | zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 31. / po4r |
---|
123 | ! ! Iron solubilization of particles in the water column |
---|
124 | ! ! dust in kg/m2/s ---> 1/55.85 to put in mol/Fe ; wdust in m/j |
---|
125 | zwdust = 0.03 * rday / ( wdust * 55.85 ) / ( 270. * rday ) |
---|
126 | DO jk = 2, jpkm1 |
---|
127 | zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( -gdept_n(:,:,jk) / 540. ) |
---|
128 | END DO |
---|
129 | ! ! Iron solubilization of particles in the water column |
---|
130 | tra(:,:,1,jppo4) = tra(:,:,1,jppo4) + zpdep (:,:) |
---|
131 | tra(:,:,1,jpsil) = tra(:,:,1,jpsil) + zsidep (:,:) |
---|
132 | tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + zirondep(:,:,:) |
---|
133 | ! |
---|
134 | IF( lk_iomput ) THEN |
---|
135 | IF( knt == nrdttrc ) THEN |
---|
136 | IF( iom_use( "Irondep" ) ) & |
---|
137 | & CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron |
---|
138 | IF( iom_use( "pdust" ) ) & |
---|
139 | & CALL iom_put( "pdust" , dust(:,:) / ( wdust * rday ) * tmask(:,:,1) ) ! dust concentration at surface |
---|
140 | ENDIF |
---|
141 | ENDIF |
---|
142 | CALL wrk_dealloc( jpi, jpj, zpdep, zsidep ) |
---|
143 | CALL wrk_dealloc( jpi, jpj, jpk, zirondep ) |
---|
144 | ! |
---|
145 | ENDIF |
---|
146 | |
---|
147 | ! Add the external input of nutrients from river |
---|
148 | ! ---------------------------------------------------------- |
---|
149 | IF( ln_river ) THEN |
---|
150 | DO jj = 1, jpj |
---|
151 | DO ji = 1, jpi |
---|
152 | DO jk = 1, nk_rnf(ji,jj) |
---|
153 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + rivdip(ji,jj) * rfact2 |
---|
154 | tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + rivdin(ji,jj) * rfact2 |
---|
155 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + rivdic(ji,jj) * 5.e-5 * rfact2 |
---|
156 | tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + rivdsi(ji,jj) * rfact2 |
---|
157 | tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + rivdic(ji,jj) * rfact2 |
---|
158 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + ( rivalk(ji,jj) - rno3 * rivdin(ji,jj) ) * rfact2 |
---|
159 | ENDDO |
---|
160 | ENDDO |
---|
161 | ENDDO |
---|
162 | ENDIF |
---|
163 | |
---|
164 | ! Add the external input of nutrients from nitrogen deposition |
---|
165 | ! ---------------------------------------------------------- |
---|
166 | IF( ln_ndepo ) THEN |
---|
167 | tra(:,:,1,jpno3) = tra(:,:,1,jpno3) + nitdep(:,:) * rfact2 |
---|
168 | tra(:,:,1,jptal) = tra(:,:,1,jptal) - rno3 * nitdep(:,:) * rfact2 |
---|
169 | ENDIF |
---|
170 | |
---|
171 | ! Add the external input of iron from sediment mobilization |
---|
172 | ! ------------------------------------------------------ |
---|
173 | IF( ln_ironsed ) THEN |
---|
174 | tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 |
---|
175 | ! |
---|
176 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironsed" ) ) & |
---|
177 | & CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments |
---|
178 | ENDIF |
---|
179 | |
---|
180 | ! Add the external input of iron from hydrothermal vents |
---|
181 | ! ------------------------------------------------------ |
---|
182 | IF( ln_hydrofe ) THEN |
---|
183 | tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 |
---|
184 | ! |
---|
185 | IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "HYDR" ) ) & |
---|
186 | & CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input |
---|
187 | ENDIF |
---|
188 | |
---|
189 | ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments |
---|
190 | ! -------------------------------------------------------------------- |
---|
191 | DO jj = 1, jpj |
---|
192 | DO ji = 1, jpi |
---|
193 | ikt = mbkt(ji,jj) |
---|
194 | zdep = e3t_n(ji,jj,ikt) / xstep |
---|
195 | zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) |
---|
196 | zwscal (ji,jj) = MIN( 0.99 * zdep, wscal (ji,jj,ikt) ) |
---|
197 | zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) |
---|
198 | END DO |
---|
199 | END DO |
---|
200 | |
---|
201 | IF( .NOT.lk_sed ) THEN |
---|
202 | ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used |
---|
203 | ! Computation of the fraction of organic matter that is permanently buried from Dunne's model |
---|
204 | ! ------------------------------------------------------- |
---|
205 | DO jj = 1, jpj |
---|
206 | DO ji = 1, jpi |
---|
207 | IF( tmask(ji,jj,1) == 1 ) THEN |
---|
208 | ikt = mbkt(ji,jj) |
---|
209 | zflx = ( trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) & |
---|
210 | & + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E3 * 1E6 / 1E4 |
---|
211 | zflx = LOG10( MAX( 1E-3, zflx ) ) |
---|
212 | zo2 = LOG10( MAX( 10. , trb(ji,jj,ikt,jpoxy) * 1E6 ) ) |
---|
213 | zno3 = LOG10( MAX( 1. , trb(ji,jj,ikt,jpno3) * 1E6 * rno3 ) ) |
---|
214 | zdep = LOG10( gdepw_n(ji,jj,ikt+1) ) |
---|
215 | zdenit2d(ji,jj) = -2.2567 - 1.185 * zflx - 0.221 * zflx**2 - 0.3995 * zno3 * zo2 + 1.25 * zno3 & |
---|
216 | & + 0.4721 * zo2 - 0.0996 * zdep + 0.4256 * zflx * zo2 |
---|
217 | zdenit2d(ji,jj) = 10.0**( zdenit2d(ji,jj) ) |
---|
218 | ! |
---|
219 | zflx = ( trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) & |
---|
220 | & + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E6 |
---|
221 | zbureff(ji,jj) = 0.013 + 0.53 * zflx**2 / ( 7.0 + zflx )**2 |
---|
222 | ENDIF |
---|
223 | END DO |
---|
224 | END DO |
---|
225 | |
---|
226 | ! Loss of biogenic silicon, Caco3 organic carbon in the sediments. |
---|
227 | ! First, the total loss is computed. |
---|
228 | ! The factor for calcite comes from the alkalinity effect |
---|
229 | ! ------------------------------------------------------------- |
---|
230 | DO jj = 1, jpj |
---|
231 | DO ji = 1, jpi |
---|
232 | IF( tmask(ji,jj,1) == 1 ) THEN |
---|
233 | ikt = mbkt(ji,jj) |
---|
234 | zwork1(ji,jj) = trb(ji,jj,ikt,jpgsi) * zwsbio4(ji,jj) |
---|
235 | zwork2(ji,jj) = trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) |
---|
236 | ! For calcite, burial efficiency is made a function of saturation |
---|
237 | zfactcal = MIN( excess(ji,jj,ikt), 0.2 ) |
---|
238 | zfactcal = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) ) |
---|
239 | zwork3(ji,jj) = trb(ji,jj,ikt,jpcal) * zwscal(ji,jj) * 2.e0 * zfactcal |
---|
240 | ENDIF |
---|
241 | END DO |
---|
242 | END DO |
---|
243 | zsumsedsi = glob_sum( zwork1(:,:) * e1e2t(:,:) ) * r1_rday |
---|
244 | zsumsedpo4 = glob_sum( zwork2(:,:) * e1e2t(:,:) ) * r1_rday |
---|
245 | zsumsedcal = glob_sum( zwork3(:,:) * e1e2t(:,:) ) * r1_rday |
---|
246 | ! |
---|
247 | ENDIF |
---|
248 | |
---|
249 | ! This loss is scaled at each bottom grid cell for equilibrating the total budget of silica in the ocean. |
---|
250 | ! Thus, the amount of silica lost in the sediments equal the supply at the surface (dust+rivers) |
---|
251 | ! ------------------------------------------------------ |
---|
252 | IF( .NOT.lk_sed ) zrivsil = 1._wp - ( sumdepsi + rivdsiinput * r1_ryyss ) / ( zsumsedsi + rtrn ) |
---|
253 | |
---|
254 | DO jj = 1, jpj |
---|
255 | DO ji = 1, jpi |
---|
256 | ikt = mbkt(ji,jj) |
---|
257 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
258 | zws4 = zwsbio4(ji,jj) * zdep |
---|
259 | zwsc = zwscal (ji,jj) * zdep |
---|
260 | zsiloss = trb(ji,jj,ikt,jpgsi) * zwsc |
---|
261 | zcaloss = trb(ji,jj,ikt,jpcal) * zwsc |
---|
262 | ! |
---|
263 | tra(ji,jj,ikt,jpgsi) = tra(ji,jj,ikt,jpgsi) - zsiloss |
---|
264 | tra(ji,jj,ikt,jpcal) = tra(ji,jj,ikt,jpcal) - zcaloss |
---|
265 | IF( .NOT.lk_sed ) THEN |
---|
266 | tra(ji,jj,ikt,jpsil) = tra(ji,jj,ikt,jpsil) + zsiloss * zrivsil |
---|
267 | zfactcal = MIN( excess(ji,jj,ikt), 0.2 ) |
---|
268 | zfactcal = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) ) |
---|
269 | zrivalk = 1._wp - ( rivalkinput * r1_ryyss ) * zfactcal / ( zsumsedcal + rtrn ) |
---|
270 | tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + zcaloss * zrivalk * 2.0 |
---|
271 | tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zcaloss * zrivalk |
---|
272 | ENDIF |
---|
273 | END DO |
---|
274 | END DO |
---|
275 | |
---|
276 | DO jj = 1, jpj |
---|
277 | DO ji = 1, jpi |
---|
278 | ikt = mbkt(ji,jj) |
---|
279 | zdep = xstep / e3t_n(ji,jj,ikt) |
---|
280 | zws4 = zwsbio4(ji,jj) * zdep |
---|
281 | zws3 = zwsbio3(ji,jj) * zdep |
---|
282 | zrivno3 = 1. - zbureff(ji,jj) |
---|
283 | tra(ji,jj,ikt,jpgoc) = tra(ji,jj,ikt,jpgoc) - trb(ji,jj,ikt,jpgoc) * zws4 |
---|
284 | tra(ji,jj,ikt,jppoc) = tra(ji,jj,ikt,jppoc) - trb(ji,jj,ikt,jppoc) * zws3 |
---|
285 | tra(ji,jj,ikt,jpbfe) = tra(ji,jj,ikt,jpbfe) - trb(ji,jj,ikt,jpbfe) * zws4 |
---|
286 | tra(ji,jj,ikt,jpsfe) = tra(ji,jj,ikt,jpsfe) - trb(ji,jj,ikt,jpsfe) * zws3 |
---|
287 | zwstpoc = trb(ji,jj,ikt,jpgoc) * zws4 + trb(ji,jj,ikt,jppoc) * zws3 |
---|
288 | |
---|
289 | IF( .NOT.lk_sed ) THEN |
---|
290 | ! The 0.5 factor in zpdenit and zdenitt is to avoid negative NO3 concentration after both denitrification |
---|
291 | ! in the sediments and just above the sediments. Not very clever, but simpliest option. |
---|
292 | zpdenit = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 ) |
---|
293 | z1pdenit = zwstpoc * zrivno3 - zpdenit |
---|
294 | zolimit = MIN( ( trb(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) ) |
---|
295 | zdenitt = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, z1pdenit * nitrfac(ji,jj,ikt) ) |
---|
296 | tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit - zdenitt |
---|
297 | tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit + zdenitt |
---|
298 | tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit + zdenitt |
---|
299 | tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * (zpdenit + zdenitt) |
---|
300 | tra(ji,jj,ikt,jpoxy) = tra(ji,jj,ikt,jpoxy) - zolimit * o2ut |
---|
301 | tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt) ) |
---|
302 | tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt |
---|
303 | sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt) |
---|
304 | ENDIF |
---|
305 | END DO |
---|
306 | END DO |
---|
307 | |
---|
308 | ! Nitrogen fixation process |
---|
309 | ! Small source iron from particulate inorganic iron |
---|
310 | !----------------------------------- |
---|
311 | DO jk = 1, jpkm1 |
---|
312 | DO jj = 1, jpj |
---|
313 | DO ji = 1, jpi |
---|
314 | ! ! Potential nitrogen fixation dependant on temperature and iron |
---|
315 | zlim = ( 1.- xnanono3(ji,jj,jk) - xnanonh4(ji,jj,jk) ) |
---|
316 | IF( zlim <= 0.2 ) zlim = 0.01 |
---|
317 | zfact = zlim * rfact2 |
---|
318 | |
---|
319 | ztrfer = biron(ji,jj,jk) / ( concfediaz + biron(ji,jj,jk) ) |
---|
320 | ztrpo4 = trb (ji,jj,jk,jppo4) / ( concnnh4 + trb (ji,jj,jk,jppo4) ) |
---|
321 | zlight = ( 1.- EXP( -etot_ndcy(ji,jj,jk) / diazolight ) ) |
---|
322 | nitrpot(ji,jj,jk) = MAX( 0.e0, ( 0.6 * tgfunc(ji,jj,jk) - 2.15 ) * r1_rday ) & |
---|
323 | & * zfact * MIN( ztrfer, ztrpo4 ) * zlight |
---|
324 | zsoufer(ji,jj,jk) = zlight * 2E-11 / (2E-11 + biron(ji,jj,jk)) |
---|
325 | END DO |
---|
326 | END DO |
---|
327 | END DO |
---|
328 | |
---|
329 | ! Nitrogen change due to nitrogen fixation |
---|
330 | ! ---------------------------------------- |
---|
331 | DO jk = 1, jpkm1 |
---|
332 | DO jj = 1, jpj |
---|
333 | DO ji = 1, jpi |
---|
334 | zfact = nitrpot(ji,jj,jk) * nitrfix |
---|
335 | tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zfact |
---|
336 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * zfact |
---|
337 | tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) + o2nit * zfact |
---|
338 | tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + concdnh4 / ( concdnh4 + trb(ji,jj,jk,jppo4) ) & |
---|
339 | & * 0.002 * trb(ji,jj,jk,jpdoc) * xstep |
---|
340 | tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + 0.002 * 4E-10 * zsoufer(ji,jj,jk) * xstep |
---|
341 | END DO |
---|
342 | END DO |
---|
343 | END DO |
---|
344 | |
---|
345 | IF( lk_iomput ) THEN |
---|
346 | IF( knt == nrdttrc ) THEN |
---|
347 | zfact = 1.e+3 * rfact2r * rno3 ! conversion from molC/l/kt to molN/m3/s |
---|
348 | IF( iom_use("Nfix" ) ) CALL iom_put( "Nfix", nitrpot(:,:,:) * nitrfix * zfact * tmask(:,:,:) ) ! nitrogen fixation |
---|
349 | IF( iom_use("INTNFIX") ) THEN ! nitrogen fixation rate in ocean ( vertically integrated ) |
---|
350 | zwork1(:,:) = 0. |
---|
351 | DO jk = 1, jpkm1 |
---|
352 | zwork1(:,:) = zwork1(:,:) + nitrpot(:,:,jk) * nitrfix * zfact * e3t_n(:,:,jk) * tmask(:,:,jk) |
---|
353 | ENDDO |
---|
354 | CALL iom_put( "INTNFIX" , zwork1 ) |
---|
355 | ENDIF |
---|
356 | ENDIF |
---|
357 | ENDIF |
---|
358 | ! |
---|
359 | IF(ln_ctl) THEN ! print mean trends (USEd for debugging) |
---|
360 | WRITE(charout, fmt="('sed ')") |
---|
361 | CALL prt_ctl_trc_info(charout) |
---|
362 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
363 | ENDIF |
---|
364 | ! |
---|
365 | CALL wrk_dealloc( jpi, jpj, zdenit2d, zwork1, zwork2, zwork3, zbureff ) |
---|
366 | CALL wrk_dealloc( jpi, jpj, zwsbio3, zwsbio4, zwscal ) |
---|
367 | CALL wrk_dealloc( jpi, jpj, jpk, zsoufer ) |
---|
368 | ! |
---|
369 | IF( nn_timing == 1 ) CALL timing_stop('p4z_sed') |
---|
370 | ! |
---|
371 | 9100 FORMAT(i8,3f10.5) |
---|
372 | ! |
---|
373 | END SUBROUTINE p4z_sed |
---|
374 | |
---|
375 | |
---|
376 | INTEGER FUNCTION p4z_sed_alloc() |
---|
377 | !!---------------------------------------------------------------------- |
---|
378 | !! *** ROUTINE p4z_sed_alloc *** |
---|
379 | !!---------------------------------------------------------------------- |
---|
380 | ALLOCATE( nitrpot(jpi,jpj,jpk), sdenit(jpi,jpj), STAT=p4z_sed_alloc ) |
---|
381 | ! |
---|
382 | IF( p4z_sed_alloc /= 0 ) CALL ctl_warn('p4z_sed_alloc: failed to allocate arrays') |
---|
383 | ! |
---|
384 | END FUNCTION p4z_sed_alloc |
---|
385 | |
---|
386 | |
---|
387 | !!====================================================================== |
---|
388 | END MODULE p4zsed |
---|