[325] | 1 | MODULE stpctl |
---|
| 2 | !!============================================================================== |
---|
| 3 | !! *** MODULE stpctl *** |
---|
| 4 | !! Ocean run control : gross check of the ocean time stepping |
---|
| 5 | !!============================================================================== |
---|
| 6 | |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! stp_ctl : Control the run |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! * Modules used |
---|
| 11 | USE oce ! ocean dynamics and tracers variables |
---|
| 12 | USE dom_oce ! ocean space and time domain variables |
---|
| 13 | USE in_out_manager ! I/O manager |
---|
| 14 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
| 15 | USE lib_mpp ! distributed memory computing |
---|
| 16 | |
---|
| 17 | IMPLICIT NONE |
---|
| 18 | PRIVATE |
---|
| 19 | |
---|
| 20 | !! * Accessibility |
---|
| 21 | PUBLIC stp_ctl ! routine called by step.F90 |
---|
| 22 | !!---------------------------------------------------------------------- |
---|
| 23 | |
---|
| 24 | CONTAINS |
---|
| 25 | |
---|
| 26 | SUBROUTINE stp_ctl( kt ) |
---|
| 27 | !!---------------------------------------------------------------------- |
---|
| 28 | !! *** ROUTINE stp_ctl *** |
---|
| 29 | !! |
---|
| 30 | !! ** Purpose : Control the run |
---|
| 31 | !! |
---|
| 32 | !! ** Method : - Save the time step in numstp |
---|
| 33 | !! - Print it each 50 time steps |
---|
| 34 | !! - Print solver statistics in numsol |
---|
| 35 | !! - Stop the run IF problem for the solver ( indec < 0 ) |
---|
| 36 | !! |
---|
| 37 | !! History : |
---|
| 38 | !! ! 91-03 () |
---|
| 39 | !! ! 91-11 (G. Madec) |
---|
| 40 | !! ! 92-06 (M. Imbard) |
---|
| 41 | !! ! 97-06 (A.M. Treguier) |
---|
| 42 | !! 8.5 ! 02-06 (G. Madec) F90: Free form and module |
---|
| 43 | !!---------------------------------------------------------------------- |
---|
| 44 | !! * Arguments |
---|
| 45 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 46 | |
---|
| 47 | !!---------------------------------------------------------------------- |
---|
[343] | 48 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
[1152] | 49 | !! $Id$ |
---|
[343] | 50 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
[325] | 51 | !!---------------------------------------------------------------------- |
---|
| 52 | |
---|
| 53 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 54 | WRITE(numout,*) |
---|
| 55 | WRITE(numout,*) 'stp_ctl : time-stepping control' |
---|
| 56 | WRITE(numout,*) '~~~~~~~' |
---|
| 57 | ! open time.step file |
---|
| 58 | CALL ctlopn( numstp, 'time.step', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', 1, numout, lwp, 1 ) |
---|
| 59 | ENDIF |
---|
| 60 | |
---|
| 61 | ! save the current time step in numstp |
---|
| 62 | ! ------------------------------------ |
---|
| 63 | IF(lwp) WRITE(numstp,9100) kt |
---|
| 64 | IF(lwp) REWIND(numstp) |
---|
| 65 | 9100 FORMAT(1x, i8) |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | END SUBROUTINE stp_ctl |
---|
| 69 | |
---|
| 70 | !!====================================================================== |
---|
| 71 | END MODULE stpctl |
---|