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.
sedstp.F90 in NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/PISCES/SED – NEMO

source: NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/PISCES/SED/sedstp.F90 @ 10963

Last change on this file since 10963 was 10963, checked in by acc, 5 years ago

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Convert TOP routines in top-level TOP directory and all knock on effects of these conversions. SETTE tested.

  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1MODULE sedstp
2   !!======================================================================
3   !!                       ***  MODULE sedstp   ***
4   !!   Sediment model : Sediment model time-stepping
5   !!======================================================================
6   USE sed      ! sediment global variables
7   USE seddta   ! data read
8   USE sedchem  ! chemical constant
9   USE sedco3   ! carbonate in sediment pore water
10   USE sedorg   ! Organic reactions and diffusion
11   USE sedinorg ! Inorganic dissolution
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   USE trcdmp_sed
19   USE lib_mpp         ! distribued memory computing library
20   USE iom
21
22   IMPLICIT NONE
23   PRIVATE
24
25   !! * Routine accessibility
26   PUBLIC sed_stp  ! called by step.F90
27
28   !! $Id$
29CONTAINS
30
31   SUBROUTINE sed_stp ( kt, Kmm )
32      !!---------------------------------------------------------------------
33      !!                  ***  ROUTINE sed_stp  ***
34      !!
35      !! ** Purpose :   Sediment time stepping
36      !!                Simulation of pore water chemistry
37      !!
38      !! ** Action  :
39      !!
40      !!
41      !!   History :
42      !!        !  98-08 (E. Maier-Reimer, Christoph Heinze )  Original code
43      !!        !  04-10 (N. Emprin, M. Gehlen ) coupled with PISCES
44      !!        !  06-04 (C. Ethe)  Re-organization
45      !!----------------------------------------------------------------------
46      INTEGER, INTENT(in) ::   kt       ! number of iteration
47      INTEGER, INTENT(in) ::   Kmm      ! time level indices
48      INTEGER :: ji,jk,js,jn,jw
49      !!----------------------------------------------------------------------
50      IF( ln_timing )      CALL timing_start('sed_stp')
51        !
52                                CALL sed_rst_opn  ( kt )       ! Open tracer restart file
53      IF( lrst_sed )            CALL sed_rst_cal  ( kt, 'WRITE' )   ! calenda
54
55      IF(ln_sediment_offline)   CALL trc_dmp_sed  ( kt, Kmm )
56
57      dtsed  = r2dttrc
58!      dtsed2 = dtsed
59      IF (kt /= nitsed000) THEN
60         CALL sed_dta( kt )       ! Load  Data for bot. wat. Chem and fluxes
61      ENDIF
62
63      IF (sedmask == 1. ) THEN
64         IF( kt /= nitsed000 )  THEN
65           CALL sed_chem( kt )      ! update of chemical constant to account for salinity, temperature changes
66         ENDIF
67
68         CALL sed_btb( kt )         ! 1st pass of bioturbation at t+1/2
69         CALL sed_org( kt )         ! Organic related reactions and diffusion
70         CALL sed_inorg( kt )       ! Dissolution reaction
71         CALL sed_btb( kt )         ! 2nd pass of bioturbation at t+1
72         tokbot(:,:) = 0.0
73         DO jw = 1, jpwat
74            DO ji = 1, jpoce
75               tokbot(ji,jw) = pwcp(ji,1,jw) * 1.e-3 * dzkbot(ji)
76            END DO
77         ENDDO
78         CALL sed_adv( kt )         ! advection
79         CALL sed_co3( kt )         ! pH actualization for saving
80         ! This routine is commented out since it does not work at all
81         CALL sed_mbc( kt )         ! cumulation for mass balance calculation
82
83         IF (ln_sed_2way) CALL sed_sfc( kt )         ! Give back new bottom wat chem to tracer model
84      ENDIF
85      CALL sed_wri( kt )         ! outputs
86      IF( kt == nitsed000 ) THEN
87          CALL iom_close( numrsr )       ! close input tracer restart file
88!          IF(lwm) CALL FLUSH( numont )   ! flush namelist output
89      ENDIF
90      IF( lrst_sed )            CALL sed_rst_wri( kt )   ! restart file output
91
92      IF( kt == nitsedend )  CLOSE( numsed )
93
94      IF( ln_timing )   CALL timing_stop('sed_stp')
95
96   END SUBROUTINE sed_stp
97
98END MODULE sedstp
Note: See TracBrowser for help on using the repository browser.