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 @ 941

Last change on this file since 941 was 719, checked in by ctlod, 17 years ago

get back to the nemo_v2_3 version for trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 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 9.0 , LOCEAN-IPSL  (2005)
49      !!   $Header$
50      !!   This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
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)
659100  FORMAT(1x, i8)
66
67
68   END SUBROUTINE stp_ctl
69
70   !!======================================================================
71END MODULE stpctl
Note: See TracBrowser for help on using the repository browser.