1 | !*********************************************************************** |
---|
2 | !* Copyright 2012,2013 * |
---|
3 | !* Jerome Brioude, Delia Arnold, Andreas Stohl, Wayne Angevine, * |
---|
4 | !* John Burkhart, Massimo Cassiani, Adam Dingwell, Richard C Easter, Sabine Eckhardt,* |
---|
5 | !* Stephanie Evan, Jerome D Fast, Don Morton, Ignacio Pisso, * |
---|
6 | !* Petra Seibert, Gerard Wotawa, Caroline Forster, Harald Sodemann, * |
---|
7 | !* * |
---|
8 | !* This file is part of FLEXPART WRF * |
---|
9 | !* * |
---|
10 | !* FLEXPART is free software: you can redistribute it and/or modify * |
---|
11 | !* it under the terms of the GNU General Public License as published by* |
---|
12 | !* the Free Software Foundation, either version 3 of the License, or * |
---|
13 | !* (at your option) any later version. * |
---|
14 | !* * |
---|
15 | !* FLEXPART is distributed in the hope that it will be useful, * |
---|
16 | !* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
---|
17 | !* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
---|
18 | !* GNU General Public License for more details. * |
---|
19 | !* * |
---|
20 | !* You should have received a copy of the GNU General Public License * |
---|
21 | !* along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * |
---|
22 | !*********************************************************************** |
---|
23 | ! real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm) |
---|
24 | real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,plev) |
---|
25 | !******************************************************************** |
---|
26 | ! * |
---|
27 | ! Author: G. WOTAWA * |
---|
28 | ! Date: 1994-06-27 * |
---|
29 | ! * |
---|
30 | ! Update: A. Stohl, 2000-09-25, avoid division by zero by * |
---|
31 | ! setting ustar to minimum value * |
---|
32 | ! * |
---|
33 | ! 20 Oct 2005 - R. Easter - pass plev as argument instead of * |
---|
34 | ! akm,bkm * |
---|
35 | ! * |
---|
36 | !******************************************************************** |
---|
37 | ! * |
---|
38 | ! This program calculates Obukhov scale height from surface * |
---|
39 | ! meteorological data and sensible heat flux. * |
---|
40 | ! * |
---|
41 | !******************************************************************** |
---|
42 | ! * |
---|
43 | ! INPUT: * |
---|
44 | ! * |
---|
45 | ! ps surface pressure [Pa] * |
---|
46 | ! tsurf surface temperature [K] * |
---|
47 | ! tdsurf surface dew point [K] * |
---|
48 | ! tlev temperature first model level [K] * |
---|
49 | ! ustar scale velocity [m/s] * |
---|
50 | ! hf surface sensible heat flux [W/m2] * |
---|
51 | ! akm ECMWF vertical discretization parameter * |
---|
52 | ! bkm ECMWF vertical discretization parameter * |
---|
53 | ! * |
---|
54 | !******************************************************************** |
---|
55 | |
---|
56 | ! include 'includepar' |
---|
57 | ! real akm(nwzmax),bkm(nwzmax) |
---|
58 | ! real ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev |
---|
59 | ! real ak1,bk1,theta,thetastar |
---|
60 | use par_mod |
---|
61 | |
---|
62 | implicit none |
---|
63 | |
---|
64 | real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev |
---|
65 | real :: theta,thetastar |
---|
66 | |
---|
67 | |
---|
68 | e=ew(tdsurf) ! vapor pressure |
---|
69 | tv=tsurf*(1.+0.378*e/ps) ! virtual temperature |
---|
70 | rhoa=ps/(r_air*tv) ! air density |
---|
71 | ! ak1=(akm(1)+akm(2))/2. |
---|
72 | ! bk1=(bkm(1)+bkm(2))/2. |
---|
73 | ! plev=ak1+bk1*ps ! Pressure level 1 |
---|
74 | theta=tlev*(100000./plev)**(r_air/cpa) ! potential temperature |
---|
75 | if (ustar.le.0.) ustar=1.e-8 |
---|
76 | thetastar=hf/(rhoa*cpa*ustar) ! scale temperature |
---|
77 | if(abs(thetastar).gt.1.e-10) then |
---|
78 | obukhov=theta*ustar**2/(karman*ga*thetastar) |
---|
79 | else |
---|
80 | obukhov=9999 ! zero heat flux |
---|
81 | endif |
---|
82 | if (obukhov.gt. 9999.) obukhov= 9999. |
---|
83 | if (obukhov.lt.-9999.) obukhov=-9999. |
---|
84 | |
---|
85 | end function obukhov |
---|
86 | |
---|