New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
stpctl.F90 in branches/nemo_v3_3_beta/NEMOGCM/NEMO/OFF_SRC – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/NEMO/OFF_SRC/stpctl.F90 @ 2281

Last change on this file since 2281 was 2281, checked in by smasson, 13 years ago

set proper svn properties to all files...

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1MODULE stpctl
2   !!======================================================================
3   !!                       ***  MODULE  stpctl  ***
4   !! Ocean run control :  gross check of the ocean time stepping
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 step.F90
26   !!----------------------------------------------------------------------
27   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)
28   !! $Id$
29   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
30   !!----------------------------------------------------------------------
31
32CONTAINS
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      !!              - Print it each 50 time steps
42      !!
43      !! ** Actions :   'time.step' file containing the last ocean time-step
44      !!               
45      !!----------------------------------------------------------------------
46      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
47      INTEGER, INTENT( inout ) ::   kindic  ! indicator of solver convergence
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
55         CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
56      ENDIF
57
58      IF(lwp) WRITE ( numstp, '(1x, i8)' )   kt      !* save the current time step in numstp
59      IF(lwp) REWIND( numstp )                       !  --------------------------
60
61      !
62   END SUBROUTINE stp_ctl
63
64   !!======================================================================
65END MODULE stpctl
Note: See TracBrowser for help on using the repository browser.