1 | MODULE stpctl |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE stpctl *** |
---|
4 | !! Ocean run control : Off-line case, only save the time step in numstp |
---|
5 | !!====================================================================== |
---|
6 | !! History : OPA ! 1991-03 (G. Madec) Original code |
---|
7 | !! 6.0 ! 1992-06 (M. Imbard) |
---|
8 | !! 8.0 ! 1997-06 (A.M. Treguier) |
---|
9 | !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module |
---|
10 | !! 2.0 ! 2009-07 (G. Madec) Add statistic for time-spliting |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | !! stp_ctl : Control the run |
---|
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 lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
20 | USE lib_mpp ! distributed memory computing |
---|
21 | |
---|
22 | IMPLICIT NONE |
---|
23 | PRIVATE |
---|
24 | |
---|
25 | PUBLIC stp_ctl ! routine called by opa.F90 |
---|
26 | |
---|
27 | !!---------------------------------------------------------------------- |
---|
28 | !! NEMO/OFF 3.3 , NEMO Consortium (2010) |
---|
29 | !! $Id: stpctl.F90 2528 2010-12-27 17:33:53Z rblod $ |
---|
30 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
31 | !!---------------------------------------------------------------------- |
---|
32 | CONTAINS |
---|
33 | |
---|
34 | SUBROUTINE stp_ctl( kt, kindic ) |
---|
35 | !!---------------------------------------------------------------------- |
---|
36 | !! *** ROUTINE stp_ctl *** |
---|
37 | !! |
---|
38 | !! ** Purpose : Control the run |
---|
39 | !! |
---|
40 | !! ** Method : - Save the time step in numstp |
---|
41 | !! |
---|
42 | !! ** Actions : 'time.step' file containing the last ocean time-step |
---|
43 | !!---------------------------------------------------------------------- |
---|
44 | INTEGER, INTENT(in ) :: kt ! ocean time-step index |
---|
45 | INTEGER, INTENT(inout) :: kindic ! indicator of solver convergence |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | ! |
---|
48 | IF( kt == nit000 .AND. lwp ) THEN |
---|
49 | WRITE(numout,*) |
---|
50 | WRITE(numout,*) 'stp_ctl : time-stepping control' |
---|
51 | WRITE(numout,*) '~~~~~~~' |
---|
52 | ! open time.step file |
---|
53 | CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
54 | ENDIF |
---|
55 | ! |
---|
56 | IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp |
---|
57 | IF(lwp) REWIND( numstp ) ! -------------------------- |
---|
58 | ! |
---|
59 | END SUBROUTINE stp_ctl |
---|
60 | |
---|
61 | !!====================================================================== |
---|
62 | END MODULE stpctl |
---|