SURFEX v8.1
General documentation of Surfex
read_pgd_teb_greenroofn.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_pgd_teb_greenroof_n (OCH_BIO_FLUX, DTCO, DTV, GB, U, &
7  IO, S, K, KDIM, HPROGRAM,KVERSION)
8 ! #########################################
9 !
10 !!**** *READ_PGD_TEB_GREENROOF_n* - routine to initialise ISBA physiographic variables
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !! based on read_pgd_teb_gardenn
28 !!
29 !! AUTHOR
30 !! ------
31 !! C. de Munck & A. Lemonsu *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 07/2011
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 !
43 !
44 !
46 USE modd_data_isba_n, ONLY : data_isba_t
47 USE modd_gr_biog_n, ONLY : gr_biog_t
48 USE modd_surf_atm_n, ONLY : surf_atm_t
49 !
51 USE modd_isba_n, ONLY : isba_k_t, isba_s_t
52 !
53 USE modd_isba_par, ONLY : xoptimgrid
54 !
56 USE modi_read_pgd_teb_greenroof_par_n
57 !
58 !
59 !
60 USE yomhook ,ONLY : lhook, dr_hook
61 USE parkind1 ,ONLY : jprb
62 !
63 USE modi_get_type_dim_n
64 !
65 IMPLICIT NONE
66 !
67 !* 0.1 Declarations of arguments
68 ! -------------------------
69 !
70 !
71 LOGICAL, INTENT(IN) :: OCH_BIO_FLUX
72 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
73 TYPE(data_isba_t), INTENT(INOUT) :: DTV
74 TYPE(gr_biog_t), INTENT(INOUT) :: GB
75 TYPE(surf_atm_t), INTENT(INOUT) :: U
76 TYPE(isba_options_t), INTENT(INOUT) :: IO
77 TYPE(isba_k_t), INTENT(INOUT) :: K
78 TYPE(isba_s_t), INTENT(INOUT) :: S
79 INTEGER, INTENT(INOUT) :: KDIM
80 !
81  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! calling program
82 INTEGER, INTENT(IN) :: KVERSION ! version of SURFEX of the file being read
83 !
84 !* 0.2 Declarations of local variables
85 ! -------------------------------
86 !
87 INTEGER :: IRESP ! Error code after redding
88 !
89  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
90 !
91 !
92 INTEGER :: JLAYER ! loop counter on layers ! not used
93 REAL(KIND=JPRB) :: ZHOOK_HANDLE
94 !
95 !-------------------------------------------------------------------------------
96 !
97 !* 1D physical dimension
98 !
99 IF (lhook) CALL dr_hook('READ_PGD_TEB_GREENROOF_N',0,zhook_handle)
100 yrecfm='SIZE_TOWN'
101  CALL get_type_dim_n(dtco, u, 'TOWN ',kdim)
102 !
103 !
104 !* 3. Physiographic data fields:
105 ! -------------------------
106 !
107 !* orographic runoff coefficient
108 !
109 yrecfm='GR_RUNOFFB'
110  CALL read_surf(hprogram,yrecfm,k%XRUNOFFB,iresp)
111 !
112 !* subgrid drainage coefficient
113 !
114 IF (kversion<=6) THEN
115  k%XWDRAIN = 0.
116 ELSE
117  yrecfm='GR_WDRAIN'
118  CALL read_surf(hprogram,yrecfm,k%XWDRAIN,iresp)
119 ENDIF
120 !
121 !-------------------------------------------------------------------------------
122 !* biogenic chemical emissions
123 !
124 IF (och_bio_flux) THEN
125  ALLOCATE(gb%XISOPOT(kdim))
126  yrecfm='E_ISOPOT'
127  CALL read_surf(hprogram,yrecfm,gb%XISOPOT,iresp)
128  !
129  ALLOCATE(gb%XMONOPOT(kdim))
130  yrecfm='E_MONOPOT'
131  CALL read_surf(hprogram,yrecfm,gb%XMONOPOT,iresp)
132 ELSE
133  ALLOCATE(gb%XISOPOT (0))
134  ALLOCATE(gb%XMONOPOT(0))
135 END IF
136 !
137 !-------------------------------------------------------------------------------
138 !
139 !* 4. Physiographic data fields not to be computed by ecoclimap
140 ! ---------------------------------------------------------
141 !
142 !
143 !LPAR_GREENROOF = .FALSE.
144 !IF (KVERSION>=7) THEN
145 ! YRECFM='PAR_GREENROOF'
146 ! CALL READ_SURF(HPROGRAM,YRECFM,LPAR_GREENROOF,IRESP)
147 !END IF
148 !
149 !IF (LPAR_GREENROOF) CALL READ_PGD_TEB_GREENROOF_PAR_n(HPROGRAM)
150 !
151 io%LPAR = .true.
152 !
153 io%LECOCLIMAP = (.NOT. io%LPAR)
154 !
155  CALL read_pgd_teb_greenroof_par_n(dtv, io, s, k, kdim, hprogram)
156 !
157 IF (lhook) CALL dr_hook('READ_PGD_TEB_GREENROOF_N',1,zhook_handle)
158 !
159 !
160 !-------------------------------------------------------------------------------
161 !
162 END SUBROUTINE read_pgd_teb_greenroof_n
subroutine get_type_dim_n(DTCO, U, HTYPE, KDIM)
subroutine read_pgd_teb_greenroof_par_n(DTV, IO, S, K, KDIM, HPRO
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine read_pgd_teb_greenroof_n(OCH_BIO_FLUX, DTCO, DTV, GB,