CTBTO FLEXPART WO4 (2015-10-15)
 All Classes Files Functions Variables
psih.f90
Go to the documentation of this file.
1 !**********************************************************************
2 ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010 *
3 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, *
4 ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann *
5 ! *
6 ! This file is part of FLEXPART. *
7 ! *
8 ! FLEXPART is free software: you can redistribute it and/or modify *
9 ! it under the terms of the GNU General Public License as published by*
10 ! the Free Software Foundation, either version 3 of the License, or *
11 ! (at your option) any later version. *
12 ! *
13 ! FLEXPART is distributed in the hope that it will be useful, *
14 ! but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 ! GNU General Public License for more details. *
17 ! *
18 ! You should have received a copy of the GNU General Public License *
19 ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. *
20 !**********************************************************************
21 
22 function psih (z,l)
23 
24  !*****************************************************************************
25  ! *
26  ! Calculation of the stability correction term *
27  ! *
28  ! AUTHOR: Matthias Langer, adapted by Andreas Stohl (6 August 1993) *
29  ! Update: G. Wotawa, 11 October 1994 *
30  ! *
31  ! Literature: *
32  ! [1] C.A.Paulson (1970), A Mathematical Representation of Wind Speed *
33  ! and Temperature Profiles in the Unstable Atmospheric Surface *
34  ! Layer. J.Appl.Met.,Vol.9.(1970), pp.857-861. *
35  ! *
36  ! [2] A.C.M. Beljaars, A.A.M. Holtslag (1991), Flux Parameterization over*
37  ! Land Surfaces for Atmospheric Models. J.Appl.Met. Vol. 30,pp 327-*
38  ! 341 *
39  ! *
40  ! Variables: *
41  ! L = Monin-Obukhov-length [m] *
42  ! z = height [m] *
43  ! zeta = auxiliary variable *
44  ! *
45  ! Constants: *
46  ! eps = 1.2E-38, SUN-underflow: to avoid division by zero errors *
47  ! *
48  !*****************************************************************************
49 
50  use par_mod
51 
52  implicit none
53 
54  real :: psih,x,z,zeta,l
55  real,parameter :: a=1.,b=0.667,c=5.,d=0.35,eps=1.e-20
56 
57  if ((l.ge.0).and.(l.lt.eps)) then
58  l=eps
59  else if ((l.lt.0).and.(l.gt.(-1.*eps))) then
60  l=-1.*eps
61  endif
62 
63  if ((log10(z)-log10(abs(l))).lt.log10(eps)) then
64  psih=0.
65  else
66  zeta=z/l
67  if (zeta.gt.0.) then
68  psih = - (1.+0.667*a*zeta)**(1.5) - b*(zeta-c/d)*exp(-d*zeta) &
69  - b*c/d + 1.
70  else
71  x=(1.-16.*zeta)**(.25)
72  psih=2.*log((1.+x*x)/2.)
73  end if
74  end if
75 
76 end function psih
real function psih(z, l)
Definition: psih.f90:22