[e200b7a] | 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 | |
---|
[496c607] | 22 | real function obukhov_ecmwf(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm) |
---|
[e200b7a] | 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 | !******************************************************************** |
---|
| 33 | ! * |
---|
| 34 | ! This program calculates Obukhov scale height from surface * |
---|
| 35 | ! meteorological data and sensible heat flux. * |
---|
| 36 | ! * |
---|
| 37 | !******************************************************************** |
---|
| 38 | ! * |
---|
| 39 | ! INPUT: * |
---|
| 40 | ! * |
---|
| 41 | ! ps surface pressure [Pa] * |
---|
| 42 | ! tsurf surface temperature [K] * |
---|
| 43 | ! tdsurf surface dew point [K] * |
---|
| 44 | ! tlev temperature first model level [K] * |
---|
| 45 | ! ustar scale velocity [m/s] * |
---|
| 46 | ! hf surface sensible heat flux [W/m2] * |
---|
| 47 | ! akm ECMWF vertical discretization parameter * |
---|
| 48 | ! bkm ECMWF vertical discretization parameter * |
---|
| 49 | ! * |
---|
| 50 | !******************************************************************** |
---|
| 51 | |
---|
| 52 | use par_mod |
---|
| 53 | |
---|
| 54 | implicit none |
---|
| 55 | |
---|
| 56 | real :: akm(nwzmax),bkm(nwzmax) |
---|
| 57 | real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev |
---|
| 58 | real :: ak1,bk1,theta,thetastar |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | e=ew(tdsurf) ! vapor pressure |
---|
| 62 | tv=tsurf*(1.+0.378*e/ps) ! virtual temperature |
---|
| 63 | rhoa=ps/(r_air*tv) ! air density |
---|
| 64 | ak1=(akm(1)+akm(2))/2. |
---|
| 65 | bk1=(bkm(1)+bkm(2))/2. |
---|
| 66 | plev=ak1+bk1*ps ! Pressure level 1 |
---|
| 67 | theta=tlev*(100000./plev)**(r_air/cpa) ! potential temperature |
---|
| 68 | if (ustar.le.0.) ustar=1.e-8 |
---|
| 69 | thetastar=hf/(rhoa*cpa*ustar) ! scale temperature |
---|
| 70 | if(abs(thetastar).gt.1.e-10) then |
---|
[496c607] | 71 | obukhov_ecmwf=theta*ustar**2/(karman*ga*thetastar) |
---|
[e200b7a] | 72 | else |
---|
[496c607] | 73 | obukhov_ecmwf=9999 ! zero heat flux |
---|
[e200b7a] | 74 | endif |
---|
[496c607] | 75 | if (obukhov_ecmwf.gt. 9999.) obukhov_ecmwf= 9999. |
---|
| 76 | if (obukhov_ecmwf.lt.-9999.) obukhov_ecmwf=-9999. |
---|
[e200b7a] | 77 | |
---|
[496c607] | 78 | end function obukhov_ecmwf |
---|