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

source: branches/2012/dev_r3322_NOCS09_SAS/NEMOGCM/NEMO/SAS_SRC/step.F90 @ 3331

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

NEMO 2012 development branch dev_r3322_NOCS09_SAS
Code changes made for compilation and running of StandAlone? Surface scheme (tinkering still required)

File size: 5.8 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   !!             -   !  1991-11  (G. Madec)
9   !!             -   !  1992-06  (M. Imbard)  add a first output record
10   !!             -   !  1996-04  (G. Madec)  introduction of dynspg
11   !!             -   !  1996-04  (M.A. Foujols)  introduction of passive tracer
12   !!            8.0  !  1997-06  (G. Madec)  new architecture of call
13   !!            8.2  !  1997-06  (G. Madec, M. Imbard, G. Roullet)  free surface
14   !!             -   !  1999-02  (G. Madec, N. Grima)  hpg implicit
15   !!             -   !  2000-07  (J-M Molines, M. Imbard)  Open Bondary Conditions
16   !!   NEMO     1.0  !  2002-06  (G. Madec)  free form, suppress macro-tasking
17   !!             -   !  2004-08  (C. Talandier) New trends organization
18   !!             -   !  2005-01  (C. Ethe) Add the KPP closure scheme
19   !!             -   !  2005-11  (G. Madec)  Reorganisation of tra and dyn calls
20   !!             -   !  2006-01  (L. Debreu, C. Mazauric)  Agrif implementation
21   !!             -   !  2006-07  (S. Masson)  restart using iom
22   !!            3.2  !  2009-02  (G. Madec, R. Benshila)  reintroduicing z*-coordinate
23   !!             -   !  2009-06  (S. Masson, G. Madec)  TKE restart compatible with key_cpl
24   !!            3.3  !  2010-05  (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface
25   !!             -   !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase + merge TRC-TRA
26   !!            3.4  !  2011-04  (G. Madec, C. Ethe) Merge of dtatem and dtasal
27   !!            3.5  !  2012-03  (S. Alderson)
28   !!----------------------------------------------------------------------
29
30   !!----------------------------------------------------------------------
31   !!   stp             : OPA system time-stepping
32   !!----------------------------------------------------------------------
33   USE oce              ! ocean dynamics and tracers variables
34   USE dom_oce          ! ocean space and time domain variables
35   USE in_out_manager   ! I/O manager
36   USE iom              !
37   USE lbclnk
38
39   USE daymod           ! calendar                         (day     routine)
40
41   USE sbcmod           ! surface boundary condition       (sbc     routine)
42   USE sbcrnf           ! surface boundary condition: runoff variables
43
44   USE eosbn2           ! equation of state                (eos_bn2 routine)
45
46   USE diawri           ! Standard run outputs             (dia_wri routine)
47   USE stpctl           ! time stepping control            (stp_ctl routine)
48   USE prtctl           ! Print control                    (prt_ctl routine)
49
50   USE timing           ! Timing           
51
52   IMPLICIT NONE
53   PRIVATE
54
55   PUBLIC   stp   ! called by opa.F90
56
57   !! * Substitutions
58#  include "domzgr_substitute.h90"
59#  include "zdfddm_substitute.h90"
60   !!----------------------------------------------------------------------
61   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
62   !! $Id: step.F90 3294 2012-01-28 16:44:18Z rblod $
63   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
64   !!----------------------------------------------------------------------
65CONTAINS
66
67#if defined key_agrif
68   SUBROUTINE stp( )
69      INTEGER             ::   kstp   ! ocean time-step index
70#else
71   SUBROUTINE stp( kstp )
72      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
73#endif
74      !!----------------------------------------------------------------------
75      !!                     ***  ROUTINE stp  ***
76      !!                     
77      !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.)
78      !!              - Time stepping of LIM (dynamic and thermodynamic eqs.)
79      !!              - Tme stepping  of TRC (passive tracer eqs.)
80      !!
81      !! ** Method  : -1- Update forcings and data 
82      !!              -2- Update ocean physics
83      !!              -3- Compute the t and s trends
84      !!              -4- Update t and s
85      !!              -5- Compute the momentum trends
86      !!              -6- Update the horizontal velocity
87      !!              -7- Compute the diagnostics variables (rd,N2, div,cur,w)
88      !!              -8- Outputs and diagnostics
89      !!----------------------------------------------------------------------
90      INTEGER ::   jk       ! dummy loop indice
91      INTEGER ::   indic    ! error indicator if < 0
92      !! ---------------------------------------------------------------------
93
94#if defined key_agrif
95      kstp = nit000 + Agrif_Nb_Step()
96# if defined key_iomput
97      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap
98# endif   
99#endif   
100                             indic = 0                    ! reset to no error condition
101      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init)
102                             CALL iom_setkt( kstp )       ! say to iom that we are at time step kstp
103
104                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
105
106                             CALL dia_wri( kstp )         ! ocean model: outputs
107
108                             indic = 0
109                             CALL stp_ctl( kstp, indic )
110      IF( indic < 0      )   THEN
111                             CALL ctl_stop( 'step: indic < 0' )
112                             CALL dia_wri_state( 'output.abort', kstp )
113      ENDIF
114      !
115      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset
116      !
117   END SUBROUTINE stp
118
119   !!======================================================================
120END MODULE step
Note: See TracBrowser for help on using the repository browser.