1 | MODULE sedstp |
---|
2 | #if defined key_sed |
---|
3 | !!====================================================================== |
---|
4 | !! *** MODULE sedstp *** |
---|
5 | !! Sediment model : Sediment model time-stepping |
---|
6 | !!====================================================================== |
---|
7 | USE sed ! sediment global variables |
---|
8 | USE seddta ! data read |
---|
9 | USE sedchem ! chemical constant |
---|
10 | USE sedco3 ! carbonate in sediment pore water |
---|
11 | USE seddsr ! dissolution reaction |
---|
12 | USE sedbtb ! bioturbation |
---|
13 | USE sedadv ! vertical advection |
---|
14 | USE sedmbc ! mass balance calculation |
---|
15 | USE sedsfc ! sediment surface data |
---|
16 | USE sedrst ! restart |
---|
17 | USE sedwri ! outputs |
---|
18 | |
---|
19 | IMPLICIT NONE |
---|
20 | PRIVATE |
---|
21 | |
---|
22 | !! * Routine accessibility |
---|
23 | PUBLIC sed_stp ! called by step.F90 |
---|
24 | |
---|
25 | !! $Id$ |
---|
26 | CONTAINS |
---|
27 | |
---|
28 | SUBROUTINE sed_stp ( kt ) |
---|
29 | !!--------------------------------------------------------------------- |
---|
30 | !! *** ROUTINE sed_stp *** |
---|
31 | !! |
---|
32 | !! ** Purpose : Sediment time stepping |
---|
33 | !! Simulation of pore water chemistry |
---|
34 | !! |
---|
35 | !! ** Action : |
---|
36 | !! |
---|
37 | !! |
---|
38 | !! History : |
---|
39 | !! ! 98-08 (E. Maier-Reimer, Christoph Heinze ) Original code |
---|
40 | !! ! 04-10 (N. Emprin, M. Gehlen ) coupled with PISCES |
---|
41 | !! ! 06-04 (C. Ethe) Re-organization |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
44 | |
---|
45 | !!---------------------------------------------------------------------- |
---|
46 | |
---|
47 | IF( kt /= nitsed000 ) THEN |
---|
48 | CALL sed_dta( kt ) ! Load Data for bot. wat. Chem and fluxes |
---|
49 | CALL sed_chem( kt ) ! update of chemical constant to account for salinity, temperature changes |
---|
50 | ENDIF |
---|
51 | CALL sed_dsr( kt ) ! Dissolution reaction |
---|
52 | CALL sed_adv( kt ) ! advection |
---|
53 | CALL sed_btb( kt ) ! Bioturbation |
---|
54 | |
---|
55 | IF ( ( MOD( kt, nwrised ) == 0 ) .OR. ( MOD( kt, nstock ) == 0 ) .OR. ( kt == nitsedend ) ) & |
---|
56 | CALL sed_co3( kt ) ! pH actualization for saving |
---|
57 | CALL sed_mbc( kt ) ! cumulation for mass balance calculation |
---|
58 | #if ! defined key_sed_off |
---|
59 | CALL sed_sfc( kt ) ! Give back new bottom wat chem to tracer model |
---|
60 | #endif |
---|
61 | CALL sed_rst_wri( kt ) ! restart file output |
---|
62 | CALL sed_wri( kt ) ! outputs |
---|
63 | |
---|
64 | IF( kt == nitsedend ) CLOSE( numsed ) |
---|
65 | |
---|
66 | END SUBROUTINE sed_stp |
---|
67 | |
---|
68 | #else |
---|
69 | !!====================================================================== |
---|
70 | !! MODULE sedstp : Dummy module |
---|
71 | !!====================================================================== |
---|
72 | !! $Id$ |
---|
73 | CONTAINS |
---|
74 | SUBROUTINE sed_stp( kt ) ! Empty routine |
---|
75 | INTEGER, INTENT(in) :: kt |
---|
76 | WRITE(*,*) 'sed_stp: You should not have seen this print! error?', kt |
---|
77 | END SUBROUTINE sed_stp |
---|
78 | #endif |
---|
79 | END MODULE sedstp |
---|