SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
prep_teb_greenroof_unif.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 prep_teb_greenroof_unif(KLUOUT,HSURF,PFIELD)
7 ! #################################################################################
8 !
9 !!**** *PREP_TEB_GREENROOF_UNIF* - prepares ISBA field from prescribed values
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! Based on "prep_teb_garden_unif"
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !!
23 !! AUTHOR
24 !! ------
25 !! A. Lemonsu & C. de Munck
26 !!
27 !! MODIFICATIONS
28 !! -------------
29 !! Original 07/2011
30 !!------------------------------------------------------------------
31 !
32 !
33 USE modd_prep, ONLY : cinterp_type
34 USE modd_data_cover_par, ONLY : nvegtype
35 USE modd_surf_par, ONLY : xundef
36 USE modd_prep_teb_greenroof,ONLY : xhug_surf_gr, xhug_root_gr, xhug_deep_gr, &
37  xhugi_surf_gr, xhugi_root_gr, xhugi_deep_gr, &
38  xtg_surf_gr, xtg_root_gr, xtg_deep_gr, &
39  xwr_def
40 !
41 !
42 USE yomhook ,ONLY : lhook, dr_hook
43 USE parkind1 ,ONLY : jprb
44 !
45 IMPLICIT NONE
46 !
47 !* 0.1 declarations of arguments
48 !
49 INTEGER, INTENT(IN) :: kluout ! output listing logical unit
50  CHARACTER(LEN=7), INTENT(IN) :: hsurf ! type of field
51 REAL, POINTER, DIMENSION(:,:,:) :: pfield ! field to interpolate horizontally
52 !
53 !* 0.2 declarations of local variables
54 !
55 INTEGER :: jv ! loop counter
56 REAL(KIND=JPRB) :: zhook_handle
57 !
58 !-------------------------------------------------------------------------------------
59 !
60 IF (lhook) CALL dr_hook('PREP_TEB_GREENROOF_UNIF',0,zhook_handle)
61 SELECT CASE(hsurf)
62 !
63 !* 3.0 Orography
64 !
65  CASE('ZS ')
66  ALLOCATE(pfield(1,1,1))
67  pfield = 0.
68 
69 !
70 !* 3.1 Profile of soil relative humidity
71 !
72  CASE('WG ')
73  ALLOCATE(pfield(1,3,nvegtype))
74  DO jv=1,nvegtype
75  pfield(:,1,jv) = xhug_surf_gr
76  pfield(:,2,jv) = xhug_root_gr
77  pfield(:,3,jv) = xhug_deep_gr
78  END DO
79 
80 !* 3.2 Profile of soil humidity for ice
81 
82  CASE('WGI ')
83  ALLOCATE(pfield(1,3,nvegtype))
84  DO jv=1,nvegtype
85  pfield(:,1,jv) = xhugi_surf_gr
86  pfield(:,2,jv) = xhugi_root_gr
87  pfield(:,3,jv) = xhugi_deep_gr
88  END DO
89 
90 !* 3.3 Profile of temperatures
91 
92  CASE('TG ')
93  ALLOCATE(pfield(1,3,nvegtype))
94  DO jv=1,nvegtype
95  pfield(:,1,jv) = xtg_surf_gr
96  pfield(:,2,jv) = xtg_root_gr
97  pfield(:,3,jv) = xtg_deep_gr
98  END DO
99 
100 !* 3.4 Other quantities
101 
102  CASE('WR ')
103  ALLOCATE(pfield(1,1,nvegtype))
104  pfield = xwr_def
105 
106  CASE('LAI ')
107  ALLOCATE(pfield(1,1,nvegtype))
108  pfield = xundef
109 
110 END SELECT
111 !
112 !* 4. Interpolation method
113 ! --------------------
114 !
115  cinterp_type='UNIF '
116 IF (lhook) CALL dr_hook('PREP_TEB_GREENROOF_UNIF',1,zhook_handle)
117 !
118 !-------------------------------------------------------------------------------------
119 END SUBROUTINE prep_teb_greenroof_unif
subroutine prep_teb_greenroof_unif(KLUOUT, HSURF, PFIELD)