source: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/SED/seddiff.F90 @ 10345

Last change on this file since 10345 was 10345, checked in by smasson, 2 years ago

dev_r10164_HPC09_ESIWACE_PREP_MERGE: merge with trunk@10344, see #2133

File size: 4.0 KB
Line 
1MODULE seddiff
2   !!======================================================================
3   !!              ***  MODULE  seddsr  ***
4   !!    Sediment : dissolution and reaction in pore water related
5   !!    related to organic matter
6   !!=====================================================================
7   !! * Modules used
8   USE sed     ! sediment global variable
9   USE sed_oce
10   USE sedmat  ! linear system of equations
11   USE sedini
12   USE lib_mpp         ! distribued memory computing library
13   USE lib_fortran
14
15   IMPLICIT NONE
16   PRIVATE
17
18   PUBLIC sed_diff
19
20   !! * Module variables
21
22   !! $Id: seddsr.F90 5215 2015-04-15 16:11:56Z nicolasmartin $
23CONTAINS
24   
25   SUBROUTINE sed_diff( kt, knt ) 
26      !!----------------------------------------------------------------------
27      !!                   ***  ROUTINE sed_diff  ***
28      !!
29      !!  ** Purpose :  computes pore water diffusion
30      !!
31      !!  ** Methode :  implicit computation of undersaturation
32      !!               resulting from diffusive pore water transport.
33      !!
34      !!  ** Remarks :
35      !!              - undersaturation : deviation from saturation concentration
36      !!   History :
37      !!        !  98-08 (E. Maier-Reimer, Christoph Heinze )  Original code
38      !!        !  04-10 (N. Emprin, M. Gehlen ) f90
39      !!        !  06-04 (C. Ethe)  Re-organization
40      !!        !  19-08 (O. Aumont) Debugging and improvement of the model
41      !!----------------------------------------------------------------------
42      !! Arguments
43      INTEGER, INTENT(in) ::   kt, knt       ! number of iteration
44      ! --- local variables
45      INTEGER :: ji, jk, js   ! dummy looop indices
46
47      REAL(wp), DIMENSION(jpoce,jpksed) :: zrearat1, zrearat2   ! reaction rate in pore water
48      !!
49      !!----------------------------------------------------------------------
50
51      IF( ln_timing )  CALL timing_start('sed_diff')
52!
53      IF( kt == nitsed000 .AND. knt == 1 ) THEN
54         IF (lwp) THEN
55            WRITE(numsed,*) ' sed_diff : pore-water diffusion '
56            WRITE(numsed,*) ' '
57         ENDIF
58      ENDIF
59
60     ! Initializations
61     !----------------------
62      zrearat1(:,:)   = 0.
63      zrearat2(:,:) = 0.
64
65      !---------------------------
66      ! Solves PO4 diffusion
67      !----------------------------
68
69      ! solves tridiagonal system
70      CALL sed_mat( jwpo4, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwpo4), dtsed2 / 2.0 )
71
72      !---------------------------
73      ! Solves NH4 diffusion
74      !----------------------------
75
76      ! solves tridiagonal system
77      CALL sed_mat( jwnh4, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwnh4), dtsed2 / 2.0 )
78
79      !---------------------------
80      ! Solves Fe2+ diffusion
81      !----------------------------
82
83      ! solves tridiagonal system
84      CALL sed_mat( jwfe2, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwfe2), dtsed2 / 2.0 )
85
86      !---------------------------
87      ! Solves H2S diffusion
88      !----------------------------
89
90      ! solves tridiagonal system
91      CALL sed_mat( jwh2s, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwh2s), dtsed2 / 2.0  )
92
93      !---------------------------
94      ! Solves SO4 diffusion
95      !----------------------------
96
97      ! solves tridiagonal system
98      CALL sed_mat( jwso4, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwso4), dtsed2 / 2.0 )
99
100      !---------------------------
101      ! Solves O2 diffusion
102      !----------------------------
103
104      ! solves tridiagonal system
105      CALL sed_mat( jwoxy, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwoxy), dtsed2 / 2.0 )
106
107      !---------------------------
108      ! Solves NO3 diffusion
109      !----------------------------
110
111      ! solves tridiagonal system
112      CALL sed_mat( jwno3, jpoce, jpksed, zrearat1, zrearat2, pwcp(:,:,jwno3), dtsed2 / 2.0 )
113
114      CALL sed_mat( jwdic, jpoce, jpksed, zrearat1, zrearat2, sedligand(:,:), dtsed2 / 2.0 )
115
116      IF( ln_timing )  CALL timing_stop('sed_diff')
117!     
118   END SUBROUTINE sed_diff
119
120END MODULE seddiff
Note: See TracBrowser for help on using the repository browser.