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

source: NEMO/trunk/src/TOP/PISCES/SED/sedstp.F90 @ 12377

Last change on this file since 12377 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • 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, Kbb, Kmm, Krhs )
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) ::   Kbb, Kmm, Krhs    ! 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, Kbb, Kmm, Krhs )
56
57      dtsed  = r2dttrc
58!      dtsed2 = dtsed
59      IF (kt /= nitsed000) THEN
60         CALL sed_dta( kt, Kbb, Kmm )       ! 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, Kbb )         ! 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.