Changes in src/richardson.f90 [6ecb30a:c2162ce] in flexpart.git


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/richardson.f90

    r6ecb30a rc2162ce  
    2121
    2222subroutine richardson(psurf,ust,ttlev,qvlev,ulev,vlev,nuvz, &
    23        akz,bkz,hf,tt2,td2,h,wst,hmixplus,metdata_format)
     23       akz,bkz,hf,tt2,td2,h,wst,hmixplus)
    2424  !                        i    i    i     i    i    i    i
    2525  ! i   i  i   i   i  o  o     o
     
    4141  !     Meteor. 81, 245-269.                                                  *
    4242  !                                                                           *
    43   !****************************************************************************
    44   !                                                                           *
    4543  !     Update: 1999-02-01 by G. Wotawa                                       *
    4644  !                                                                           *
     
    4846  !     instead of first model level.                                         *
    4947  !     New input variables tt2, td2 introduced.                              *
    50   !                                                                           *
    51   !     CHANGE: 17/11/2005 Caroline Forster NCEP GFS version                  *
    52   !                                                                           *
    53   !     Unified ECMWF and GFS builds                                          *
    54   !     Marian Harustak, 12.5.2017                                            *
    55   !       - Merged richardson and richardson_gfs into one routine using       *
    56   !         if-then for meteo-type dependent code                             *
    5748  !                                                                           *
    5849  !****************************************************************************
     
    6455  ! tv                         virtual temperature                            *
    6556  ! wst                        convective velocity scale                      *
    66   ! metdata_format             format of metdata (ecmwf/gfs)                  *
    6757  !                                                                           *
    6858  ! Constants:                                                                *
     
    7262
    7363  use par_mod
    74   use class_gribfile
    7564
    7665  implicit none
    7766
    78   integer :: metdata_format
    79   integer :: i,k,nuvz,iter,llev,loop_start
     67  integer :: i,k,nuvz,iter
    8068  real :: tv,tvold,zref,z,zold,pint,pold,theta,thetaref,ri
    8169  real :: akz(nuvz),bkz(nuvz),ulev(nuvz),vlev(nuvz),hf,wst,tt2,td2,ew
     
    8876  excess=0.0
    8977  iter=0
    90 
    91   if (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then
    92     ! NCEP version: find first model level above ground
    93     !**************************************************
    94 
    95      llev = 0
    96      do i=1,nuvz
    97        if (psurf.lt.akz(i)) llev=i
    98      end do
    99      llev = llev+1
    100     ! sec llev should not be 1!
    101      if (llev.eq.1) llev = 2
    102      if (llev.gt.nuvz) llev = nuvz-1
    103     ! NCEP version
    104   end if
    105 
    10678
    10779  ! Compute virtual temperature and virtual potential temperature at
     
    12395  ! Integrate z up to one level above zt
    12496  !*************************************
    125   if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
    126     loop_start=2
    127   else
    128     loop_start=llev
    129   end if
    130   do k=loop_start,nuvz
     97
     98  do k=2,nuvz
    13199    pint=akz(k)+bkz(k)*psurf  ! pressure on model layers
    132100    tv=ttlev(k)*(1.+0.608*qvlev(k))
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG