New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
p4zsed.F90 in branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zsed.F90 @ 3381

Last change on this file since 3381 was 2457, checked in by cetlod, 14 years ago

Improve TOP & OFF components in v3.3beta, see ticket #774

  • Property svn:keywords set to Id
File size: 20.5 KB
Line 
1MODULE 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   !!----------------------------------------------------------------------
9#if defined key_pisces
10   !!----------------------------------------------------------------------
11   !!   'key_pisces'                                       PISCES bio-model
12   !!----------------------------------------------------------------------
13   !!   p4z_sed        :  Compute loss of organic matter in the sediments
14   !!   p4z_sbc        :  Read and interpolate time-varying nutrients fluxes
15   !!   p4z_sed_init   :  Initialization of p4z_sed
16   !!----------------------------------------------------------------------
17   USE trc
18   USE oce_trc         !
19   USE sms_pisces
20   USE lib_mpp
21   USE lib_fortran
22   USE prtctl_trc
23   USE p4zbio
24   USE p4zint
25   USE p4zopt
26   USE p4zsink
27   USE p4zrem
28   USE p4zlim
29   USE lbclnk
30   USE iom
31
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC   p4z_sed   
37   PUBLIC   p4z_sed_init   
38
39   !! * Shared module variables
40   LOGICAL, PUBLIC ::    &
41     ln_dustfer  = .FALSE.      ,  &  !:
42     ln_river    = .FALSE.      ,  &  !:
43     ln_ndepo    = .FALSE.      ,  &  !:
44     ln_sedinput = .FALSE.            !:
45
46   REAL(wp), PUBLIC ::   &
47     sedfeinput = 1.E-9_wp   ,  &  !:
48     dustsolub  = 0.014_wp         !:
49
50   !! * Module variables
51   REAL(wp) :: ryyss               !: number of seconds per year
52   REAL(wp) :: ryyss1              !: inverse of ryyss
53   REAL(wp) :: rmtss               !: number of seconds per month
54   REAL(wp) :: rday1               !: inverse of rday
55
56   INTEGER , PARAMETER :: &
57        jpmth = 12, jpyr = 1
58   INTEGER ::                   &
59      numdust,                  &  !: logical unit for surface fluxes data
60      nflx1 , nflx2,            &  !: first and second record used
61      nflx11, nflx12      ! ???
62   REAL(wp), DIMENSION(jpi,jpj,jpmth) ::  dustmo    !: set of dust fields
63   REAL(wp), DIMENSION(jpi,jpj)      ::  rivinp, cotdep, nitdep, dust 
64   REAL(wp), DIMENSION(jpi,jpj)      ::  e1e2t
65   REAL(wp), DIMENSION(jpi,jpj,jpk)  ::  ironsed 
66   REAL(wp) :: sumdepsi, rivalkinput, rivpo4input, nitdepinput
67
68   !!* Substitution
69#  include "top_substitute.h90"
70   !!----------------------------------------------------------------------
71   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
72   !! $Header:$
73   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
74   !!----------------------------------------------------------------------
75
76CONTAINS
77
78   SUBROUTINE p4z_sed( kt, jnt )
79      !!---------------------------------------------------------------------
80      !!                     ***  ROUTINE p4z_sed  ***
81      !!
82      !! ** Purpose :   Compute loss of organic matter in the sediments. This
83      !!              is by no way a sediment model. The loss is simply
84      !!              computed to balance the inout from rivers and dust
85      !!
86      !! ** Method  : - ???
87      !!---------------------------------------------------------------------
88      INTEGER, INTENT(in) ::   kt, jnt ! ocean time step
89      INTEGER  ::   ji, jj, jk, ikt
90#if ! defined key_sed
91      REAL(wp) ::   zsumsedsi, zsumsedpo4, zsumsedcal
92      REAL(wp) ::   zrivalk, zrivsil, zrivpo4
93#endif
94      REAL(wp) ::   zdenitot, znitrpottot, zlim, zfact
95      REAL(wp) ::   zwsbio3, zwsbio4, zwscal
96      REAL(wp), DIMENSION(jpi,jpj)     ::   zsidep
97      REAL(wp), DIMENSION(jpi,jpj)     ::   zwork, zwork1
98      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   znitrpot, zirondep
99      CHARACTER (len=25) :: charout
100      !!---------------------------------------------------------------------
101
102      IF( jnt == 1  .AND.  ln_dustfer  )  CALL p4z_sbc( kt )
103
104      ! Iron and Si deposition at the surface
105      ! -------------------------------------
106
107      DO jj = 1, jpj
108         DO ji = 1, jpi
109            zirondep(ji,jj,1) = ( dustsolub * dust(ji,jj) / ( 55.85 * rmtss ) + 3.e-10 * ryyss1 )   &
110               &             * rfact2 / fse3t(ji,jj,1)
111            zsidep  (ji,jj)   = 8.8 * 0.075 * dust(ji,jj) * rfact2 / ( fse3t(ji,jj,1) * 28.1 * rmtss )
112         END DO
113      END DO
114
115      ! Iron solubilization of particles in the water column
116      ! ----------------------------------------------------
117
118      DO jk = 2, jpkm1
119         zirondep(:,:,jk) = dust(:,:) / ( 10. * 55.85 * rmtss ) * rfact2 * 1.e-4
120      END DO
121
122      ! Add the external input of nutrients, carbon and alkalinity
123      ! ----------------------------------------------------------
124
125      trn(:,:,1,jppo4) = trn(:,:,1,jppo4) + rivinp(:,:) * rfact2 
126      trn(:,:,1,jpno3) = trn(:,:,1,jpno3) + (rivinp(:,:) + nitdep(:,:)) * rfact2
127      trn(:,:,1,jpfer) = trn(:,:,1,jpfer) + rivinp(:,:) * 3.e-5 * rfact2
128      trn(:,:,1,jpsil) = trn(:,:,1,jpsil) + zsidep (:,:) + cotdep(:,:)   * rfact2 / 6.
129      trn(:,:,1,jpdic) = trn(:,:,1,jpdic) + rivinp(:,:) * 2.631 * rfact2
130      trn(:,:,1,jptal) = trn(:,:,1,jptal) + (cotdep(:,:) - rno3*(rivinp(:,:) +  nitdep(:,:) ) ) * rfact2
131
132
133      ! Add the external input of iron which is 3D distributed
134      ! (dust, river and sediment mobilization)
135      ! ------------------------------------------------------
136
137      DO jk = 1, jpkm1
138         trn(:,:,jk,jpfer) = trn(:,:,jk,jpfer) + zirondep(:,:,jk) + ironsed(:,:,jk) * rfact2
139      END DO
140
141
142#if ! defined key_sed
143      ! Loss of biogenic silicon, Caco3 organic carbon in the sediments.
144      ! First, the total loss is computed.
145      ! The factor for calcite comes from the alkalinity effect
146      ! -------------------------------------------------------------
147      DO jj = 1, jpj
148         DO ji = 1, jpi
149            ikt = mbkt(ji,jj) 
150# if defined key_kriest
151            zwork (ji,jj) = trn(ji,jj,ikt,jpdsi) * wscal (ji,jj,ikt)
152            zwork1(ji,jj) = trn(ji,jj,ikt,jppoc) * wsbio3(ji,jj,ikt)
153# else
154            zwork (ji,jj) = trn(ji,jj,ikt,jpdsi) * wsbio4(ji,jj,ikt)
155            zwork1(ji,jj) = trn(ji,jj,ikt,jpgoc) * wsbio4(ji,jj,ikt) + trn(ji,jj,ikt,jppoc) * wsbio3(ji,jj,ikt) 
156# endif
157         END DO
158      END DO
159      zsumsedsi  = glob_sum( zwork (:,:) * e1e2t(:,:) ) * rday1
160      zsumsedpo4 = glob_sum( zwork1(:,:) * e1e2t(:,:) ) * rday1
161      DO jj = 1, jpj
162         DO ji = 1, jpi
163            ikt = mbkt(ji,jj) 
164            zwork (ji,jj) = trn(ji,jj,ikt,jpcal) * wscal (ji,jj,ikt)
165         END DO
166      END DO
167      zsumsedcal = glob_sum( zwork (:,:) * e1e2t(:,:) ) * 2.0 * rday1
168#endif
169
170      ! Then this loss is scaled at each bottom grid cell for
171      ! equilibrating the total budget of silica in the ocean.
172      ! Thus, the amount of silica lost in the sediments equal
173      ! the supply at the surface (dust+rivers)
174      ! ------------------------------------------------------
175
176      DO jj = 1, jpj
177         DO ji = 1, jpi
178            ikt = mbkt(ji,jj)
179            zfact = xstep / fse3t(ji,jj,ikt)
180            zwsbio3 = 1._wp - zfact * wsbio3(ji,jj,ikt)
181            zwsbio4 = 1._wp - zfact * wsbio4(ji,jj,ikt)
182            zwscal  = 1._wp - zfact * wscal (ji,jj,ikt)
183            !
184# if defined key_kriest
185            trn(ji,jj,ikt,jpdsi) = trn(ji,jj,ikt,jpdsi) * zwsbio4
186            trn(ji,jj,ikt,jpnum) = trn(ji,jj,ikt,jpnum) * zwsbio4
187            trn(ji,jj,ikt,jppoc) = trn(ji,jj,ikt,jppoc) * zwsbio3
188            trn(ji,jj,ikt,jpsfe) = trn(ji,jj,ikt,jpsfe) * zwsbio3
189# else
190            trn(ji,jj,ikt,jpdsi) = trn(ji,jj,ikt,jpdsi) * zwscal 
191            trn(ji,jj,ikt,jpgoc) = trn(ji,jj,ikt,jpgoc) * zwsbio4
192            trn(ji,jj,ikt,jppoc) = trn(ji,jj,ikt,jppoc) * zwsbio3
193            trn(ji,jj,ikt,jpbfe) = trn(ji,jj,ikt,jpbfe) * zwsbio4
194            trn(ji,jj,ikt,jpsfe) = trn(ji,jj,ikt,jpsfe) * zwsbio3
195# endif
196            trn(ji,jj,ikt,jpcal) = trn(ji,jj,ikt,jpcal) * zwscal
197         END DO
198      END DO
199
200#if ! defined key_sed
201      zrivsil =  1._wp - ( sumdepsi + rivalkinput * ryyss1 / 6. ) / zsumsedsi 
202      zrivalk =  1._wp - ( rivalkinput * ryyss1 ) / zsumsedcal 
203      zrivpo4 =  1._wp - ( rivpo4input * ryyss1 ) / zsumsedpo4 
204      DO jj = 1, jpj
205         DO ji = 1, jpi
206            ikt = mbkt(ji,jj)
207            zfact = xstep / fse3t(ji,jj,ikt)
208            zwsbio3 = zfact * wsbio3(ji,jj,ikt)
209            zwsbio4 = zfact * wsbio4(ji,jj,ikt)
210            zwscal  = zfact * wscal (ji,jj,ikt)
211            trn(ji,jj,ikt,jptal) =  trn(ji,jj,ikt,jptal) + trn(ji,jj,ikt,jpcal) * zwscal  * zrivalk * 2.0
212            trn(ji,jj,ikt,jpdic) =  trn(ji,jj,ikt,jpdic) + trn(ji,jj,ikt,jpcal) * zwscal  * zrivalk
213# if defined key_kriest
214            trn(ji,jj,ikt,jpsil) =  trn(ji,jj,ikt,jpsil) + trn(ji,jj,ikt,jpdsi) * zwsbio4 * zrivsil 
215            trn(ji,jj,ikt,jpdoc) =  trn(ji,jj,ikt,jpdoc) + trn(ji,jj,ikt,jppoc) * zwsbio3 * zrivpo4 
216# else
217            trn(ji,jj,ikt,jpsil) =  trn(ji,jj,ikt,jpsil) + trn(ji,jj,ikt,jpdsi) * zwscal  * zrivsil 
218            trn(ji,jj,ikt,jpdoc) =  trn(ji,jj,ikt,jpdoc)   &
219            &                     + ( trn(ji,jj,ikt,jppoc) * zwsbio3 + trn(ji,jj,ikt,jpgoc) * zwsbio4 ) * zrivpo4
220# endif
221         END DO
222      END DO
223# endif
224
225      ! Nitrogen fixation (simple parameterization). The total gain
226      ! from nitrogen fixation is scaled to balance the loss by
227      ! denitrification
228      ! -------------------------------------------------------------
229
230      zdenitot = glob_sum( denitr(:,:,:)  * cvol(:,:,:) * xnegtr(:,:,:) ) * rdenit
231
232      ! Potential nitrogen fixation dependant on temperature and iron
233      ! -------------------------------------------------------------
234
235!CDIR NOVERRCHK
236      DO jk = 1, jpk
237!CDIR NOVERRCHK
238         DO jj = 1, jpj
239!CDIR NOVERRCHK
240            DO ji = 1, jpi
241               zlim = ( 1.- xnanono3(ji,jj,jk) - xnanonh4(ji,jj,jk) )
242               IF( zlim <= 0.2 )   zlim = 0.01
243               znitrpot(ji,jj,jk) = MAX( 0.e0, ( 0.6 * tgfunc(ji,jj,jk) - 2.15 ) * rday1 )   &
244# if defined key_degrad
245               &                  * facvol(ji,jj,jk)   &
246# endif
247               &                  * zlim * rfact2 * trn(ji,jj,jk,jpfer)   &
248               &                  / ( conc3 + trn(ji,jj,jk,jpfer) ) * ( 1.- EXP( -etot(ji,jj,jk) / 50.) )
249            END DO
250         END DO
251      END DO
252
253      znitrpottot = glob_sum( znitrpot(:,:,:) * cvol(:,:,:) )
254
255      ! Nitrogen change due to nitrogen fixation
256      ! ----------------------------------------
257
258      DO jk = 1, jpk
259         DO jj = 1, jpj
260            DO ji = 1, jpi
261               zfact = znitrpot(ji,jj,jk) * 1.e-7
262               trn(ji,jj,jk,jpnh4) = trn(ji,jj,jk,jpnh4) + zfact
263               trn(ji,jj,jk,jpoxy) = trn(ji,jj,jk,jpoxy) + zfact   * o2nit
264               trn(ji,jj,jk,jppo4) = trn(ji,jj,jk,jppo4) + 30./ 46.* zfact
265            END DO
266         END DO
267      END DO
268
269#if defined key_diatrc
270      zfact = 1.e+3 * rfact2r
271#  if  ! defined key_iomput
272      trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1)         * zfact * fse3t(:,:,1) * tmask(:,:,1)
273      trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * 1.e-7 * zfact * fse3t(:,:,1) * tmask(:,:,1)
274#  else
275      zwork (:,:)  =  ( zirondep(:,:,1) + ironsed(:,:,1) * rfact2 ) * zfact * fse3t(:,:,1) * tmask(:,:,1) 
276      zwork1(:,:)  =  znitrpot(:,:,1) * 1.e-7                       * zfact * fse3t(:,:,1) * tmask(:,:,1)
277      IF( jnt == nrdttrc ) THEN
278         CALL iom_put( "Irondep", zwork  )  ! surface downward net flux of iron
279         CALL iom_put( "Nfix"   , zwork1 )  ! nitrogen fixation at surface
280      ENDIF
281#  endif
282#endif
283      !
284       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
285         WRITE(charout, FMT="('sed ')")
286         CALL prt_ctl_trc_info(charout)
287         CALL prt_ctl_trc(tab4d=trn, mask=tmask, clinfo=ctrcnm)
288       ENDIF
289
290   END SUBROUTINE p4z_sed
291
292   SUBROUTINE p4z_sbc( kt )
293
294      !!----------------------------------------------------------------------
295      !!                  ***  ROUTINE p4z_sbc  ***
296      !!
297      !! ** Purpose :   Read and interpolate the external sources of
298      !!                nutrients
299      !!
300      !! ** Method  :   Read the files and interpolate the appropriate variables
301      !!
302      !! ** input   :   external netcdf files
303      !!
304      !!----------------------------------------------------------------------
305      !! * arguments
306      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
307
308      !! * Local declarations
309      INTEGER :: imois, i15, iman 
310      REAL(wp) :: zxy
311
312      !!---------------------------------------------------------------------
313
314      ! Initialization
315      ! --------------
316
317      i15 = nday / 16
318      iman  = INT( raamo )
319      imois = nmonth + i15 - 1
320      IF( imois == 0 ) imois = iman
321
322      ! Calendar computation
323      IF( kt == nit000 .OR. imois /= nflx1 ) THEN
324
325         IF( kt == nit000 )  nflx1  = 0
326
327         ! nflx1 number of the first file record used in the simulation
328         ! nflx2 number of the last  file record
329
330         nflx1 = imois
331         nflx2 = nflx1 + 1
332         nflx1 = MOD( nflx1, iman )
333         nflx2 = MOD( nflx2, iman )
334         IF( nflx1 == 0 )   nflx1 = iman
335         IF( nflx2 == 0 )   nflx2 = iman
336         IF(lwp) WRITE(numout,*) 
337         IF(lwp) WRITE(numout,*) ' p4z_sbc : first record file used nflx1 ',nflx1
338         IF(lwp) WRITE(numout,*) ' p4z_sbc : last  record file used nflx2 ',nflx2
339
340      ENDIF
341
342      ! 3. at every time step interpolation of fluxes
343      ! ---------------------------------------------
344
345      zxy = FLOAT( nday + 15 - 30 * i15 ) / 30
346      dust(:,:) = ( (1.-zxy) * dustmo(:,:,nflx1) + zxy * dustmo(:,:,nflx2) )
347
348   END SUBROUTINE p4z_sbc
349
350
351   SUBROUTINE p4z_sed_init
352
353      !!----------------------------------------------------------------------
354      !!                  ***  ROUTINE p4z_sed_init  ***
355      !!
356      !! ** Purpose :   Initialization of the external sources of nutrients
357      !!
358      !! ** Method  :   Read the files and compute the budget
359      !!      called at the first timestep (nit000)
360      !!
361      !! ** input   :   external netcdf files
362      !!
363      !!----------------------------------------------------------------------
364
365      INTEGER :: ji, jj, jk, jm
366      INTEGER :: numriv, numbath, numdep
367
368
369      REAL(wp) ::   zcoef
370      REAL(wp) ::   expide, denitide,zmaskt
371      REAL(wp) , DIMENSION (jpi,jpj)     ::   riverdoc, river, ndepo
372      REAL(wp) , DIMENSION (jpi,jpj,jpk) ::   cmask
373
374      NAMELIST/nampissed/ ln_dustfer, ln_river, ln_ndepo, ln_sedinput, sedfeinput, dustsolub
375
376
377      REWIND( numnat )                     ! read numnat
378      READ  ( numnat, nampissed )
379
380      IF(lwp) THEN
381         WRITE(numout,*) ' '
382         WRITE(numout,*) ' Namelist : nampissed '
383         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~ '
384         WRITE(numout,*) '    Dust input from the atmosphere           ln_dustfer  = ', ln_dustfer
385         WRITE(numout,*) '    River input of nutrients                 ln_river    = ', ln_river
386         WRITE(numout,*) '    Atmospheric deposition of N              ln_ndepo    = ', ln_ndepo
387         WRITE(numout,*) '    Fe input from sediments                  ln_sedinput = ', ln_sedinput
388         WRITE(numout,*) '    Coastal release of Iron                  sedfeinput  =', sedfeinput
389         WRITE(numout,*) '    Solubility of the dust                   dustsolub   =', dustsolub
390      ENDIF
391
392      ! Dust input from the atmosphere
393      ! ------------------------------
394      IF( ln_dustfer ) THEN
395         IF(lwp) WRITE(numout,*) '    Initialize dust input from atmosphere '
396         IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
397         CALL iom_open ( 'dust.orca.nc', numdust )
398         DO jm = 1, jpmth
399            CALL iom_get( numdust, jpdom_data, 'dust', dustmo(:,:,jm), jm )
400         END DO
401         CALL iom_close( numdust )
402      ELSE
403         dustmo(:,:,:) = 0.e0
404         dust(:,:) = 0.0
405      ENDIF
406
407      ! Nutrient input from rivers
408      ! --------------------------
409      IF( ln_river ) THEN
410         IF(lwp) WRITE(numout,*) '    Initialize the nutrient input by rivers from river.orca.nc file'
411         IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
412         CALL iom_open ( 'river.orca.nc', numriv )
413         CALL iom_get  ( numriv, jpdom_data, 'riverdic', river   (:,:), jpyr )
414         CALL iom_get  ( numriv, jpdom_data, 'riverdoc', riverdoc(:,:), jpyr )
415         CALL iom_close( numriv )
416      ELSE
417         river   (:,:) = 0.e0
418         riverdoc(:,:) = 0.e0
419      endif
420
421      ! Nutrient input from dust
422      ! ------------------------
423      IF( ln_ndepo ) THEN
424         IF(lwp) WRITE(numout,*) '    Initialize the nutrient input by dust from ndeposition.orca.nc'
425         IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
426         CALL iom_open ( 'ndeposition.orca.nc', numdep )
427         CALL iom_get  ( numdep, jpdom_data, 'ndep', ndepo(:,:), jpyr )
428         CALL iom_close( numdep )
429      ELSE
430         ndepo(:,:) = 0.e0
431      ENDIF
432
433      ! Coastal and island masks
434      ! ------------------------
435      IF( ln_sedinput ) THEN     
436         IF(lwp) WRITE(numout,*) '    Computation of an island mask to enhance coastal supply of iron'
437         IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
438         IF(lwp) WRITE(numout,*) '       from bathy.orca.nc file '
439         CALL iom_open ( 'bathy.orca.nc', numbath )
440         CALL iom_get  ( numbath, jpdom_data, 'bathy', cmask(:,:,:), jpyr )
441         CALL iom_close( numbath )
442         !
443         DO jk = 1, 5
444            DO jj = 2, jpjm1
445               DO ji = fs_2, fs_jpim1
446                  IF( tmask(ji,jj,jk) /= 0. ) THEN
447                     zmaskt = tmask(ji+1,jj,jk) * tmask(ji-1,jj,jk) * tmask(ji,jj+1,jk)    &
448                        &                       * tmask(ji,jj-1,jk) * tmask(ji,jj,jk+1)
449                     IF( zmaskt == 0. )   cmask(ji,jj,jk ) = MAX( 0.1, cmask(ji,jj,jk) ) 
450                  ENDIF
451               END DO
452            END DO
453         END DO
454         DO jk = 1, jpk
455            DO jj = 1, jpj
456               DO ji = 1, jpi
457                  expide   = MIN( 8.,( fsdept(ji,jj,jk) / 500. )**(-1.5) )
458                  denitide = -0.9543 + 0.7662 * LOG( expide ) - 0.235 * LOG( expide )**2
459                  cmask(ji,jj,jk) = cmask(ji,jj,jk) * MIN( 1., EXP( denitide ) / 0.5 )
460               END DO
461            END DO
462         END DO
463      ELSE
464         cmask(:,:,:) = 0.e0
465      ENDIF
466
467      CALL lbc_lnk( cmask , 'T', 1. )      ! Lateral boundary conditions on cmask   (sign unchanged)
468
469
470      !                                    ! Number of seconds per year and per month
471      ryyss  = nyear_len(1) * rday
472      rmtss  = ryyss / raamo
473      rday1  = 1. / rday
474      ryyss1 = 1. / ryyss
475      !                                    ! ocean surface cell
476      e1e2t(:,:) = e1t(:,:) * e2t(:,:)
477
478      ! total atmospheric supply of Si
479      ! ------------------------------
480      sumdepsi = 0.e0
481      DO jm = 1, jpmth
482         zcoef = 1. / ( 12. * rmtss ) * 8.8 * 0.075 / 28.1       
483         sumdepsi = sumdepsi + glob_sum( dustmo(:,:,jm) * e1e2t(:,:) ) * zcoef
484      ENDDO
485
486      ! N/P and Si releases due to coastal rivers
487      ! -----------------------------------------
488      DO jj = 1, jpj
489         DO ji = 1, jpi
490            zcoef = ryyss * e1e2t(ji,jj)  * fse3t(ji,jj,1) * tmask(ji,jj,1) 
491            cotdep(ji,jj) =  river(ji,jj)                  *1E9 / ( 12. * zcoef + rtrn )
492            rivinp(ji,jj) = (river(ji,jj)+riverdoc(ji,jj)) *1E9 / ( 31.6* zcoef + rtrn )
493            nitdep(ji,jj) = 7.6 * ndepo(ji,jj)                  / ( 14E6*ryyss*fse3t(ji,jj,1) + rtrn )
494         END DO
495      END DO
496      ! Lateral boundary conditions on ( cotdep, rivinp, nitdep )   (sign unchanged)
497      CALL lbc_lnk( cotdep , 'T', 1. )  ;  CALL lbc_lnk( rivinp , 'T', 1. )  ;  CALL lbc_lnk( nitdep , 'T', 1. )
498
499      rivpo4input = glob_sum( rivinp(:,:) * cvol(:,:,1) ) * ryyss
500      rivalkinput = glob_sum( cotdep(:,:) * cvol(:,:,1) ) * ryyss
501      nitdepinput = glob_sum( nitdep(:,:) * cvol(:,:,1) ) * ryyss
502
503
504      ! Coastal supply of iron
505      ! -------------------------
506      DO jk = 1, jpkm1
507         ironsed(:,:,jk) = sedfeinput * cmask(:,:,jk) / ( fse3t(:,:,jk) * rday )
508      END DO
509      CALL lbc_lnk( ironsed , 'T', 1. )      ! Lateral boundary conditions on ( ironsed )   (sign unchanged)
510
511
512   END SUBROUTINE p4z_sed_init
513
514#else
515   !!======================================================================
516   !!  Dummy module :                                   No PISCES bio-model
517   !!======================================================================
518CONTAINS
519   SUBROUTINE p4z_sed                         ! Empty routine
520   END SUBROUTINE p4z_sed
521#endif 
522
523   !!======================================================================
524END MODULE  p4zsed
Note: See TracBrowser for help on using the repository browser.