source: LMDZ6/trunk/libf/phy_common/print_control_mod.F90 @ 3151

Last change on this file since 3151 was 2326, checked in by Ehouarn Millour, 9 years ago

Further code reorganization: adding "phy_common", a directory which should contain routines common (wrt structural nature of the underlying code/grid) to all LMDZ-related physics packages.
EM

File size: 1.8 KB
Line 
1! $Id: $
2MODULE print_control_mod
3
4  INTEGER,SAVE :: lunout ! default output file identifier (6==screen)
5  INTEGER,SAVE :: prt_level ! debug output level
6  LOGICAL,SAVE :: debug ! flag to specify if in "debug mode"
7!$OMP THREADPRIVATE(lunout,prt_level,debug)
8
9CONTAINS
10
11  SUBROUTINE init_print_control
12  USE ioipsl_getin_p_mod, ONLY : getin_p
13  USE mod_phys_lmdz_para, ONLY: is_omp_root, is_master
14  IMPLICIT NONE
15
16    LOGICAL :: opened
17    INTEGER :: number
18   
19    !Config  Key  = prt_level
20    !Config  Desc = niveau d'impressions de débogage
21    !Config  Def  = 0
22    !Config  Help = Niveau d'impression pour le débogage
23    !Config         (0 = minimum d'impression)
24    prt_level = 0
25    CALL getin_p('prt_level',prt_level)
26
27    !Config  Key  = lunout
28    !Config  Desc = unite de fichier pour les impressions
29    !Config  Def  = 6
30    !Config  Help = unite de fichier pour les impressions
31    !Config         (defaut sortie standard = 6)
32    lunout=6
33    CALL getin_p('lunout', lunout)
34
35    IF (is_omp_root) THEN
36      IF (lunout /= 5 .and. lunout /= 6) THEN
37         INQUIRE(FILE='lmdz.out_0000',OPENED=opened,NUMBER=number)
38         IF (opened) THEN
39           lunout=number
40         ELSE
41           OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write',  &
42                STATUS='unknown',FORM='formatted')
43         ENDIF
44      ENDIF
45    ENDIF
46
47    !Config  Key  = debug
48    !Config  Desc = mode debogage
49    !Config  Def  = false
50    !Config  Help = positionne le mode debogage
51
52    debug = .FALSE.
53    CALL getin_p('debug',debug)
54   
55    IF (is_master) THEN
56      WRITE(lunout,*)"init_print_control: prt_level=",prt_level
57      WRITE(lunout,*)"init_print_control: lunout=",lunout
58      WRITE(lunout,*)"init_print_control: debug=",debug     
59    ENDIF
60   
61  END SUBROUTINE init_print_control 
62
63END MODULE print_control_mod
Note: See TracBrowser for help on using the repository browser.