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/2012/dev_MERGE_2012/NEMOGCM/NEMO/SAS_SRC – NEMO

source: branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/SAS_SRC/step.F90 @ 3750

Last change on this file since 3750 was 3362, checked in by sga, 12 years ago

NEMO branch dev_r3322_NOCS09_SAS: Restructure standalone code to reduce impact on SBC code.

Moral: never talk to Gurvan just as you are finishing a development branch.

File size: 3.9 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
22   USE daymod           ! calendar                         (day     routine)
23
24   USE sbcmod           ! surface boundary condition       (sbc     routine)
25   USE sbcrnf           ! surface boundary condition: runoff variables
26
27   USE eosbn2           ! equation of state                (eos_bn2 routine)
28
29   USE diawri           ! Standard run outputs             (dia_wri routine)
30   USE stpctl           ! time stepping control            (stp_ctl routine)
31   USE prtctl           ! Print control                    (prt_ctl routine)
32
33   USE timing           ! Timing           
34
35   IMPLICIT NONE
36   PRIVATE
37
38   PUBLIC   stp   ! called by opa.F90
39
40   !! * Substitutions
41#  include "domzgr_substitute.h90"
42#  include "zdfddm_substitute.h90"
43   !!----------------------------------------------------------------------
44   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
45   !! $Id: step.F90 3294 2012-01-28 16:44:18Z rblod $
46   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
47   !!----------------------------------------------------------------------
48CONTAINS
49
50#if defined key_agrif
51   SUBROUTINE stp( )
52      INTEGER             ::   kstp   ! ocean time-step index
53#else
54   SUBROUTINE stp( kstp )
55      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
56#endif
57      !!----------------------------------------------------------------------
58      !!                     ***  ROUTINE stp  ***
59      !!                     
60      !! ** Purpose : - Time stepping of SBC (surface boundary)
61      !!
62      !! ** Method  : -1- Update forcings and data 
63      !!              -2- Outputs and diagnostics
64      !!----------------------------------------------------------------------
65      INTEGER ::   indic    ! error indicator if < 0
66      !! ---------------------------------------------------------------------
67
68#if defined key_agrif
69      kstp = nit000 + Agrif_Nb_Step()
70# if defined key_iomput
71      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap
72# endif   
73#endif   
74      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init)
75                             CALL iom_setkt( kstp )       ! say to iom that we are at time step kstp
76
77                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
78
79                             CALL dia_wri( kstp )         ! ocean model: outputs
80
81                             indic = 0                    ! although indic is not changed in stp_ctl
82                                                          ! need to keep the same interface
83                             CALL stp_ctl( kstp, indic )
84      !
85      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset
86      !
87   END SUBROUTINE stp
88
89   !!======================================================================
90END MODULE step
Note: See TracBrowser for help on using the repository browser.