PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
general_gamma.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5 FUNCTION general_gamma(PALPHA,PNU,PLBDA,PX) RESULT(PGENERAL_GAMMA)
6 USE yomhook , ONLY : lhook, dr_hook, jphook
7! ###################################################################
8!
9!
10!!**** *GENERAL_GAMMA * - Generalized gamma function
11!!
12!!
13!! PURPOSE
14!! -------
15! The purpose of this function is to compute the Generalized gamma
16! function of its argument.
17!
18!
19!!** METHOD
20!! ------
21!!
22!! EXTERNAL
23!! --------
24!! NONE
25!!
26!! IMPLICIT ARGUMENTS
27!! ------------------
28!! gamma.h : computation of the Gamma function (GAMMA)
29!!
30!! REFERENCE
31!! ---------
32!! Book2 of documentation (routine CONDENS)
33!!
34!!
35!! AUTHOR
36!! ------
37!! Jean-Pierre Pinty *LA/OMP*
38!!
39!! MODIFICATIONS
40!! -------------
41!! Original 7/11/95
42!
43!* 0. DECLARATIONS
44! ------------
45!
46!
47IMPLICIT NONE
48!
49!* 0.1 declarations of arguments and result
50!
51REAL, INTENT(IN) :: palpha
52REAL, INTENT(IN) :: pnu
53REAL, INTENT(IN) :: plbda
54REAL, INTENT(IN) :: px
55REAL :: pgeneral_gamma
56!
57!* 0.2 declarations of local variables
58!
59REAL :: zarg,zpower
60!
61REAL(kind=jphook) :: zhook_handle
62IF (lhook) CALL dr_hook('GENERAL_GAMMA',0,zhook_handle)
63zarg = plbda*px
64zpower = palpha*pnu - 1.0
65!
66pgeneral_gamma = (palpha/gamma(pnu))*(zarg**zpower)*plbda*exp(-(zarg**palpha))
67IF (lhook) CALL dr_hook('GENERAL_GAMMA',1,zhook_handle)
68RETURN
69!
70CONTAINS
71include "gamma.h"
72END FUNCTION general_gamma
elemental real function gamma(px)
Definition gamma.h:14
real function general_gamma(palpha, pnu, plbda, px)