source: flexpart.git/src/psih.f90 @ 3481cc1

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since 3481cc1 was 3481cc1, checked in by Ignacio Pisso <ip@…>, 4 years ago

move license from headers to a different file

  • Property mode set to 100644
File size: 2.5 KB
Line 
1function psih (z,l)
2
3  !*****************************************************************************
4  !                                                                            *
5  !     Calculation of the stability correction term                           *
6  !                                                                            *
7  !     AUTHOR: Matthias Langer, adapted by Andreas Stohl (6 August 1993)      *
8  !             Update: G. Wotawa, 11 October 1994                             *
9  !                                                                            *
10  !     Literature:                                                            *
11  !     [1] C.A.Paulson (1970), A Mathematical Representation of Wind Speed    *
12  !           and Temperature Profiles in the Unstable Atmospheric Surface     *
13  !           Layer. J.Appl.Met.,Vol.9.(1970), pp.857-861.                     *
14  !                                                                            *
15  !     [2] A.C.M. Beljaars, A.A.M. Holtslag (1991), Flux Parameterization over*
16  !           Land Surfaces for Atmospheric Models. J.Appl.Met. Vol. 30,pp 327-*
17  !           341                                                              *
18  !                                                                            *
19  !     Variables:                                                             *
20  !     L     = Monin-Obukhov-length [m]                                       *
21  !     z     = height [m]                                                     *
22  !     zeta  = auxiliary variable                                             *
23  !                                                                            *
24  !     Constants:                                                             *
25  !     eps   = 1.2E-38, SUN-underflow: to avoid division by zero errors       *
26  !                                                                            *
27  !*****************************************************************************
28
29  use par_mod
30
31  implicit none
32
33  real :: psih,x,z,zeta,l
34  real,parameter :: a=1.,b=0.667,c=5.,d=0.35,eps=1.e-20
35
36  if ((l.ge.0).and.(l.lt.eps)) then
37    l=eps
38  else if ((l.lt.0).and.(l.gt.(-1.*eps))) then
39    l=-1.*eps
40  endif
41
42  if ((log10(z)-log10(abs(l))).lt.log10(eps)) then
43    psih=0.
44  else
45    zeta=z/l
46    if (zeta.gt.0.) then
47      psih = - (1.+0.667*a*zeta)**(1.5) - b*(zeta-c/d)*exp(-d*zeta) &
48           - b*c/d + 1.
49    else
50      x=(1.-16.*zeta)**(.25)
51      psih=2.*log((1.+x*x)/2.)
52    end if
53  end if
54
55end function psih
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG