SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
control_temp_func.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 control_temp_func (PTEMP_IN) RESULT (PTEMPFUNC_RESULT)
7 
8 !
9 ! ###############################################################
10 !!** CONTROL_TEMP_FUNC
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !! Temperature control factor of decomposition.
18 !!
19 !! EXTERNAL
20 !! --------
21 !! none
22 !!
23 !! IMPLICIT ARGUMENTS
24 !! ------------------
25 !!
26 !! none
27 !!
28 !! REFERENCE
29 !! ---------
30 !!
31 !! Krinner et al., Global Biochemical Cycles, 2005
32 !! Gibelin et al. 2008, AFM
33 !!
34 !! AUTHOR
35 !! ------
36 !!
37 !! A.-L. Gibelin * Meteo-France *
38 !!
39 !! MODIFICATIONS
40 !! -------------
41 !! Original 23/06/09
42 !! B. Decharme 05/2012 : Optimization and ISBA-DIF coupling
43 !!
44 !-------------------------------------------------------------------------------
45 
46 !
47 !* 0. DECLARATIONS
48 ! ------------
49 !
50 USE yomhook ,ONLY : lhook, dr_hook
51 USE parkind1 ,ONLY : jprb
52 !
53 IMPLICIT NONE
54 !
55 !* 0.1 declarations of arguments
56 !
57 REAL, DIMENSION(:), INTENT(IN) :: ptemp_in ! temperature (K)
58 !
59 !* 0.2 declarations of local variables
60 !
61 REAL :: zcoef1
62 REAL, PARAMETER :: zcoef2 = 10.0
63 REAL, PARAMETER :: zcoef3 = 30.0
64 !
65 REAL, DIMENSION(SIZE(PTEMP_IN)) :: ptempfunc_result ! temperature control factor
66 !
67 REAL(KIND=JPRB) :: zhook_handle
68 !
69 !
70 !* 1 Calculates temperature control factor
71 !
72 IF (lhook) CALL dr_hook('CONTROL_TEMP_FUNC',0,zhook_handle)
73 !
74 zcoef1 = log(2.0)
75 !
76 ptempfunc_result(:) = exp( (zcoef1/zcoef2) * (ptemp_in(:)-zcoef3) )
77 !
78 ptempfunc_result(:) = min( 1., ptempfunc_result(:) )
79 !
80 IF (lhook) CALL dr_hook('CONTROL_TEMP_FUNC',1,zhook_handle)
81 
82 END FUNCTION control_temp_func
83 
84 
real function, dimension(size(ptemp_in)) control_temp_func(PTEMP_IN)