1 | MODULE 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 | & ln_ctl = .FALSE. !: run control for debugging |
---|
27 | INTEGER :: no = 0 , & !: job number |
---|
28 | & nrstdt = 0 , & !: control of the time step (0, 1 or 2) |
---|
29 | & nit000 = 1 , & !: index of the first time step |
---|
30 | & nitend = 10 , & !: index of the last time step |
---|
31 | & ndate0 = 961115 , & !: initial calendar date aammjj |
---|
32 | & nleapy = 0 , & !: Leap year calendar flag (0/1 or 30) |
---|
33 | & ninist = 0 , & !: initial state output flag (0/1) |
---|
34 | & nbench = 0 !: benchmark parameter (0/1) |
---|
35 | |
---|
36 | !!---------------------------------------------------------------------- |
---|
37 | !! output monitoring |
---|
38 | !!---------------------------------------------------------------------- |
---|
39 | INTEGER :: nstock = 10 , & !: restart file frequency |
---|
40 | & nprint = 0 , & !: level of print (0 no print) |
---|
41 | & nwrite = 10 , & !: restart file frequency |
---|
42 | & nictls = 0 , & !: Start i indice for the SUM control |
---|
43 | & nictle = 0 , & !: End i indice for the SUM control |
---|
44 | & njctls = 0 , & !: Start j indice for the SUM control |
---|
45 | & njctle = 0 , & !: End j indice for the SUM control |
---|
46 | & isplt = 1 , & !: number of processors following i |
---|
47 | & jsplt = 1 , & !: number of processors following j |
---|
48 | & ijsplt = 1 !: nb of local domain = nb of processors |
---|
49 | |
---|
50 | !!---------------------------------------------------------------------- |
---|
51 | !! logical units |
---|
52 | !!---------------------------------------------------------------------- |
---|
53 | INTEGER :: numstp = 1 , & !: logical unit for time step |
---|
54 | & numout = 2 , & !: logical unit for output print |
---|
55 | & numnam = 3 , & !: logical unit for namelist |
---|
56 | & numnam_ice = 4 , & !: logical unit for ice namelist |
---|
57 | & numevo_ice = 17 , & !: logical unit for ice variables (temp. evolution) |
---|
58 | & numsol = 25 , & !: logical unit for solver statistics |
---|
59 | & numwri = 40 , & !: logical unit for output write |
---|
60 | & numisp = 41 , & !: logical unit for island statistics |
---|
61 | & numgap = 45 , & !: logical unit for differences diagnostic |
---|
62 | & numbol = 67 , & !: logical unit for "bol" diagnostics |
---|
63 | & numptr = 68 , & !: logical unit for Poleward TRansports |
---|
64 | & numflo = 69 !: logical unit for drifting floats |
---|
65 | |
---|
66 | !!---------------------------------------------------------------------- |
---|
67 | !! Run control |
---|
68 | !!---------------------------------------------------------------------- |
---|
69 | |
---|
70 | INTEGER :: nstop = 0 , & !: error flag (=number of reason for a premature stop run) |
---|
71 | & nwarn = 0 !: warning flag (=number of warning found during the run) |
---|
72 | CHARACTER(LEN=100) :: ctmp1, ctmp2, ctmp3 !: temporary character |
---|
73 | CHARACTER (len=64) :: cform_err="(/,' ===>>> : E R R O R', /,' ===========',/)" , & !: |
---|
74 | & cform_war="(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: |
---|
75 | LOGICAL :: lwp , & !: boolean : true on the 1st processor only |
---|
76 | & lsp_area = .TRUE. !: to make a control print over a specific area |
---|
77 | !!---------------------------------------------------------------------- |
---|
78 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
79 | !! $Header$ |
---|
80 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
81 | !!---------------------------------------------------------------------- |
---|
82 | |
---|
83 | CONTAINS |
---|
84 | |
---|
85 | SUBROUTINE ctl_stop( cd1, cd2, cd3, cd4, cd5, & |
---|
86 | & cd6, cd7, cd8, cd9, cd10 ) |
---|
87 | !!----------------------------------------------------------------------- |
---|
88 | !! *** ROUTINE stop_opa *** |
---|
89 | !! |
---|
90 | !! ** Purpose : ??? blah blah.... |
---|
91 | !!----------------------------------------------------------------------- |
---|
92 | CHARACTER(len=*), INTENT(in), OPTIONAL :: cd1, cd2, cd3, cd4, cd5, & |
---|
93 | & cd6, cd7, cd8, cd9, cd10 |
---|
94 | !!----------------------------------------------------------------------- |
---|
95 | ! |
---|
96 | nstop = nstop + 1 |
---|
97 | IF(lwp) THEN |
---|
98 | WRITE(numout,"(/,' ===>>> : E R R O R', /,' ===========',/)") |
---|
99 | IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 |
---|
100 | IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 |
---|
101 | IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3 |
---|
102 | IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4 |
---|
103 | IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5 |
---|
104 | IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6 |
---|
105 | IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7 |
---|
106 | IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8 |
---|
107 | IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9 |
---|
108 | IF( PRESENT(cd10) ) WRITE(numout,*) cd10 |
---|
109 | ENDIF |
---|
110 | CALL FLUSH(numout) |
---|
111 | ! |
---|
112 | END SUBROUTINE ctl_stop |
---|
113 | |
---|
114 | |
---|
115 | SUBROUTINE ctl_warn( cd1, cd2, cd3, cd4, cd5, & |
---|
116 | & cd6, cd7, cd8, cd9, cd10 ) |
---|
117 | !!----------------------------------------------------------------------- |
---|
118 | !! *** ROUTINE stop_warn *** |
---|
119 | !! |
---|
120 | !! ** Purpose : ??? blah blah.... |
---|
121 | !!----------------------------------------------------------------------- |
---|
122 | CHARACTER(len=*), INTENT(in), OPTIONAL :: cd1, cd2, cd3, cd4, cd5, & |
---|
123 | & cd6, cd7, cd8, cd9, cd10 |
---|
124 | !!----------------------------------------------------------------------- |
---|
125 | ! |
---|
126 | nwarn = nwarn + 1 |
---|
127 | IF(lwp) THEN |
---|
128 | WRITE(numout,"(/,' ===>>> : W A R N I N G', /,' ===============',/)") |
---|
129 | IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 |
---|
130 | IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 |
---|
131 | IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3 |
---|
132 | IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4 |
---|
133 | IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5 |
---|
134 | IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6 |
---|
135 | IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7 |
---|
136 | IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8 |
---|
137 | IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9 |
---|
138 | IF( PRESENT(cd10) ) WRITE(numout,*) cd10 |
---|
139 | ENDIF |
---|
140 | CALL FLUSH(numout) |
---|
141 | ! |
---|
142 | END SUBROUTINE ctl_warn |
---|
143 | |
---|
144 | !!===================================================================== |
---|
145 | END MODULE in_out_manager |
---|