Changeset 6ecb30a in flexpart.git for src/obukhov.f90


Ignore:
Timestamp:
Aug 17, 2017, 4:39:17 PM (7 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
5b34509
Parents:
61e07ba
Message:

Merged changes from CTBTO project

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/obukhov.f90

    re200b7a r6ecb30a  
    2020!**********************************************************************
    2121
    22 real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm)
     22real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm,plev,metdata_format)
    2323
    2424  !********************************************************************
     
    2727  !                       Date:   1994-06-27                          *
    2828  !                                                                   *
    29   !  Update: A. Stohl, 2000-09-25, avoid division by zero by          *
    30   !  setting ustar to minimum value                                   *
     29  !     This program calculates Obukhov scale height from surface     *
     30  !     meteorological data and sensible heat flux.                   *
    3131  !                                                                   *
    3232  !********************************************************************
    3333  !                                                                   *
    34   !     This program calculates Obukhov scale height from surface     *
    35   !     meteorological data and sensible heat flux.                   *
     34  !  Update: A. Stohl, 2000-09-25, avoid division by zero by          *
     35  !  setting ustar to minimum value                                   *
     36  !  CHANGE: 17/11/2005 Caroline Forster NCEP GFS version             *
     37  !                                                                   *
     38  !   Unified ECMWF and GFS builds                                    *
     39  !   Marian Harustak, 12.5.2017                                      *
     40  !     - Merged obukhov and obukhov_gfs into one routine using       *
     41  !       if-then for meteo-type dependent code                       *
    3642  !                                                                   *
    3743  !********************************************************************
     
    4753  !     akm     ECMWF vertical discretization parameter               *
    4854  !     bkm     ECMWF vertical discretization parameter               *
     55  !     plev                                                          *
     56  !     metdata_format format of metdata (ecmwf/gfs)                  *
    4957  !                                                                   *
    5058  !********************************************************************
    5159
    5260  use par_mod
     61  use class_gribfile
    5362
    5463  implicit none
    5564
     65  integer :: metdata_format
    5666  real :: akm(nwzmax),bkm(nwzmax)
    5767  real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev
     
    6272  tv=tsurf*(1.+0.378*e/ps)               ! virtual temperature
    6373  rhoa=ps/(r_air*tv)                      ! air density
     74  if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
    6475  ak1=(akm(1)+akm(2))/2.
    6576  bk1=(bkm(1)+bkm(2))/2.
    6677  plev=ak1+bk1*ps                        ! Pressure level 1
     78  end if
    6779  theta=tlev*(100000./plev)**(r_air/cpa) ! potential temperature
    6880  if (ustar.le.0.) ustar=1.e-8
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG