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 branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/SAS_SRC – NEMO

source: branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/SAS_SRC/step.F90 @ 5443

Last change on this file since 5443 was 5443, checked in by davestorkey, 9 years ago

Update 2015/dev_r5021_UKMO1_CICE_coupling branch to revision 5442 of the trunk.

  • Property svn:keywords set to Id
File size: 4.5 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 sbc_oce
20   USE sbccpl
21   USE iom              !
22   USE lbclnk
23#if defined key_iomput
24   USE xios
25#endif
26
27   USE daymod           ! calendar                         (day     routine)
28
29   USE sbcmod           ! surface boundary condition       (sbc     routine)
30   USE sbcrnf           ! surface boundary condition: runoff variables
31
32   USE eosbn2           ! equation of state                (eos_bn2 routine)
33
34   USE diawri           ! Standard run outputs             (dia_wri routine)
35   USE stpctl           ! time stepping control            (stp_ctl routine)
36   USE prtctl           ! Print control                    (prt_ctl routine)
37
38   USE timing           ! Timing           
39
40   IMPLICIT NONE
41   PRIVATE
42
43   PUBLIC   stp   ! called by opa.F90
44
45   !! * Substitutions
46#  include "domzgr_substitute.h90"
47#  include "zdfddm_substitute.h90"
48   !!----------------------------------------------------------------------
49   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
50   !! $Id$
51   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
52   !!----------------------------------------------------------------------
53CONTAINS
54
55#if defined key_agrif
56   SUBROUTINE stp( )
57      INTEGER             ::   kstp   ! ocean time-step index
58#else
59   SUBROUTINE stp( kstp )
60      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
61#endif
62      !!----------------------------------------------------------------------
63      !!                     ***  ROUTINE stp  ***
64      !!                     
65      !! ** Purpose : - Time stepping of SBC (surface boundary)
66      !!
67      !! ** Method  : -1- Update forcings and data 
68      !!              -2- Outputs and diagnostics
69      !!----------------------------------------------------------------------
70      INTEGER ::   indic    ! error indicator if < 0
71      !! ---------------------------------------------------------------------
72
73#if defined key_agrif
74      kstp = nit000 + Agrif_Nb_Step()
75# if defined key_iomput
76      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context )
77# endif   
78#endif   
79      IF( kstp == nit000 )   CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
80      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init)
81                             CALL iom_setkt( kstp - nit000 + 1, cxios_context )   ! tell iom we are at time step kstp
82
83                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
84
85                             CALL dia_wri( kstp )         ! ocean model: outputs
86
87                             indic = 0                    ! although indic is not changed in stp_ctl
88                                                          ! need to keep the same interface
89                             CALL stp_ctl( kstp, indic )
90      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
91      ! Coupled mode
92      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
93      IF( lk_oasis    )  CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges if OASIS-coupled ice
94
95#if defined key_iomput
96      IF( kstp == nitend .OR. indic < 0 ) THEN
97                             CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF
98      ENDIF
99#endif
100      !
101      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset
102      !
103   END SUBROUTINE stp
104
105   !!======================================================================
106END MODULE step
Note: See TracBrowser for help on using the repository browser.