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.
in_out_manager.F90 in trunk/NEMO/OPA_SRC – NEMO

source: trunk/NEMO/OPA_SRC/in_out_manager.F90 @ 531

Last change on this file since 531 was 531, checked in by opalod, 18 years ago

nemo_v1_update_75 : CT : enables bit comparison between single and multiple processor runs adding nbit_cmp namelist parameter

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.0 KB
Line 
1MODULE in_out_manager   
2   !!======================================================================
3   !!                       ***  MODULE  in_out_manager  ***
4   !! Ocean physics:  vertical mixing coefficient compute from the tke
5   !!                 turbulent closure parameterization
6   !!=====================================================================
7   !! History :   8.5  !  02-06  (G. Madec)  original code
8   !!             9.0  !  06-07  (S. Masson)  iom, add ctl_stop, ctl_warn
9   !!----------------------------------------------------------------------
10
11   !!----------------------------------------------------------------------
12   !!   ctl_stop   : update momentum and tracer Kz from a tke scheme
13   !!   ctl_warn   : initialization, namelist read, and parameters control
14   !!----------------------------------------------------------------------
15   USE par_kind
16   USE par_oce
17   USE lib_print         ! formated print library
18
19   PUBLIC
20
21   !!----------------------------------------------------------------------
22   !!                   namrun namelist parameters
23   !!----------------------------------------------------------------------
24   CHARACTER (len=16) ::   cexper    = "exp0"        !: experiment name used for output filename
25   LOGICAL            ::   ln_rstart = .FALSE.       !: start from (F) rest or (T) a restart file
26   INTEGER            ::   no     = 0        ,    &  !: job number
27      &                    nrstdt = 0        ,    &  !: control of the time step (0, 1 or 2)
28      &                    nit000 = 1        ,    &  !: index of the first time step
29      &                    nitend = 10       ,    &  !: index of the last time step
30      &                    ndate0 = 961115   ,    &  !: initial calendar date aammjj
31      &                    nleapy = 0        ,    &  !: Leap year calendar flag (0/1 or 30)
32      &                    ninist = 0        ,    &  !: initial state output flag (0/1)
33      &                    nstock = 10       ,    &  !: restart file frequency
34      &                    nwrite = 10               !: outputs file frequency
35   
36   !!----------------------------------------------------------------------
37   !!                    output monitoring
38   !!----------------------------------------------------------------------
39   LOGICAL ::   ln_ctl = .FALSE.          !: run control for debugging
40   INTEGER ::   nprint =    0 ,        &  !: level of print (0 no print)
41      &         nictls =    0 ,        &  !: Start i indice for the SUM control
42      &         nictle =    0 ,        &  !: End   i indice for the SUM control
43      &         njctls =    0 ,        &  !: Start j indice for the SUM control
44      &         njctle =    0 ,        &  !: End   j indice for the SUM control
45      &         isplt  =    1 ,        &  !: number of processors following i
46      &         jsplt  =    1 ,        &  !: number of processors following j
47      &         ijsplt =    1 ,        &  !: nb of local domain = nb of processors
48      &         nbench =    0 ,        &  !: benchmark parameter (0/1)
49      &         nbit_cmp =  0             !: bit comparison mode parameter (0/1)
50
51   !!----------------------------------------------------------------------
52   !!                        logical units
53   !!----------------------------------------------------------------------
54   INTEGER ::   numstp     =  1 ,      &  !: logical unit for time step
55      &         numout     =  2 ,      &  !: logical unit for output print
56      &         numnam     =  3 ,      &  !: logical unit for namelist
57      &         numnam_ice =  4 ,      &  !: logical unit for ice namelist
58      &         numevo_ice = 17 ,      &  !: logical unit for ice variables (temp. evolution)
59      &         numsol     = 25 ,      &  !: logical unit for solver statistics
60      &         numwri     = 40 ,      &  !: logical unit for output write
61      &         numisp     = 41 ,      &  !: logical unit for island statistics
62      &         numgap     = 45 ,      &  !: logical unit for differences diagnostic
63      &         numbol     = 67 ,      &  !: logical unit for "bol" diagnostics
64      &         numptr     = 68 ,      &  !: logical unit for Poleward TRansports
65      &         numflo     = 69           !: logical unit for drifting floats
66
67   !!----------------------------------------------------------------------
68   !!                          Run control 
69   !!----------------------------------------------------------------------
70   
71   INTEGER            ::   nstop = 0 ,           &  !: error flag (=number of reason for a premature stop run)
72      &                    nwarn = 0                !: warning flag (=number of warning found during the run)
73   CHARACTER(LEN=100) ::   ctmp1, ctmp2, ctmp3      !: temporary character
74   CHARACTER (len=64) ::   cform_err="(/,' ===>>> : E R R O R',     /,'         ===========',/)"    ,   &  !:
75      &                    cform_war="(/,' ===>>> : W A R N I N G', /,'         ===============',/)"       !:
76   LOGICAL            ::   lwp               ,   &  !: boolean : true on the 1st processor only
77      &                    lsp_area = .TRUE.        !: to make a control print over a specific area
78   !!----------------------------------------------------------------------
79   !!  OPA 9.0 , LOCEAN-IPSL (2005)
80   !! $Header$
81   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
82   !!----------------------------------------------------------------------
83
84CONTAINS
85
86   SUBROUTINE ctl_stop( cd1, cd2, cd3, cd4, cd5,   &
87      &                 cd6, cd7, cd8, cd9, cd10 )
88      !!-----------------------------------------------------------------------
89      !!                  ***  ROUTINE  stop_opa  ***
90      !!
91      !! ** Purpose : ??? blah blah....
92      !!-----------------------------------------------------------------------
93      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5,   &
94         &                                       cd6, cd7, cd8, cd9, cd10
95      !!-----------------------------------------------------------------------
96      !
97      nstop = nstop + 1 
98      IF(lwp) THEN
99         WRITE(numout,"(/,' ===>>> : E R R O R',     /,'         ===========',/)") 
100         IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1
101         IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2
102         IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3
103         IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4
104         IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5
105         IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6
106         IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7
107         IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8
108         IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9
109         IF( PRESENT(cd10) ) WRITE(numout,*) cd10
110      ENDIF
111      CALL FLUSH(numout)
112      !
113   END SUBROUTINE ctl_stop
114
115
116   SUBROUTINE ctl_warn( cd1, cd2, cd3, cd4, cd5,   &
117      &                 cd6, cd7, cd8, cd9, cd10 )
118      !!-----------------------------------------------------------------------
119      !!                  ***  ROUTINE  stop_warn  ***
120      !!
121      !! ** Purpose : ???  blah blah....
122      !!-----------------------------------------------------------------------
123      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5,   &
124         &                                       cd6, cd7, cd8, cd9, cd10
125      !!-----------------------------------------------------------------------
126      !
127      nwarn = nwarn + 1 
128      IF(lwp) THEN
129         WRITE(numout,"(/,' ===>>> : W A R N I N G', /,'         ===============',/)") 
130         IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1
131         IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2
132         IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3
133         IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4
134         IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5
135         IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6
136         IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7
137         IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8
138         IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9
139         IF( PRESENT(cd10) ) WRITE(numout,*) cd10
140      ENDIF
141      CALL FLUSH(numout)
142      !
143   END SUBROUTINE ctl_warn
144
145   !!=====================================================================
146END MODULE in_out_manager
Note: See TracBrowser for help on using the repository browser.