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 | !! - ! 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 | !!---------------------------------------------------------------------- |
---|
65 | CONTAINS |
---|
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 SBC (surface boundary) |
---|
78 | !! |
---|
79 | !! ** Method : -1- Update forcings and data |
---|
80 | !! -2- Outputs and diagnostics |
---|
81 | !!---------------------------------------------------------------------- |
---|
82 | INTEGER :: indic ! error indicator if < 0 |
---|
83 | !! --------------------------------------------------------------------- |
---|
84 | |
---|
85 | #if defined key_agrif |
---|
86 | kstp = nit000 + Agrif_Nb_Step() |
---|
87 | # if defined key_iomput |
---|
88 | IF( Agrif_Nbstepint() == 0 ) CALL iom_swap |
---|
89 | # endif |
---|
90 | #endif |
---|
91 | indic = 0 ! reset to no error condition |
---|
92 | IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) |
---|
93 | CALL iom_setkt( kstp ) ! say to iom that we are at time step kstp |
---|
94 | |
---|
95 | CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) |
---|
96 | |
---|
97 | CALL dia_wri( kstp ) ! ocean model: outputs |
---|
98 | |
---|
99 | indic = 0 |
---|
100 | CALL stp_ctl( kstp, indic ) |
---|
101 | IF( indic < 0 ) THEN |
---|
102 | CALL ctl_stop( 'step: indic < 0' ) |
---|
103 | CALL dia_wri_state( 'output.abort', kstp ) |
---|
104 | ENDIF |
---|
105 | ! |
---|
106 | IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset |
---|
107 | ! |
---|
108 | END SUBROUTINE stp |
---|
109 | |
---|
110 | !!====================================================================== |
---|
111 | END MODULE step |
---|