SURFEX v8.1
General documentation of Surfex
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 posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
integer, parameter nundef
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)