SURFEX v8.1
General documentation of Surfex
set_sso_levels.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_sso_levels (SB, KDIM)
7 ! #################################################################################
8 !
9 !!**** *SET_SSO_LEVELS* - prepares SSO canopy fields
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 07/2006
28 !! S. Riette 06/2009 XT, XU, XQ, XTKE are set to XUNDEF
29 !! No more argument needed
30 !! E. Martin 01/2012 XUNDEF fields are no more written in PREP file
31 !!------------------------------------------------------------------
32 !
33 !
34 USE modd_canopy_n, ONLY : canopy_t
35 !
36 USE modd_surf_par, ONLY : xundef
37 !
38 USE modi_prep_sbl
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 !
48 TYPE(canopy_t), INTENT(INOUT) :: SB
49 !
50 INTEGER, INTENT(IN) :: KDIM ! 1D physical dimension
51 
52 !
53 !* 0.2 declarations of local variables
54 !
55 INTEGER :: JLAYER
56 INTEGER :: ILU ! number of points
57 !
58 REAL(KIND=JPRB) :: ZHOOK_HANDLE
59 !
60 !-------------------------------------------------------------------------------------
61 !
62 !* 1. number of levels (MUST be at least equal to 2)
63 ! ----------------
64 !
65 IF (lhook) CALL dr_hook('SET_SSO_LEVELS',0,zhook_handle)
66 !
67  CALL prep_sbl(kdim, sb)
68 !
69 !* 3. wind in canopy (m/s)
70 ! --------------
71 !
72 ALLOCATE(sb%XU(kdim,sb%NLVL))
73 sb%XU(:,:) = xundef
74 !
75 !* 4. Tke in canopy (m2/s2)
76 ! -------------
77 !
78 ALLOCATE(sb%XTKE(kdim,sb%NLVL))
79 sb%XTKE(:,:) = xundef
80 !
81 IF (lhook) CALL dr_hook('SET_SSO_LEVELS',1,zhook_handle)
82 !
83 !-------------------------------------------------------------------------------------
84 !
85 END SUBROUTINE set_sso_levels
subroutine prep_sbl(KDIM, SB)
Definition: prep_sbl.F90:7
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine set_sso_levels(SB, KDIM)