SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
wind_threshold.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  FUNCTION wind_threshold(PWIND,PUREF) RESULT(PWIND_NEW)
7 ! ############################################################################
8 !
9 !!**** *WIND_THRESHOLD*
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 ! Set a minimum value to the wind for exchange coefficient computations.
15 ! This minimum value depends on the forcing height
16 !
17 !! AUTHOR
18 !! ------
19 !!
20 !! V. Masson * Meteo-France *
21 !!
22 !! MODIFICATIONS
23 !! -------------
24 !! Original 09/2007
25 !-------------------------------------------------------------------------------
26 !
27 USE modd_surf_atm, ONLY: xcismin, xvmodmin, laldthres
28 !
29 !* 0. DECLARATIONS
30 ! ------------
31 !
32 !
33 USE yomhook ,ONLY : lhook, dr_hook
34 USE parkind1 ,ONLY : jprb
35 !
36 IMPLICIT NONE
37 !
38 !* 0.1 declarations of arguments
39 !
40 !
41 REAL, DIMENSION(:), INTENT(IN) :: pwind ! wind
42 REAL, DIMENSION(:), INTENT(IN) :: puref ! forcing level
43 !
44 REAL, DIMENSION(SIZE(PWIND)) :: pwind_new ! modified wind
45 REAL(KIND=JPRB) :: zhook_handle
46 !
47 !
48 !
49 !* 0.2 declarations of local variables
50 !
51 !-------------------------------------------------------------------------------
52 !
53 ! wind gradient
54 !
55 IF (lhook) CALL dr_hook('WIND_THRESHOLD',0,zhook_handle)
56 IF (.NOT.laldthres) THEN
57 !
58 ! minimum value for exchange coefficients computations : 1m/s / 10m
59  pwind_new = max(pwind , 0.1 * min(10.,puref) )
60 ELSE
61 ! minimum value for exchange coefficients computations : 1m/s / 10m
62  pwind_new = max( xvmodmin, sqrt( pwind**2 + (xcismin*puref)**2 ) )
63 ENDIF
64 IF (lhook) CALL dr_hook('WIND_THRESHOLD',1,zhook_handle)
65 !
66 !-------------------------------------------------------------------------------
67 !
68 END FUNCTION wind_threshold
real function, dimension(size(pwind)) wind_threshold(PWIND, PUREF)