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

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

nemo_v1_update_060: SM: IOM + 301 levels + CORE + begining of ctl_stop

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