1 | MODULE 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 | !!---------------------------------------------------------------------- |
---|
48 | CONTAINS |
---|
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 | !!====================================================================== |
---|
90 | END MODULE step |
---|