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 trunk/NEMO/OFF_SRC – NEMO

source: trunk/NEMO/OFF_SRC/stpctl.F90 @ 342

Last change on this file since 342 was 325, checked in by opalod, 19 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1MODULE 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
24CONTAINS
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      !!----------------------------------------------------------------------
48      !!  OPA 8.5, LODYC-IPSL (2002)
49      !!----------------------------------------------------------------------
50
51      IF( kt == nit000 .AND. lwp ) THEN
52         WRITE(numout,*)
53         WRITE(numout,*) 'stp_ctl : time-stepping control'
54         WRITE(numout,*) '~~~~~~~'
55         ! open time.step file
56         CALL ctlopn( numstp, 'time.step', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', 1, numout, lwp, 1 )
57      ENDIF
58
59      ! save the current time step in numstp
60      ! ------------------------------------
61      IF(lwp) WRITE(numstp,9100) kt
62      IF(lwp) REWIND(numstp)
639100  FORMAT(1x, i8)
64
65
66   END SUBROUTINE stp_ctl
67
68   !!======================================================================
69END MODULE stpctl
Note: See TracBrowser for help on using the repository browser.