CTBTO FLEXPART WO4 (2015-10-15)
 All Classes Files Functions Variables
obukhov_gfs.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 real function obukhov_gfs(ps,tsurf,tdsurf,tlev,ustar,hf,plev)
23 
24  !********************************************************************
25  ! *
26  ! Author: G. WOTAWA *
27  ! Date: 1994-06-27 *
28  ! *
29  ! Update: A. Stohl, 2000-09-25, avoid division by zero by *
30  ! setting ustar to minimum value *
31  ! *
32  ! CHANGE: 17/11/2005 Caroline Forster NCEP GFS version *
33  ! *
34  !********************************************************************
35  ! *
36  ! This program calculates Obukhov scale height from surface *
37  ! meteorological data and sensible heat flux. *
38  ! *
39  !********************************************************************
40  ! *
41  ! INPUT: *
42  ! *
43  ! ps surface pressure [Pa] *
44  ! tsurf surface temperature [K] *
45  ! tdsurf surface dew point [K] *
46  ! tlev temperature first model level [K] *
47  ! ustar scale velocity [m/s] *
48  ! hf surface sensible heat flux [W/m2] *
49  ! akm ECMWF vertical discretization parameter *
50  ! bkm ECMWF vertical discretization parameter *
51  ! *
52  !********************************************************************
53 
54  use par_mod
55 
56  implicit none
57 
58  real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev
59  real :: theta,thetastar
60 
61 
62  e=ew(tdsurf) ! vapor pressure
63  tv=tsurf*(1.+0.378*e/ps) ! virtual temperature
64  rhoa=ps/(r_air*tv) ! air density
65  theta=tlev*(100000./plev)**(r_air/cpa) ! potential temperature
66  if (ustar.le.0.) ustar=1.e-8
67  thetastar=hf/(rhoa*cpa*ustar) ! scale temperature
68  if(abs(thetastar).gt.1.e-10) then
69  obukhov_gfs=theta*ustar**2/(karman*ga*thetastar)
70  else
71  obukhov_gfs=9999 ! zero heat flux
72  endif
73  if (obukhov_gfs.gt. 9999.) obukhov_gfs= 9999.
74  if (obukhov_gfs.lt.-9999.) obukhov_gfs=-9999.
75 
76 end function obukhov_gfs
real function ew(x)
Definition: ew.f90:22
real function obukhov_gfs(ps, tsurf, tdsurf, tlev, ustar, hf, plev)
Definition: obukhov_gfs.f90:22