[3331] | 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) |
---|
[5215] | 30 | !! $Id$ |
---|
[3331] | 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 | |
---|
| 52 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 53 | WRITE(numout,*) |
---|
| 54 | WRITE(numout,*) 'stp_ctl : time-stepping control' |
---|
| 55 | WRITE(numout,*) '~~~~~~~' |
---|
| 56 | ! open time.step file |
---|
| 57 | CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
| 58 | ENDIF |
---|
| 59 | |
---|
| 60 | IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp |
---|
| 61 | IF(lwp) REWIND( numstp ) ! -------------------------- |
---|
| 62 | |
---|
| 63 | END SUBROUTINE stp_ctl |
---|
| 64 | |
---|
| 65 | !!====================================================================== |
---|
| 66 | END MODULE stpctl |
---|