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/2021/ticket2632_r14588_theta_sbcblk/src/TOP/PISCES/SED – NEMO

source: NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/TOP/PISCES/SED/sedstp.F90 @ 15548

Last change on this file since 15548 was 15548, checked in by gsamson, 3 years ago

update branch to the head of the trunk (r15547); ticket #2632

  • Property svn:keywords set to Id
File size: 3.2 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 sedsol   ! Organic reactions and diffusion
11   USE sedadv   ! vertical advection
12   USE sedsfc   ! sediment surface data
13   USE sedrst   ! restart
14   USE sedwri   ! outputs
15   USE sedini
16   USE trcdmp_sed
17   USE lib_mpp         ! distribued memory computing library
18   USE iom
19
20   IMPLICIT NONE
21   PRIVATE
22
23   !! * Routine accessibility
24   PUBLIC sed_stp  ! called by step.F90
25
26   !! * Substitutions
27#  include "do_loop_substitute.h90"
28#  include "domzgr_substitute.h90"
29
30   !! $Id$
31CONTAINS
32
33   SUBROUTINE sed_stp ( kt, Kbb, Kmm, Krhs )
34      !!---------------------------------------------------------------------
35      !!                  ***  ROUTINE sed_stp  ***
36      !!
37      !! ** Purpose :   Sediment time stepping
38      !!                Simulation of pore water chemistry
39      !!
40      !! ** Action  :
41      !!
42      !!
43      !!   History :
44      !!        !  98-08 (E. Maier-Reimer, Christoph Heinze )  Original code
45      !!        !  04-10 (N. Emprin, M. Gehlen ) coupled with PISCES
46      !!        !  06-04 (C. Ethe)  Re-organization
47      !!----------------------------------------------------------------------
48      INTEGER, INTENT(in) ::   kt       ! number of iteration
49      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs  ! time level indices
50
51      INTEGER :: ji,jk,js,jn,jw,jkmax,jsmax
52      !!----------------------------------------------------------------------
53      IF( ln_timing )           CALL timing_start('sed_stp')
54        !
55                                CALL sed_rst_opn  ( kt )       ! Open tracer restart file
56      IF( lrst_sed )            CALL sed_rst_cal  ( kt, 'WRITE' )   ! calenda
57
58      IF(ln_sediment_offline)   CALL trc_dmp_sed  ( kt, Kbb, Kmm, Krhs )
59
60      dtsed  = rDt_trc
61      IF (kt /= nitsed000) THEN
62         CALL sed_dta( kt, Kbb, Kmm )    ! Load  Data for bot. wat. Chem and fluxes
63      ENDIF
64
65      IF (sedmask == 1. ) THEN
66         IF( kt /= nitsed000 )  THEN
67           CALL sed_chem( kt )      ! update of chemical constant to account for salinity, temperature changes
68         ENDIF
69
70         CALL sed_sol( kt )        ! Solute diffusion and reactions
71         CALL sed_adv( kt )         ! advection
72         CALL sed_co3( kt )         ! pH actualization for saving
73
74         IF (ln_sed_2way) CALL sed_sfc( kt, Kbb )   ! Give back new bottom wat chem to tracer model
75      ENDIF
76      CALL sed_wri( kt )         ! outputs
77      IF( kt == nitsed000 ) THEN
78          CALL iom_close( numrsr )       ! close input tracer restart file
79!          IF(lwm) CALL FLUSH( numont )   ! flush namelist output
80      ENDIF
81      IF( lrst_sed )            CALL sed_rst_wri( kt )   ! restart file output
82
83      IF( kt == nitsedend )     CLOSE( numsed )
84
85      IF( ln_timing )           CALL timing_stop('sed_stp')
86
87   END SUBROUTINE sed_stp
88
89END MODULE sedstp
Note: See TracBrowser for help on using the repository browser.