1 | MODULE stpctl |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE stpctl *** |
---|
4 | !! Ocean run control : gross check of the ocean time stepping |
---|
5 | !! version for standalone surface scheme |
---|
6 | !!====================================================================== |
---|
7 | !! History : OPA ! 1991-03 (G. Madec) Original code |
---|
8 | !! 6.0 ! 1992-06 (M. Imbard) |
---|
9 | !! 8.0 ! 1997-06 (A.M. Treguier) |
---|
10 | !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module |
---|
11 | !! 2.0 ! 2009-07 (G. Madec) Add statistic for time-spliting |
---|
12 | !! 3.5 ! 2012-03 (S. Alderson) |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! stp_ctl : Control the run |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | USE oce ! ocean dynamics and tracers variables |
---|
19 | USE dom_oce ! ocean space and time domain variables |
---|
20 | USE in_out_manager ! I/O manager |
---|
21 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
22 | USE lib_mpp ! distributed memory computing |
---|
23 | |
---|
24 | IMPLICIT NONE |
---|
25 | PRIVATE |
---|
26 | |
---|
27 | PUBLIC stp_ctl ! routine called by step.F90 |
---|
28 | !!---------------------------------------------------------------------- |
---|
29 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
30 | !! $Id: stpctl.F90 3294 2012-01-28 16:44:18Z rblod $ |
---|
31 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | |
---|
34 | CONTAINS |
---|
35 | |
---|
36 | SUBROUTINE stp_ctl( kt, kindic ) |
---|
37 | !!---------------------------------------------------------------------- |
---|
38 | !! *** ROUTINE stp_ctl *** |
---|
39 | !! |
---|
40 | !! ** Purpose : Control the run |
---|
41 | !! |
---|
42 | !! ** Method : - Save the time step in numstp |
---|
43 | !! - Print it each 50 time steps |
---|
44 | !! |
---|
45 | !! ** Actions : 'time.step' file containing the last ocean time-step |
---|
46 | !! |
---|
47 | !!---------------------------------------------------------------------- |
---|
48 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
49 | INTEGER, INTENT( inout ) :: kindic ! indicator of solver convergence |
---|
50 | !! |
---|
51 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
52 | INTEGER :: ii, ij, ik ! temporary integers |
---|
53 | REAL(wp) :: zumax, zsmin, zssh2 ! temporary scalars |
---|
54 | INTEGER, DIMENSION(3) :: ilocu ! |
---|
55 | INTEGER, DIMENSION(2) :: ilocs ! |
---|
56 | !!---------------------------------------------------------------------- |
---|
57 | |
---|
58 | IF( kt == nit000 .AND. lwp ) THEN |
---|
59 | WRITE(numout,*) |
---|
60 | WRITE(numout,*) 'stp_ctl : time-stepping control' |
---|
61 | WRITE(numout,*) '~~~~~~~' |
---|
62 | ! open time.step file |
---|
63 | CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
64 | ENDIF |
---|
65 | |
---|
66 | IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp |
---|
67 | IF(lwp) REWIND( numstp ) ! -------------------------- |
---|
68 | |
---|
69 | END SUBROUTINE stp_ctl |
---|
70 | |
---|
71 | !!====================================================================== |
---|
72 | END MODULE stpctl |
---|