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.
step.F90 in trunk/NEMOGCM/NEMO/SAS_SRC – NEMO

source: trunk/NEMOGCM/NEMO/SAS_SRC/step.F90 @ 5118

Last change on this file since 5118 was 4166, checked in by cetlod, 10 years ago

dev_LOCEAN_2013 : bugs corrections, see ticket #1169

File size: 4.2 KB
Line 
1MODULE step
2   !!======================================================================
3   !!                       ***  MODULE step  ***
4   !! Time-stepping    : manager of the ocean, tracer and ice time stepping
5   !!                    version for standalone surface scheme
6   !!======================================================================
7   !! History :  OPA  !  1991-03  (G. Madec)  Original code
8   !!             .   !    .                                                     
9   !!             .   !    .                                                     
10   !!   NEMO     3.5  !  2012-03  (S. Alderson)
11   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!   stp             : OPA system time-stepping
15   !!----------------------------------------------------------------------
16   USE oce              ! ocean dynamics and tracers variables
17   USE dom_oce          ! ocean space and time domain variables
18   USE in_out_manager   ! I/O manager
19   USE iom              !
20   USE lbclnk
21#if defined key_iomput
22   USE xios
23#endif
24
25   USE daymod           ! calendar                         (day     routine)
26
27   USE sbcmod           ! surface boundary condition       (sbc     routine)
28   USE sbcrnf           ! surface boundary condition: runoff variables
29
30   USE eosbn2           ! equation of state                (eos_bn2 routine)
31
32   USE diawri           ! Standard run outputs             (dia_wri routine)
33   USE stpctl           ! time stepping control            (stp_ctl routine)
34   USE prtctl           ! Print control                    (prt_ctl routine)
35
36   USE timing           ! Timing           
37
38   IMPLICIT NONE
39   PRIVATE
40
41   PUBLIC   stp   ! called by opa.F90
42
43   !! * Substitutions
44#  include "domzgr_substitute.h90"
45#  include "zdfddm_substitute.h90"
46   !!----------------------------------------------------------------------
47   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
48   !! $Id: step.F90 3294 2012-01-28 16:44:18Z rblod $
49   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
50   !!----------------------------------------------------------------------
51CONTAINS
52
53#if defined key_agrif
54   SUBROUTINE stp( )
55      INTEGER             ::   kstp   ! ocean time-step index
56#else
57   SUBROUTINE stp( kstp )
58      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
59#endif
60      !!----------------------------------------------------------------------
61      !!                     ***  ROUTINE stp  ***
62      !!                     
63      !! ** Purpose : - Time stepping of SBC (surface boundary)
64      !!
65      !! ** Method  : -1- Update forcings and data 
66      !!              -2- Outputs and diagnostics
67      !!----------------------------------------------------------------------
68      INTEGER ::   indic    ! error indicator if < 0
69      !! ---------------------------------------------------------------------
70
71#if defined key_agrif
72      kstp = nit000 + Agrif_Nb_Step()
73# if defined key_iomput
74      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( "nemo" )
75# endif   
76#endif   
77      IF( kstp == nit000 )   CALL iom_init( "nemo" )       ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
78      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init)
79                             CALL iom_setkt( kstp, "nemo" )       ! say to iom that we are at time step kstp
80
81                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
82
83                             CALL dia_wri( kstp )         ! ocean model: outputs
84
85                             indic = 0                    ! although indic is not changed in stp_ctl
86                                                          ! need to keep the same interface
87                             CALL stp_ctl( kstp, indic )
88#if defined key_iomput
89      IF( kstp == nitend )   CALL iom_context_finalize( "nemo" ) ! needed for XIOS+AGRIF
90#endif
91      !
92      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset
93      !
94   END SUBROUTINE stp
95
96   !!======================================================================
97END MODULE step
Note: See TracBrowser for help on using the repository browser.