[325] | 1 | MODULE stpctl |
---|
[2528] | 2 | !!====================================================================== |
---|
[325] | 3 | !! *** MODULE stpctl *** |
---|
[2528] | 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 | !!---------------------------------------------------------------------- |
---|
[325] | 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 | |
---|
[2528] | 25 | PUBLIC stp_ctl ! routine called by opa.F90 |
---|
| 26 | |
---|
[325] | 27 | !!---------------------------------------------------------------------- |
---|
[2528] | 28 | !! NEMO/OFF 3.3 , NEMO Consortium (2010) |
---|
| 29 | !! $Id$ |
---|
| 30 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 31 | !!---------------------------------------------------------------------- |
---|
[325] | 32 | CONTAINS |
---|
| 33 | |
---|
[2528] | 34 | SUBROUTINE stp_ctl( kt, kindic ) |
---|
[325] | 35 | !!---------------------------------------------------------------------- |
---|
| 36 | !! *** ROUTINE stp_ctl *** |
---|
| 37 | !! |
---|
| 38 | !! ** Purpose : Control the run |
---|
| 39 | !! |
---|
| 40 | !! ** Method : - Save the time step in numstp |
---|
| 41 | !! |
---|
[2528] | 42 | !! ** Actions : 'time.step' file containing the last ocean time-step |
---|
[325] | 43 | !!---------------------------------------------------------------------- |
---|
[2528] | 44 | INTEGER, INTENT(in ) :: kt ! ocean time-step index |
---|
| 45 | INTEGER, INTENT(inout) :: kindic ! indicator of solver convergence |
---|
[325] | 46 | !!---------------------------------------------------------------------- |
---|
[2528] | 47 | ! |
---|
[325] | 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 |
---|
[2528] | 53 | CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
[325] | 54 | ENDIF |
---|
[2528] | 55 | ! |
---|
| 56 | IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp |
---|
| 57 | IF(lwp) REWIND( numstp ) ! -------------------------- |
---|
| 58 | ! |
---|
[325] | 59 | END SUBROUTINE stp_ctl |
---|
| 60 | |
---|
| 61 | !!====================================================================== |
---|
| 62 | END MODULE stpctl |
---|