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.
sedbtb.F90 in trunk/NEMO/TOP_SRC/SED – NEMO

source: trunk/NEMO/TOP_SRC/SED/sedbtb.F90 @ 1179

Last change on this file since 1179 was 1179, checked in by cetlod, 16 years ago

add new routines for the sediment model, see ticket:249

File size: 2.7 KB
Line 
1MODULE sedbtb
2#if defined key_sed
3   !!======================================================================
4   !!              ***  MODULE  sedbtb  ***
5   !!    Sediment : bioturbation of the solid components
6   !!=====================================================================
7   !! * Modules used
8   USE sed     ! sediment global variable
9   USE sedmat  ! linear system of equations
10
11   PUBLIC sed_btb
12
13
14CONTAINS
15   
16   SUBROUTINE sed_btb( kt )
17      !!---------------------------------------------------------------------
18      !!                  ***  ROUTINE sed_btb  ***
19      !!
20      !! ** Purpose :  performs bioturbation of the solid sediment components
21      !!
22      !! ** Method  :  ``diffusion'' of solid sediment components.
23      !!
24      !!   History :
25      !!        !  98-08 (E. Maier-Reimer, Christoph Heinze )  Original code
26      !!        !  04-10 (N. Emprin, M. Gehlen ) F90
27      !!        !  06-04 (C. Ethe)  Re-organization
28      !!----------------------------------------------------------------------
29      !!* Arguments
30      INTEGER, INTENT(in) ::  &
31         kt              ! time step
32
33      ! * local variables
34
35      INTEGER :: &
36         ji, jk, js
37
38      REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE ::  &
39         zsol                      ! solution
40      !------------------------------------------------------------------------
41
42      IF( kt == nitsed000 ) THEN
43         WRITE(numsed,*) ' sed_btb : Bioturbation  '
44         WRITE(numsed,*) ' '
45      ENDIF
46
47      ! Initializations
48      !----------------
49      ALLOCATE( zsol(jpoce,jpksedm1,jpsol) )
50
51      zsol(:,:,:) = 0.
52
53
54      ! right hand side of coefficient matrix
55      !--------------------------------------
56      DO js = 1, jpsol
57         DO jk = 1, jpksedm1
58            DO ji = 1, jpoce
59               zsol(ji,jk,js) = solcp(ji,jk+1,js)
60            ENDDO
61         ENDDO
62      ENDDO
63
64      CALL sed_mat( jpsol, jpoce, jpksedm1, zsol )
65
66
67      ! store solution of the tridiagonal system
68      !------------------------
69      DO js = 1, jpsol
70         DO jk = 1, jpksedm1
71            DO ji = 1, jpoce
72               solcp(ji,jk+1,js) = zsol(ji,jk,js)
73            ENDDO
74         ENDDO
75      ENDDO
76     
77      DEALLOCATE( zsol )
78
79   END SUBROUTINE sed_btb
80#else
81   !!======================================================================
82   !! MODULE sedbtb  :   Dummy module
83   !!======================================================================
84CONTAINS
85   SUBROUTINE sed_btb( kt )         ! Empty routine
86      INTEGER, INTENT(in) :: kt
87      WRITE(*,*) 'sed_btb: You should not have seen this print! error?', kt
88   END SUBROUTINE sed_btb
89
90   !!======================================================================
91
92#endif
93END MODULE sedbtb
Note: See TracBrowser for help on using the repository browser.