1 | MODULE p4zsms |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE p4zsms *** |
---|
4 | !! TOP : PISCES Source Minus Sink manager |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2004-03 (O. Aumont) Original code |
---|
7 | !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | #if defined key_pisces |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! 'key_pisces' PISCES bio-model |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! p4zsms : Time loop of passive tracers sms |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
16 | USE trc ! passive tracers common variables |
---|
17 | USE trcdta |
---|
18 | USE sms_pisces ! PISCES Source Minus Sink variables |
---|
19 | USE p4zbio ! Biological model |
---|
20 | USE p4zche ! Chemical model |
---|
21 | USE p4zlys ! Calcite saturation |
---|
22 | USE p4zflx ! Gas exchange |
---|
23 | USE p4zsbc ! External source of nutrients |
---|
24 | USE p4zsed ! Sedimentation |
---|
25 | USE p4zint ! time interpolation |
---|
26 | USE iom ! I/O manager |
---|
27 | USE trdmod_oce ! Ocean trends variables |
---|
28 | USE trdmod_trc ! TOP trends variables |
---|
29 | USE sedmodel ! Sediment model |
---|
30 | USE prtctl_trc ! print control for debugging |
---|
31 | |
---|
32 | IMPLICIT NONE |
---|
33 | PRIVATE |
---|
34 | |
---|
35 | PUBLIC p4z_sms_init ! called in p4zsms.F90 |
---|
36 | PUBLIC p4z_sms ! called in p4zsms.F90 |
---|
37 | |
---|
38 | REAL(wp) :: alkbudget, no3budget, silbudget, ferbudget |
---|
39 | INTEGER :: numco2, numnut !: logical unit for co2 budget |
---|
40 | |
---|
41 | !!---------------------------------------------------------------------- |
---|
42 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
43 | !! $Id: p4zsms.F90 3320 2012-03-05 16:37:52Z cetlod $ |
---|
44 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
45 | !!---------------------------------------------------------------------- |
---|
46 | |
---|
47 | CONTAINS |
---|
48 | |
---|
49 | SUBROUTINE p4z_sms( kt ) |
---|
50 | !!--------------------------------------------------------------------- |
---|
51 | !! *** ROUTINE p4z_sms *** |
---|
52 | !! |
---|
53 | !! ** Purpose : Managment of the call to Biological sources and sinks |
---|
54 | !! routines of PISCES bio-model |
---|
55 | !! |
---|
56 | !! ** Method : - at each new day ... |
---|
57 | !! - several calls of bio and sed ??? |
---|
58 | !! - ... |
---|
59 | !!--------------------------------------------------------------------- |
---|
60 | ! |
---|
61 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
62 | !! |
---|
63 | INTEGER :: jnt, jn, jl |
---|
64 | CHARACTER (len=25) :: charout |
---|
65 | REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrdpis |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | ! |
---|
68 | IF( nn_timing == 1 ) CALL timing_start('p4z_sms') |
---|
69 | ! |
---|
70 | IF( l_trdtrc ) THEN |
---|
71 | CALL wrk_alloc( jpi, jpj, jpk, jp_pisces, ztrdpis ) |
---|
72 | DO jn = 1, jp_pisces |
---|
73 | jl = jn + jp_pcs0 - 1 |
---|
74 | ztrdpis(:,:,:,jn) = trn(:,:,:,jl) |
---|
75 | ENDDO |
---|
76 | ENDIF |
---|
77 | ! |
---|
78 | IF( kt == nittrc000 ) THEN |
---|
79 | ! |
---|
80 | CALL p4z_che ! initialize the chemical constants |
---|
81 | ! |
---|
82 | IF( .NOT. ln_rsttr ) THEN ; CALL p4z_ph_ini ! set PH at kt=nit000 |
---|
83 | ELSE ; CALL p4z_rst( nittrc000, 'READ' ) !* read or initialize all required fields |
---|
84 | ENDIF |
---|
85 | ! |
---|
86 | ENDIF |
---|
87 | ! |
---|
88 | IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 ) CALL p4z_dmp( kt ) ! Relaxation of some tracers |
---|
89 | ! |
---|
90 | IF( ndayflxtr /= nday_year ) THEN ! New days |
---|
91 | ! |
---|
92 | ndayflxtr = nday_year |
---|
93 | |
---|
94 | IF(lwp) write(numout,*) |
---|
95 | IF(lwp) write(numout,*) ' New chemical constants and various rates for biogeochemistry at new day : ', nday_year |
---|
96 | IF(lwp) write(numout,*) '~~~~~~' |
---|
97 | |
---|
98 | CALL p4z_che ! computation of chemical constants |
---|
99 | CALL p4z_int( kt ) ! computation of various rates for biogeochemistry |
---|
100 | ! |
---|
101 | ENDIF |
---|
102 | |
---|
103 | IF( ll_sbc ) CALL p4z_sbc( kt ) ! external sources of nutrients |
---|
104 | |
---|
105 | DO jnt = 1, nrdttrc ! Potential time splitting if requested |
---|
106 | ! |
---|
107 | CALL p4z_bio (kt, jnt) ! Biology |
---|
108 | CALL p4z_sed (kt, jnt) ! Sedimentation |
---|
109 | ! |
---|
110 | DO jn = jp_pcs0, jp_pcs1 |
---|
111 | trb(:,:,:,jn) = trn(:,:,:,jn) |
---|
112 | ENDDO |
---|
113 | ! |
---|
114 | END DO |
---|
115 | |
---|
116 | IF( l_trdtrc ) THEN |
---|
117 | DO jn = 1, jp_pisces |
---|
118 | jl = jn + jp_pcs0 - 1 |
---|
119 | ztrdpis(:,:,:,jn) = ( ztrdpis(:,:,:,jn) - trn(:,:,:,jl) ) * rfact2r |
---|
120 | ENDDO |
---|
121 | ENDIF |
---|
122 | |
---|
123 | CALL p4z_lys( kt ) ! Compute CaCO3 saturation |
---|
124 | CALL p4z_flx( kt ) ! Compute surface fluxes |
---|
125 | |
---|
126 | DO jn = jp_pcs0, jp_pcs1 |
---|
127 | CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) |
---|
128 | CALL lbc_lnk( trb(:,:,:,jn), 'T', 1. ) |
---|
129 | CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) |
---|
130 | END DO |
---|
131 | ! |
---|
132 | IF( lk_sed ) THEN |
---|
133 | ! |
---|
134 | CALL sed_model( kt ) ! Main program of Sediment model |
---|
135 | ! |
---|
136 | DO jn = jp_pcs0, jp_pcs1 |
---|
137 | CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) |
---|
138 | END DO |
---|
139 | ! |
---|
140 | ENDIF |
---|
141 | ! |
---|
142 | IF( lrst_trc ) CALL p4z_rst( kt, 'WRITE' ) !* Write PISCES informations in restart file |
---|
143 | ! |
---|
144 | IF( l_trdtrc ) THEN |
---|
145 | DO jn = 1, jp_pisces |
---|
146 | jl = jn + jp_pcs0 - 1 |
---|
147 | ztrdpis(:,:,:,jn) = ztrdpis(:,:,:,jn) + tra(:,:,:,jl) |
---|
148 | CALL trd_mod_trc( ztrdpis(:,:,:,jn), jn, jptra_trd_sms, kt ) ! save trends |
---|
149 | END DO |
---|
150 | CALL wrk_dealloc( jpi, jpj, jpk, jp_pisces, ztrdpis ) |
---|
151 | END IF |
---|
152 | ! |
---|
153 | CALL p4z_chk_mass( kt ) ! Mass conservation checking |
---|
154 | |
---|
155 | IF( nn_timing == 1 ) CALL timing_stop('p4z_sms') |
---|
156 | ! |
---|
157 | ! |
---|
158 | END SUBROUTINE p4z_sms |
---|
159 | |
---|
160 | SUBROUTINE p4z_sms_init |
---|
161 | !!---------------------------------------------------------------------- |
---|
162 | !! *** p4z_sms_init *** |
---|
163 | !! |
---|
164 | !! ** Purpose : read PISCES namelist |
---|
165 | !! |
---|
166 | !! ** input : file 'namelist.trc.s' containing the following |
---|
167 | !! namelist: natext, natbio, natsms |
---|
168 | !! natkriest ("key_kriest") |
---|
169 | !!---------------------------------------------------------------------- |
---|
170 | NAMELIST/nampisbio/ nrdttrc, wsbio, xkmort, ferat3, wsbio2, niter1max, niter2max |
---|
171 | #if defined key_kriest |
---|
172 | NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_ncontent, xkr_mass_min, xkr_mass_max |
---|
173 | #endif |
---|
174 | NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp |
---|
175 | NAMELIST/nampismass/ ln_check_mass |
---|
176 | !!---------------------------------------------------------------------- |
---|
177 | |
---|
178 | |
---|
179 | REWIND( numnatp ) |
---|
180 | READ ( numnatp, nampisbio ) |
---|
181 | |
---|
182 | IF(lwp) THEN ! control print |
---|
183 | WRITE(numout,*) ' Namelist : nampisbio' |
---|
184 | WRITE(numout,*) ' frequence pour la biologie nrdttrc =', nrdttrc |
---|
185 | WRITE(numout,*) ' POC sinking speed wsbio =', wsbio |
---|
186 | WRITE(numout,*) ' half saturation constant for mortality xkmort =', xkmort |
---|
187 | WRITE(numout,*) ' Fe/C in zooplankton ferat3 =', ferat3 |
---|
188 | WRITE(numout,*) ' Big particles sinking speed wsbio2 =', wsbio2 |
---|
189 | WRITE(numout,*) ' Maximum number of iterations for POC niter1max =', niter1max |
---|
190 | WRITE(numout,*) ' Maximum number of iterations for GOC niter2max =', niter2max |
---|
191 | ENDIF |
---|
192 | |
---|
193 | #if defined key_kriest |
---|
194 | |
---|
195 | ! ! nampiskrp : kriest parameters |
---|
196 | ! ! ----------------------------- |
---|
197 | xkr_eta = 0.62 |
---|
198 | xkr_zeta = 1.62 |
---|
199 | xkr_ncontent = 5.7E-6 |
---|
200 | xkr_mass_min = 0.0002 |
---|
201 | xkr_mass_max = 1. |
---|
202 | |
---|
203 | REWIND( numnatp ) ! read natkriest |
---|
204 | READ ( numnatp, nampiskrp ) |
---|
205 | |
---|
206 | IF(lwp) THEN |
---|
207 | WRITE(numout,*) |
---|
208 | WRITE(numout,*) ' Namelist : nampiskrp' |
---|
209 | WRITE(numout,*) ' Sinking exponent xkr_eta = ', xkr_eta |
---|
210 | WRITE(numout,*) ' N content exponent xkr_zeta = ', xkr_zeta |
---|
211 | WRITE(numout,*) ' N content factor xkr_ncontent = ', xkr_ncontent |
---|
212 | WRITE(numout,*) ' Minimum mass for Aggregates xkr_mass_min = ', xkr_mass_min |
---|
213 | WRITE(numout,*) ' Maximum mass for Aggregates xkr_mass_max = ', xkr_mass_max |
---|
214 | WRITE(numout,*) |
---|
215 | ENDIF |
---|
216 | |
---|
217 | |
---|
218 | ! Computation of some variables |
---|
219 | xkr_massp = xkr_ncontent * 7.625 * xkr_mass_min**xkr_zeta |
---|
220 | |
---|
221 | #endif |
---|
222 | |
---|
223 | ln_pisdmp = .true. |
---|
224 | nn_pisdmp = 1 |
---|
225 | |
---|
226 | REWIND( numnatp ) |
---|
227 | READ ( numnatp, nampisdmp ) |
---|
228 | |
---|
229 | IF(lwp) THEN ! control print |
---|
230 | WRITE(numout,*) |
---|
231 | WRITE(numout,*) ' Namelist : nampisdmp' |
---|
232 | WRITE(numout,*) ' Relaxation of tracer to glodap mean value ln_pisdmp =', ln_pisdmp |
---|
233 | WRITE(numout,*) ' Frequency of Relaxation nn_pisdmp =', nn_pisdmp |
---|
234 | WRITE(numout,*) ' ' |
---|
235 | ENDIF |
---|
236 | |
---|
237 | ln_check_mass = .false. |
---|
238 | REWIND( numnatp ) |
---|
239 | READ ( numnatp, nampismass ) |
---|
240 | IF(lwp) THEN ! control print |
---|
241 | WRITE(numout,*) ' ' |
---|
242 | WRITE(numout,*) ' Namelist parameter for mass conservation checking' |
---|
243 | WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
244 | WRITE(numout,*) ' Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass |
---|
245 | ENDIF |
---|
246 | |
---|
247 | END SUBROUTINE p4z_sms_inita |
---|
248 | |
---|
249 | SUBROUTINE p4z_ph_ini |
---|
250 | !!--------------------------------------------------------------------- |
---|
251 | !! *** ROUTINE p4z_ini_ph *** |
---|
252 | !! |
---|
253 | !! ** Purpose : Initialization of chemical variables of the carbon cycle |
---|
254 | !!--------------------------------------------------------------------- |
---|
255 | INTEGER :: ji, jj, jk |
---|
256 | REAL(wp) :: zcaralk, zbicarb, zco3 |
---|
257 | REAL(wp) :: ztmas, ztmas1 |
---|
258 | !!--------------------------------------------------------------------- |
---|
259 | |
---|
260 | ! Set PH from total alkalinity, borat (???), akb3 (???) and ak23 (???) |
---|
261 | ! -------------------------------------------------------- |
---|
262 | DO jk = 1, jpk |
---|
263 | DO jj = 1, jpj |
---|
264 | DO ji = 1, jpi |
---|
265 | ztmas = tmask(ji,jj,jk) |
---|
266 | ztmas1 = 1. - tmask(ji,jj,jk) |
---|
267 | zcaralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.E-8 / ( rtrn + akb3(ji,jj,jk) ) ) |
---|
268 | zco3 = ( zcaralk - trn(ji,jj,jk,jpdic) ) * ztmas + 0.5e-3 * ztmas1 |
---|
269 | zbicarb = ( 2. * trn(ji,jj,jk,jpdic) - zcaralk ) |
---|
270 | hi(ji,jj,jk) = ( ak23(ji,jj,jk) * zbicarb / zco3 ) * ztmas + 1.e-9 * ztmas1 |
---|
271 | END DO |
---|
272 | END DO |
---|
273 | END DO |
---|
274 | ! |
---|
275 | END SUBROUTINE p4z_ph_ini |
---|
276 | |
---|
277 | |
---|
278 | SUBROUTINE p4z_rst( kt, cdrw ) |
---|
279 | !!--------------------------------------------------------------------- |
---|
280 | !! *** ROUTINE p4z_rst *** |
---|
281 | !! |
---|
282 | !! ** Purpose : Read or write variables in restart file: |
---|
283 | !! |
---|
284 | !! WRITE(READ) mode: |
---|
285 | !! kt : number of time step since the begining of the experiment at the |
---|
286 | !! end of the current(previous) run |
---|
287 | !!--------------------------------------------------------------------- |
---|
288 | INTEGER , INTENT(in) :: kt ! ocean time-step |
---|
289 | CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag |
---|
290 | ! |
---|
291 | INTEGER :: ji, jj, jk |
---|
292 | REAL(wp) :: zcaralk, zbicarb, zco3 |
---|
293 | REAL(wp) :: ztmas, ztmas1 |
---|
294 | !!--------------------------------------------------------------------- |
---|
295 | |
---|
296 | IF( TRIM(cdrw) == 'READ' ) THEN |
---|
297 | ! |
---|
298 | IF(lwp) WRITE(numout,*) |
---|
299 | IF(lwp) WRITE(numout,*) ' p4z_rst : Read specific variables from pisces model ' |
---|
300 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' |
---|
301 | ! |
---|
302 | IF( iom_varid( numrtr, 'PH', ldstop = .FALSE. ) > 0 ) THEN |
---|
303 | CALL iom_get( numrtr, jpdom_autoglo, 'PH' , hi(:,:,:) ) |
---|
304 | ELSE |
---|
305 | ! hi(:,:,:) = 1.e-9 |
---|
306 | CALL p4z_ph_ini |
---|
307 | ENDIF |
---|
308 | CALL iom_get( numrtr, jpdom_autoglo, 'Silicalim', xksi(:,:) ) |
---|
309 | IF( iom_varid( numrtr, 'Silicamax', ldstop = .FALSE. ) > 0 ) THEN |
---|
310 | CALL iom_get( numrtr, jpdom_autoglo, 'Silicamax' , xksimax(:,:) ) |
---|
311 | ELSE |
---|
312 | xksimax(:,:) = xksi(:,:) |
---|
313 | ENDIF |
---|
314 | ! |
---|
315 | ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN |
---|
316 | IF( kt == nitrst ) THEN |
---|
317 | IF(lwp) WRITE(numout,*) |
---|
318 | IF(lwp) WRITE(numout,*) 'p4z_rst : write pisces restart file kt =', kt |
---|
319 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
320 | ENDIF |
---|
321 | CALL iom_rstput( kt, nitrst, numrtw, 'PH', hi(:,:,:) ) |
---|
322 | CALL iom_rstput( kt, nitrst, numrtw, 'Silicalim', xksi(:,:) ) |
---|
323 | CALL iom_rstput( kt, nitrst, numrtw, 'Silicamax', xksimax(:,:) ) |
---|
324 | ENDIF |
---|
325 | ! |
---|
326 | END SUBROUTINE p4z_rst |
---|
327 | |
---|
328 | SUBROUTINE p4z_dmp( kt ) |
---|
329 | !!---------------------------------------------------------------------- |
---|
330 | !! *** p4z_dmp *** |
---|
331 | !! |
---|
332 | !! ** purpose : Relaxation of some tracers |
---|
333 | !!---------------------------------------------------------------------- |
---|
334 | ! |
---|
335 | INTEGER, INTENT( in ) :: kt ! time step |
---|
336 | ! |
---|
337 | REAL(wp) :: alkmean = 2426. ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) |
---|
338 | REAL(wp) :: po4mean = 2.165 ! mean value of phosphates |
---|
339 | REAL(wp) :: no3mean = 30.90 ! mean value of nitrate |
---|
340 | REAL(wp) :: silmean = 91.51 ! mean value of silicate |
---|
341 | ! |
---|
342 | REAL(wp) :: zarea, zalksum, zpo4sum, zno3sum, zsilsum |
---|
343 | !!--------------------------------------------------------------------- |
---|
344 | |
---|
345 | |
---|
346 | IF(lwp) WRITE(numout,*) |
---|
347 | IF(lwp) WRITE(numout,*) ' p4z_dmp : Restoring of nutrients at time-step kt = ', kt |
---|
348 | IF(lwp) WRITE(numout,*) |
---|
349 | |
---|
350 | IF( cp_cfg == "orca" .AND. .NOT. lk_c1d ) THEN ! ORCA configuration (not 1D) ! |
---|
351 | ! ! --------------------------- ! |
---|
352 | ! set total alkalinity, phosphate, nitrate & silicate |
---|
353 | zarea = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6 |
---|
354 | |
---|
355 | zalksum = glob_sum( trn(:,:,:,jptal) * cvol(:,:,:) ) * zarea |
---|
356 | zpo4sum = glob_sum( trn(:,:,:,jppo4) * cvol(:,:,:) ) * zarea * po4r |
---|
357 | zno3sum = glob_sum( trn(:,:,:,jpno3) * cvol(:,:,:) ) * zarea * rno3 |
---|
358 | zsilsum = glob_sum( trn(:,:,:,jpsil) * cvol(:,:,:) ) * zarea |
---|
359 | |
---|
360 | IF(lwp) WRITE(numout,*) ' TALK mean : ', zalksum |
---|
361 | trn(:,:,:,jptal) = trn(:,:,:,jptal) * alkmean / zalksum |
---|
362 | |
---|
363 | IF(lwp) WRITE(numout,*) ' PO4 mean : ', zpo4sum |
---|
364 | trn(:,:,:,jppo4) = trn(:,:,:,jppo4) * po4mean / zpo4sum |
---|
365 | |
---|
366 | IF(lwp) WRITE(numout,*) ' NO3 mean : ', zno3sum |
---|
367 | trn(:,:,:,jpno3) = trn(:,:,:,jpno3) * no3mean / zno3sum |
---|
368 | |
---|
369 | IF(lwp) WRITE(numout,*) ' SiO3 mean : ', zsilsum |
---|
370 | trn(:,:,:,jpsil) = MIN( 400.e-6,trn(:,:,:,jpsil) * silmean / zsilsum ) |
---|
371 | ! |
---|
372 | ENDIF |
---|
373 | |
---|
374 | END SUBROUTINE p4z_dmp |
---|
375 | |
---|
376 | |
---|
377 | SUBROUTINE p4z_chk_mass( kt ) |
---|
378 | !!---------------------------------------------------------------------- |
---|
379 | !! *** ROUTINE p4z_chk_mass *** |
---|
380 | !! |
---|
381 | !! ** Purpose : Mass conservation check |
---|
382 | !! |
---|
383 | !!--------------------------------------------------------------------- |
---|
384 | ! |
---|
385 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
386 | !! |
---|
387 | !!--------------------------------------------------------------------- |
---|
388 | |
---|
389 | IF( kt == nittrc000 ) THEN |
---|
390 | IF( ln_check_mass .AND. lwp) THEN ! Open budget file of NO3, ALK, Si, Fer |
---|
391 | CALL ctl_opn( numco2, 'carbon.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) |
---|
392 | CALL ctl_opn( numnut, 'nutrient.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) |
---|
393 | ENDIF |
---|
394 | ENDIF |
---|
395 | |
---|
396 | IF( ln_check_mass .AND. kt == nitend ) THEN ! Compute the budget of NO3, ALK, Si, Fer |
---|
397 | no3budget = glob_sum( ( trn(:,:,:,jpno3) + trn(:,:,:,jpnh4) & |
---|
398 | & + trn(:,:,:,jpphy) + trn(:,:,:,jpdia) & |
---|
399 | & + trn(:,:,:,jpzoo) + trn(:,:,:,jpmes) & |
---|
400 | & + trn(:,:,:,jppoc) & |
---|
401 | #if ! defined key_kriest |
---|
402 | & + trn(:,:,:,jpgoc) & |
---|
403 | #endif |
---|
404 | & + trn(:,:,:,jpdoc) ) * cvol(:,:,:) ) |
---|
405 | ! |
---|
406 | silbudget = glob_sum( ( trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) & |
---|
407 | & + trn(:,:,:,jpdsi) ) * cvol(:,:,:) ) |
---|
408 | ! |
---|
409 | alkbudget = glob_sum( ( trn(:,:,:,jpno3) * rno3 & |
---|
410 | & + trn(:,:,:,jptal) & |
---|
411 | & + trn(:,:,:,jpcal) * 2. ) * cvol(:,:,:) ) |
---|
412 | ! |
---|
413 | ferbudget = glob_sum( ( trn(:,:,:,jpfer) + trn(:,:,:,jpnfe) & |
---|
414 | & + trn(:,:,:,jpdfe) & |
---|
415 | #if ! defined key_kriest |
---|
416 | & + trn(:,:,:,jpbfe) & |
---|
417 | #endif |
---|
418 | & + trn(:,:,:,jpsfe) & |
---|
419 | & + trn(:,:,:,jpzoo) & |
---|
420 | & + trn(:,:,:,jpmes) * ferat3 ) * cvol(:,:,:) ) |
---|
421 | |
---|
422 | ! |
---|
423 | t_atm_co2_flx = t_atm_co2_flx / glob_sum( e1e2t(:,:) ) |
---|
424 | t_oce_co2_flx = t_oce_co2_flx * 12. / 1.e15 * (-1 ) |
---|
425 | tpp = tpp * 1000. * 12. / 1.E15 |
---|
426 | t_oce_co2_exp = t_oce_co2_exp * 1000. * 12. / 1.E15 |
---|
427 | ! |
---|
428 | no3budget = no3budget / areatot |
---|
429 | silbudget = silbudget / areatot |
---|
430 | alkbudget = alkbudget / areatot |
---|
431 | ferbudget = ferbudget / areatot |
---|
432 | ! |
---|
433 | IF(lwp) THEN |
---|
434 | WRITE(numco2,9000) ndastp, t_atm_co2_flx, t_oce_co2_flx, tpp, t_oce_co2_exp |
---|
435 | WRITE(numnut,9500) ndastp, alkbudget, no3budget, silbudget, ferbudget |
---|
436 | ENDIF |
---|
437 | ! |
---|
438 | ENDIF |
---|
439 | ! |
---|
440 | 9000 FORMAT(i8,f10.5,e18.10,f10.5,f10.5) |
---|
441 | 9500 FORMAT(i8,4e18.10) |
---|
442 | ! |
---|
443 | END SUBROUTINE p4z_chk_mass |
---|
444 | |
---|
445 | #else |
---|
446 | !!====================================================================== |
---|
447 | !! Dummy module : No PISCES bio-model |
---|
448 | !!====================================================================== |
---|
449 | CONTAINS |
---|
450 | SUBROUTINE p4z_sms( kt ) ! Empty routine |
---|
451 | INTEGER, INTENT( in ) :: kt |
---|
452 | WRITE(*,*) 'p4z_sms: You should not have seen this print! error?', kt |
---|
453 | END SUBROUTINE p4z_sms |
---|
454 | #endif |
---|
455 | |
---|
456 | !!====================================================================== |
---|
457 | END MODULE p4zsms |
---|