source: trunk/LMDZ.COMMON/libf/phy_common/print_control_mod.F90 @ 1658

Last change on this file since 1658 was 1521, checked in by emillour, 9 years ago

All GCMs: Updates to make planetary codes (+Earth) setups converge.

  • Made a "phy_common" directory in libf, to contain routines common (wrt structural nature of underlying code/grid) to all LMDZ-related physics packages.
  • moved all "mod_phys_*" and "mod_grid_phy_lmdz" files from dynlonlat_phylonlat to "phy_common"
  • moved "ioipsl_getincom_p.F90 from "misc" to "phy_common" and modified it to match Earth GCM version and renamed it ioipsl_getin_p_mod.F90
  • added an "abort_physics" (as in Earth GCM) in "phy_common"
  • added a "print_control_mod.F90 (as in Earth GCM) in phy_common
  • made similar changes in LMDZ.GENERIC and LMDZ.MARS

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.