SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_nam_pgd_teb.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE read_nam_pgd_teb(HPROGRAM,KTEB_PATCH, HBEM, &
7  hcool_coil, hheat_coil, oautosize,&
8  kroad_layer, kroof_layer, &
9  kwall_layer, kfloor_layer, &
10  ogreenroof, ohydro, osolar_panel )
11 ! ##############################################################
12 !
13 !!**** *READ_NAM_PGD_TEB* reads namelist for TEB
14 !!
15 !! PURPOSE
16 !! -------
17 !!
18 !! METHOD
19 !! ------
20 !!
21 !
22 !! EXTERNAL
23 !! --------
24 !!
25 !! IMPLICIT ARGUMENTS
26 !! ------------------
27 !!
28 !! REFERENCE
29 !! ---------
30 !!
31 !! AUTHOR
32 !! ------
33 !!
34 !! V. Masson Meteo-France
35 !!
36 !! MODIFICATION
37 !! ------------
38 !!
39 !! Original 01/2005
40 !! 2008 B. Decharme : uniform value of subgrid drainage coefficient
41 !! 12/2008 E. Martin : files of data for subgrid drainage
42 !! and subgridrunoff
43 !! 06/2009 B. Decharme : files of data for topographic index
44 !!
45 !! A. Lemonsu 07/2012 Key for greenroofs & greenwalls
46 !! A. Lemonsu 07/2012 Key for urban hydrology
47 !----------------------------------------------------------------------------
48 !
49 !* 0. DECLARATION
50 ! -----------
51 !
52 USE modd_surf_par, ONLY : xundef, nundef
53 !
54 USE modi_get_luout
55 USE modi_open_namelist
56 USE modi_close_namelist
57 !
58 USE mode_pos_surf
59 !
60 !
61 USE yomhook ,ONLY : lhook, dr_hook
62 USE parkind1 ,ONLY : jprb
63 !
64 IMPLICIT NONE
65 !
66 !* 0.1 Declaration of arguments
67 ! ------------------------
68 !
69  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! Type of program
70 INTEGER, INTENT(OUT) :: kteb_patch ! number of patches
71  CHARACTER(LEN=3), INTENT(OUT) :: hbem ! to use BEM
72  CHARACTER(LEN=6), INTENT(OUT) :: hcool_coil ! type of cooling coil
73  CHARACTER(LEN=6), INTENT(OUT) :: hheat_coil ! type of heating coil
74 LOGICAL, INTENT(OUT) :: oautosize ! Flag to activate autosize calculations
75 INTEGER, INTENT(OUT) :: kroad_layer ! number of road layers
76 INTEGER, INTENT(OUT) :: kroof_layer ! number of roof layers
77 INTEGER, INTENT(OUT) :: kwall_layer ! number of wall layers
78 INTEGER, INTENT(OUT) :: kfloor_layer ! number of floor layers
79 LOGICAL, INTENT(OUT) :: ogreenroof ! key for greenroof activation
80 LOGICAL, INTENT(OUT) :: ohydro ! key for urban hydrology activation
81 LOGICAL, INTENT(OUT) :: osolar_panel ! key for solar panel activation
82 !
83 !
84 !* 0.2 Declaration of local variables
85 ! ------------------------------
86 !
87 INTEGER :: iluout ! output listing logical unit
88 INTEGER :: ilunam ! namelist file logical unit
89 LOGICAL :: gfound ! flag when namelist is present
90 !
91 !* 0.3 Declaration of namelists
92 ! ------------------------
93 !
94 INTEGER :: nteb_patch ! number of patches
95  CHARACTER(LEN=3) :: cbem ! to use BEM
96  CHARACTER(LEN=6) :: ccool_coil ! type of cooling coil
97  CHARACTER(LEN=6) :: cheat_coil ! type of heating coil
98 LOGICAL :: lautosize ! Flag to activate autosize calculations
99 INTEGER :: nroad_layer ! number of road layers
100 INTEGER :: nroof_layer ! number of roof layers
101 INTEGER :: nwall_layer ! number of wall layers
102 INTEGER :: nfloor_layer ! number of floor layers
103 LOGICAL :: lgreenroof ! key for greenroof activation
104 LOGICAL :: lhydro ! key for urban hydrology activation
105 LOGICAL :: lsolar_panel ! key for solar panel activation
106 !
107 REAL(KIND=JPRB) :: zhook_handle
108 !
109 namelist/nam_teb/ nteb_patch, cbem, ccool_coil, cheat_coil, lautosize, &
110  nroad_layer, nfloor_layer, nroof_layer, nwall_layer, &
111  lgreenroof, lhydro, lsolar_panel
112 !
113 !-------------------------------------------------------------------------------
114 !
115 !* 1. Initializations of defaults
116 ! ---------------------------
117 !
118 IF (lhook) CALL dr_hook('READ_NAM_PGD_TEB',0,zhook_handle)
119 nteb_patch = 1
120  cbem = 'DEF'
121 lautosize =.false.
122  cheat_coil ='IDEAL'
123  ccool_coil ='IDEAL'
124 nroad_layer = 5
125 nroof_layer = 5
126 nwall_layer = 5
127 nfloor_layer = 5
128 lgreenroof = .false.
129 lhydro = .false.
130 lsolar_panel = .false.
131 !
132  CALL get_luout(hprogram,iluout)
133 !
134 !-------------------------------------------------------------------------------
135 !
136 !* 2. Reading of namelist
137 ! -------------------
138 !
139  CALL open_namelist(hprogram,ilunam)
140 !
141  CALL posnam(ilunam,'NAM_TEB',gfound,iluout)
142 IF (gfound) READ(unit=ilunam,nml=nam_teb)
143 !
144  CALL close_namelist(hprogram,ilunam)
145 !
146 !-------------------------------------------------------------------------------
147 !
148 kteb_patch = nteb_patch ! number of patches
149 hbem = cbem
150 hcool_coil = ccool_coil
151 hheat_coil = cheat_coil
152 oautosize = lautosize
153 kroad_layer = nroad_layer
154 kroof_layer = nroof_layer
155 kwall_layer = nwall_layer
156 kfloor_layer = nfloor_layer
157 !
158 ogreenroof = lgreenroof
159 ohydro = lhydro
160 osolar_panel = lsolar_panel
161 !
162 IF (lhook) CALL dr_hook('READ_NAM_PGD_TEB',1,zhook_handle)
163 !
164 !-------------------------------------------------------------------------------
165 !
166 END SUBROUTINE read_nam_pgd_teb
subroutine read_nam_pgd_teb(HPROGRAM, KTEB_PATCH, HBEM, HCOOL_COIL, HHEAT_COIL, OAUTOSIZE, KROAD_LAYER, KROOF_LAYER, KWALL_LAYER, KFLOOR_LAYER, OGREENROOF, OHYDRO, OSOLAR_PANEL)
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)