SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
set_rough.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 set_rough(OCANOPY,HROUGH)
7 ! ########################################################################
8 !
9 !!**** *SET_ROUGH* - routine to set default values for roughness ISBA configuration
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2004
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
40 USE modd_surf_par, ONLY : xundef
41 !
42 !
43 USE yomhook ,ONLY : lhook, dr_hook
44 USE parkind1 ,ONLY : jprb
45 !
46 USE modi_abor1_sfx
47 !
48 IMPLICIT NONE
49 !
50 !* 0.1 Declarations of arguments
51 ! -------------------------
52 !
53 !
54 LOGICAL, INTENT(IN) :: ocanopy ! True = SBL scheme
55  ! False = no SBL scheme
56  CHARACTER(LEN=4), INTENT(INOUT) :: hrough ! type of roughness length
57 REAL(KIND=JPRB) :: zhook_handle
58 !
59 !
60 !* 0.2 Declarations of local variables
61 ! -------------------------------
62 !
63 !-------------------------------------------------------------------------------
64 !
65 !* default value if needed
66 !
67 IF (lhook) CALL dr_hook('SET_ROUGH',0,zhook_handle)
68 IF (hrough == "UNDE") THEN
69  IF (ocanopy) THEN
70  hrough = "BE04"
71  ELSE
72  hrough = "Z04D"
73  END IF
74 END IF
75 !
76 !* coherence check
77 !
78 IF (ocanopy .AND. (hrough=="Z01D" .OR. hrough=="Z04D")) THEN
79  CALL abor1_sfx('If LISBA_CANOPY=T, orographic roughness cannot be computed by CROUGH="Z01D" or "Z04D"')
80 END IF
81 !
82 IF (.NOT. ocanopy .AND. hrough=="BE04") THEN
83  CALL abor1_sfx('If LISBA_CANOPY=F, orographic roughness cannot be computed by CROUGH="BE04"')
84 END IF
85 IF (lhook) CALL dr_hook('SET_ROUGH',1,zhook_handle)
86 !
87 !-------------------------------------------------------------------------------
88 !
89 END SUBROUTINE set_rough
subroutine set_rough(OCANOPY, HROUGH)
Definition: set_rough.F90:6
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6