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