[325] | 1 | MODULE stpctl |
---|
[2053] | 2 | !!====================================================================== |
---|
[325] | 3 | !! *** MODULE stpctl *** |
---|
| 4 | !! Ocean run control : gross check of the ocean time stepping |
---|
[2053] | 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 | |
---|
| 25 | PUBLIC stp_ctl ! routine called by step.F90 |
---|
| 26 | !!---------------------------------------------------------------------- |
---|
[2053] | 27 | !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) |
---|
| 28 | !! $Id$ |
---|
| 29 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
| 30 | !!---------------------------------------------------------------------- |
---|
[325] | 31 | |
---|
| 32 | CONTAINS |
---|
| 33 | |
---|
[2053] | 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 | !! - Print it each 50 time steps |
---|
| 42 | !! |
---|
[2053] | 43 | !! ** Actions : 'time.step' file containing the last ocean time-step |
---|
| 44 | !! |
---|
[325] | 45 | !!---------------------------------------------------------------------- |
---|
| 46 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
[2053] | 47 | INTEGER, INTENT( inout ) :: kindic ! indicator of solver convergence |
---|
[325] | 48 | !!---------------------------------------------------------------------- |
---|
| 49 | |
---|
| 50 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 51 | WRITE(numout,*) |
---|
| 52 | WRITE(numout,*) 'stp_ctl : time-stepping control' |
---|
| 53 | WRITE(numout,*) '~~~~~~~' |
---|
| 54 | ! open time.step file |
---|
[2053] | 55 | CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
[325] | 56 | ENDIF |
---|
| 57 | |
---|
[2053] | 58 | IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp |
---|
| 59 | IF(lwp) REWIND( numstp ) ! -------------------------- |
---|
[325] | 60 | |
---|
[2053] | 61 | ! |
---|
[325] | 62 | END SUBROUTINE stp_ctl |
---|
| 63 | |
---|
| 64 | !!====================================================================== |
---|
| 65 | END MODULE stpctl |
---|